[R] Quantil-quantile plot help
John Fox
jfox at mcmaster.ca
Fri Oct 25 16:59:44 CEST 2002
Dear Laura,
At 07:16 AM 10/25/2002 -0400, Bayesianbay at aol.com wrote:
>I am using the qq.plot command to create quantile-quantile plots. The plot
>should display a 45 degree reference line upon which the points of the graph
>should fall if the two distributions being examined are roughly equal.
>
>If I try:
>x<-rchisq(100, df=6)
>qq.plot(x, dist="chisq", df=6)
>
>Then I get a quantile plot which has an intercept of roughly 1 when the line
>should be going through (0,0)?
>
>Could someone explain why this is happening on this plot and how I can get
>what I need?
I guess that you're using qq.plot in the car package. As the help file
explains, the line is fit by default through the quartiles of the two
distributions, and there is an option to fit by robust regression. The
general idea is that the data could come from the reference distribution
but possibly with a different location and scale, and hence the line need
not have an intercept of 0 and a slope of 1.
You could add the 45-degree line with abline(0,1), but there is no way at
present of suppressing the line that qq.plot draws (short of rewriting
qq.plot.default). I'll add an option to suppress the line when I next
update the package.
Regards,
John
-----------------------------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada L8S 4M4
email: jfox at mcmaster.ca
phone: 905-525-9140x23604
web: www.socsci.mcmaster.ca/jfox
-----------------------------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list