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

2017-05-29 Thread GlenB
Incidentally (though I don't expect anyone will want to pursue it) Johnstone & Velleman give standard errors for the estimates in Johnstone, Iain M., and Paul F. Velleman. “The Resistant Line and Related Regression Methods.” Journal of the American Statistical Association, vol. 80, no. 392, 1985, p

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

2017-05-29 Thread Serguei Sokol
Sorry, I have seen it too late that we had different tab width in the original file and my editor. Here is the patch with all white spaces instead of mixing tabs and white spaces. Serguei. Le 29/05/2017 à 15:13, Serguei Sokol a écrit : Here is an attached patch. Best, Serguei. Le 29/05/2017

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

2017-05-29 Thread Serguei Sokol
Here is an attached patch. Best, Serguei. Le 29/05/2017 à 12:21, Serguei Sokol a écrit : The problem or actual R implementation relies on an assumption that median(x[i] | x[i] <= quantile(x, 1/3)) == quantile(x, 1/6) which reveals not to be true despite very trustful appearance. If we continue

Re: [Rd] Interpreting R memory profiling statistics from Rprof() and gc()

2017-05-29 Thread Tomas Kalibera
On 05/18/2017 06:54 PM, Joy wrote: Sorry, this might be a really basic question, but I'm trying to interpret the results from memory profiling, and I have a few questions (marked by *Q#*). From the summaryRprof() documentation, it seems that the four columns of statistics that are reported when

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

2017-05-29 Thread Serguei Sokol
The problem or actual R implementation relies on an assumption that median(x[i] | x[i] <= quantile(x, 1/3)) == quantile(x, 1/6) which reveals not to be true despite very trustful appearance. If we continue with the example of x=y=1:9 then quantile(x, 1/6)=2.5 (here quantile() is taken in C-code s

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

2017-05-29 Thread peter dalgaard
A usually trustworthy R correspondent posted a pure R implementation on SO at some point in his lost youth: https://stackoverflow.com/questions/3224731/john-tukey-median-median-or-resistant-line-statistical-test-for-r-and-line This one does indeed generate the line of identity for the (1:9, 1:9)