[R] qqplot

John Fox jfox at mcmaster.ca
Mon Nov 2 17:31:41 CET 2009


Carol,

You could run a line through the pairs of first and third quartiles of the
two distributions, i.e., c(quantile(x, .25), quantile(y, .25)) and
c(quantile(x, .75), quantile(y, .75)). (Of course, you'd want the line to
extend across the whole graph.)

I hope this helps,
 John


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On
> Behalf Of carol white
> Sent: November-02-09 10:40 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] qqplot
> 
> Hi,
> We could use qqplot to see how two distributions are different from each
> other. To show better how they are different (departs from the straight
> line), how is it possible to plot the straight line that goes through
them? I
> am looking for some thing like qqline for qqnorm. I thought of abline but
how
> to determine the slope and intercept?
> 
> Best wishes,
> 
> Carol
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list