[R] the plotting position of theoretical quantile for qqnorm

Martin Maechler maechler at stat.math.ethz.ch
Thu Feb 8 09:57:48 CET 2007


>>>>> "LizF" == fengfeng  <fengfeng99 at gmail.com>
>>>>>     on Wed, 7 Feb 2007 23:08:31 -0600 writes:

    LizF> Hello,
    LizF> I have a doubt about the plotting position of the theoretical quantile for
    LizF> the qqnorm
    LizF> command in R.

    LizF> Let F be the theoretical distribution of Y, we observed a sample of size n,
    LizF> y1,y2, ...,
    LizF> yn. We then sort it and comspare these empirical quantiles to the expected
    LizF> ones
    LizF> from F. For the plotting poition, there are several options:

    LizF> 1. i/(n+1)
    LizF> 2. (i-.375)/(n+.25)
    LizF> 3. (i- .3175)/ (n + .365)
    LizF> etc.

yes, particularly "etc"  ;-)

    LizF> Which one is "qqnorm" used?

It's right in front of you if you read  help(qqnorm)  carefully :

  >> See Also:
  >> 
  >>    'ppoints', used by 'qqnorm' to generate approximations to expected
  >>    order statistics for a normal distribution.
  >> 

So it uses ppoints()  and  help(ppoints) tells you what's going
on: The formula used depends on (n <= 10) but see that help page.

    LizF> Thx a lot!

You're welcome,
Martin Maechler, ETH Zurich

    LizF> Liz



More information about the R-help mailing list