Skip to content
Prev 43626 / 398513 Next

lm coefficients

The function "poly" produces orthogonal polynomials, and those 
depend on the exact combinations of levels of X in "d".  Consider the 
following: 

 > round(poly(1:3, 2), 2)
         1     2
[1,] -0.71  0.41
[2,]  0.00 -0.82
[3,]  0.71  0.41

 > round(poly(1:4, 2), 2)
         1    2
[1,] -0.67  0.5
[2,] -0.22 -0.5
[3,]  0.22 -0.5
[4,]  0.67  0.5

      Does this answer your question? 
      spencer graves
Timur Elzhov wrote: