Skip to content
Prev 167132 / 398502 Next

interpolation to abscissa

On Jan 15, 2009, at 10:04 AM, e-letter wrote:

            
Perhaps a coding error on my part (or on your part). Perhaps different  
methods (none of which you describe)?

I suspect that my method only used the first two points (I just  
checked by plotting and -2.7 is closer to the paper and pen result I  
get than is -3.28. Perhaps you made an extrapolation from a linear fit  
of a dataset that is not co-linear?

 > lm(c(0,5) ~ c(16,45))

Call:
lm(formula = c(0, 5) ~ c(16, 45))

Coefficients:
(Intercept)    c(16, 45)
     -2.7586       0.1724

It not that "R is different",  it is merely that I used it differently  
than you used your other tools.

Here's another method ( using all points and again reversing the roles  
of x and y) :
 > lm(c(0,5,10,15,20) ~ c(16,45,77,101,125))

Call:
lm(formula = c(0, 5, 10, 15, 20) ~ c(16, 45, 77, 101, 125))

Coefficients:
             (Intercept)  c(16, 45, 77, 101, 125)
                 -3.2332                   0.1818