From rjvbertin@hotmail.com  Wed Jun 12 22:01:59 2002
From: rjvbertin@hotmail.com (rjvbertin@hotmail.com)
Date: Wed, 12 Jun 2002 23:01:59 +0200 (MET DST)
Subject: documentation error for quantile (PR#1660)
Message-ID: <200206122101.XAA14806@pubhealth.ku.dk>

>From the documentation to the quantile function:

...

    `quantile(x,p)' as a function of `p' linearly interpolates the
     points ( (i-1)/(n-1), ox[i] ), where `ox <- order(x)' (the ``order
     statistics'') and `n <- length(x)'.

    This gives `quantile(x, p) == (1-f)*ox[i] + f*ox[i+1]', where `r
     <- 1 + (n-1)*p', `i <- floor(r)', `f <- r - i' and `ox[n+1] :=
     ox[n]'.

I think that should be ox <- x[ order(x) ] ! At least, then the formulae 
give the same result as quantile itself!


RenE J.V. Bertin
College de France/LPPA
11, place Marcelin Berthelot
75005 Paris, France

_________________________________________________________________




-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


documentation error for quantile (PR#1660)
rjvbertin@hotmail.com