Re: [Rd] fivenum accuracy (PR#13164)

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Wed, 15 Oct 2008 06:23:46 -0400

On 14/10/2008 5:30 PM, dleong_at_analogic.com wrote:
> Full_Name: David Leong
> Version: 2.7.2
> OS: Windows XP
> Submission from: (NULL) (12.187.86.2)
>
>
> It appears for the fivenum function, there is a strait average between two
> ranked samples. This should be a linear interpolation between ranks.

Not according to the documentation. This is not a bug.

If you want quantiles, use the quantile function. fivenum() is documented to give Tukey's five number summary (minimum, lower-hinge, median, upper-hinge, maximum).

Duncan Murdoch

> For the following data set
>
> #data
> CaCO3<-c(130.8,129.9,131.5,131.2,129.5,132.7,131.5,127.8,133.7,132.2,134.8,131.7,133.9,129.8,131.4,128.8,132.7,132.8,131.4,131.3)
>
> fivenum reports 127.80 130.35 131.45 132.70 134.80
>
> 130.35 should be 130.125. The other are correct.
>
> For the 20 points, the rank is (20+1)/4=5.25 so the weighting factor is 0.25 not
> 0.5.
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 15 Oct 2008 - 10:42:29 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 15 Oct 2008 - 16:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive