Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-31 Thread Martin Maechler
> Serguei Sokol > on Wed, 31 May 2017 18:46:34 +0200 writes: > Le 31/05/2017 à 17:30, Serguei Sokol a écrit : >> >> More thorough reading revealed that I have overlooked this phrase in the >> line's doc: "left and right /thirds/ of the data" (emphasis is mine). >

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-31 Thread Serguei Sokol
Le 31/05/2017 à 17:30, Serguei Sokol a écrit : More thorough reading revealed that I have overlooked this phrase in the line's doc: "left and right /thirds/ of the data" (emphasis is mine). Oops. I have read the first ref returned by google and it happened to be tibco's doc, not the R's one. Th

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-31 Thread Joris Meys
On Wed, May 31, 2017 at 4:57 PM, peter dalgaard wrote: > > We have a fair amount of cool westerly wind up here that I could transfer > to you via WWTP (Wind and Weather Transport Protocol). If you open up a > sufficiently large pipe, that is. > > I closed and opened windows again, but it still d

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-31 Thread Serguei Sokol
Le 31/05/2017 à 16:39, Joris Meys a écrit : Seriously, if a method gives a wrong result, it's wrong. I did not understand why you and others were using term "wrong" based on something that I was considering as just "different" implementation. More thorough reading revealed that I have overlooked

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-31 Thread peter dalgaard
> On 31 May 2017, at 16:40 , Joris Meys wrote: > > And with "equally spaced" I obviously meant "of equal size". It's getting > too hot in the office here... We have a fair amount of cool westerly wind up here that I could transfer to you via WWTP (Wind and Weather Transport Protocol). If you

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-31 Thread Joris Meys
And with "equally spaced" I obviously meant "of equal size". It's getting too hot in the office here... On Wed, May 31, 2017 at 4:39 PM, Joris Meys wrote: > Seriously, if a method gives a wrong result, it's wrong. line() does NOT > implement the algorithm of Tukey, even not after the patch. We'r

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-31 Thread Joris Meys
Seriously, if a method gives a wrong result, it's wrong. line() does NOT implement the algorithm of Tukey, even not after the patch. We're not discussing Excel here, are we? The method of Tukey is rather clear, and it is NOT using the default quantile definition from the quantile function. Actuall

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-31 Thread Serguei Sokol
Le 31/05/2017 à 15:40, Joris Meys a écrit : OTOH, > sapply(1:9, function(i){ + sum(dfr$time <= quantile(dfr$time, 1./3., type = i)) + }) [1] 8 8 6 6 6 6 8 6 6 Only the default (type = 7) and the first two types give the result lines() gives now. I think there is plenty of reasons to give why

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-31 Thread Joris Meys
OTOH, > sapply(1:9, function(i){ + sum(dfr$time <= quantile(dfr$time, 1./3., type = i)) + }) [1] 8 8 6 6 6 6 8 6 6 Only the default (type = 7) and the first two types give the result lines() gives now. I think there is plenty of reasons to give why any of the other 6 types might be better suite

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-31 Thread Serguei Sokol
Le 30/05/2017 à 18:51, Martin Maechler a écrit : Serguei Sokol on Tue, 30 May 2017 16:01:17 +0200 writes: > Le 30/05/2017 à 09:33, Martin Maechler a écrit : ... >> However, even after the patch, The example from the SO >> post differs from the result of Richie Cotton's