[R] qqplot

John Fox jfox at mcmaster.ca
Tue Nov 3 01:33:07 CET 2009


Dear Carol,

> -----Original Message-----
> From: carol white [mailto:wht_crl at yahoo.com]
> Sent: November-02-09 4:04 PM
> To: 'Peter Flom'; John Fox
> Cc: r-help at stat.math.ethz.ch; 'Yihui Xie'
> Subject: RE: [R] qqplot
> 
> Thanks for all your replies.
> 
> I just wanted to compare the distributions of two populations and see how
> different they are. I thought that QQplot would be a good idea. It's true
> that the mean and sd of the two distributions are not the same. I don't
know
> if any other method or graphical presentation like five number, mean and
sd
> as suggested, or boxplot would have been more suited to be used.

It depends on what you're interested in comparing. If you're interested in
differences in shape adjusting for differences in centre and spread, then a
QQ plot with a line fit through the first and third quartiles is a
reasonable choice.  If you centre the two data sets to medians of 0, the
intercept of the line will give you information about the difference in
centres and the slope about differences in spread. If you're primarily
interested in comparing centres and spreads then parallel boxplots would be
a good choice. 

Regards,
 John

> 
> thanks for your advices,
> 
> --- On Mon, 11/2/09, John Fox <jfox at mcmaster.ca> wrote:
> 
> > From: John Fox <jfox at mcmaster.ca>
> > Subject: RE: [R] qqplot
> > To: "'Peter Flom'" <peterflomconsulting at mindspring.com>
> > Cc: r-help at stat.math.ethz.ch, "'carol white'" <wht_crl at yahoo.com>,
"'Yihui
> Xie'" <xieyihui at gmail.com>
> > Date: Monday, November 2, 2009, 9:24 AM
> > Dear Peter,
> >
> > I assumed that Carol wanted to compare the shapes of the
> > distributions and
> > to adjust for differences in centre and spread. To put a
> > line through the
> > quartiles or to base a line on the medians and IQRs is more
> > robust than
> > using the means and sds.
> >
> > Best,
> >  John
> >
> >
> > > -----Original Message-----
> > > From: r-help-bounces at r-project.org
> > [mailto:r-help-bounces at r-project.org]
> > On
> > > Behalf Of Peter Flom
> > > Sent: November-02-09 11:57 AM
> > > To: carol white; Yihui Xie
> > > Cc: r-help at stat.math.ethz.ch
> > > Subject: Re: [R] qqplot
> > >
> > > carol white <wht_crl at yahoo.com>
> > wrote
> > >
> > > >So the conclusion is that abline(0,1) should
> > always be used and if it
> > > doesn't go through the qqplot, the two distributions
> > are not similar?
> > >
> > > I think it depends what you mean by "similar".
> > E.g., if you mean "are
> > both
> > > of these distributions (e.g.) normal?" then
> > abline(0,1) is not always
> > useful.
> > > But if you mean "Do these have the same mean, sd, and
> > distribution?" then
> > > abline(0,1) is the way to go.
> > >
> > > Peter
> > >
> > > Peter L. Flom, PhD
> > > Statistical Consultant
> > > Website: www DOT peterflomconsulting DOT com
> > > Writing; http://www.associatedcontent.com/user/582880/peter_flom.html
> > > Twitter:   @peterflom
> > >
> > > ______________________________________________
> > > 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