[Rd] poly(*,*) in lm() (PR#8972)
Bjørn-Helge Mevik
bhs2 at mevik.net
Tue Jun 13 13:35:28 CEST 2006
> I used the function lm() to calculate the coefficients of a polynome. If I used
> the function poly(t,2) to denote a polynome of form 1 + x + x^2, the
> coefficients are wrong.
If you take a look at the manual page for poly, you will find that
poly (by default) will calculate _orthogonal_ polynomials, which are
not the same as 1, x, x^2, etc.
--
Bjørn-Helge Mevik
More information about the R-devel
mailing list