Tal Galili
2014-Dec-04 12:40 UTC
[R] Using "line" (Tukey's robust line) on 3 observations?
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]]
Stéphane Adamowicz
2014-Dec-05 08:54 UTC
[R] Using "line" (Tukey's robust line) on 3 observations?
Le 4 d?c. 2014 ? 13:40, Tal Galili a ?crit :> 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, > TalStrange, indeed. The problem arises also with other examples :> line(1:8,1:8)Call: line(1:8, 1:8) Coefficients: [1] -1.125 1.250> line(1:9,1:9)Call: line(1:9, 1:9) Coefficients: [1] -1.0 1.2 _________________________________ St?phane Adamowicz Inra, centre de recherche Paca, unit? PSH 228, route de l'a?rodrome CS 40509 domaine St Paul, site Agroparc 84914 Avignon, cedex 9 France stephane.adamowicz at avignon.inra.fr tel. +33 (0)4 32 72 24 35 fax. +33 (0)4 32 72 24 32 do not dial 0 when out of France web PSH : https://www6.paca.inra.fr/psh web Inra : http://www.inra.fr/ _________________________________ [[alternative HTML version deleted]]