[R] Using "line" (Tukey's robust line) on 3 observations?

Tal Galili tal.galili at gmail.com
Thu Dec 4 13:40:55 CET 2014


By accident I came across the following example:

x <- 1:3
y <- 1:3
line(x, y) # returns:

Call:
line(x, x)

Coefficients:
[1]  -2   2


While when using 1:4, it will give the more reasonable 0,1 coefficients.

I imagine this is in the way it calculate the quantiles (i.e.: a "feature").
Can someone help in explaining this?


Thanks,
Tal









----------------Contact
Details:-------------------------------------------------------
Contact me: Tal.Galili at gmail.com |
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
----------------------------------------------------------------------------------------------

	[[alternative HTML version deleted]]



More information about the R-help mailing list