Skip to content
Prev 166776 / 398502 Next

lm: how are polynomial functions interpreted?

damn.
My apologies to everyone -- I sent one message and it got destroyed somehow.

Here's the part that was missing, which led to rather a lot of confusion 
on all parts.

The two recent responses to a question about lm suggested

1)  lm(y~poly(x,2))

2) lm(y~I(x^2))

So my question was *supposed* to be related to how lm operated 
differently (if at all) on these two different 'versions' of a quadratic 
fit.  My gut reaction was that y~I(x^2) would not be the same as y~f(x) 
where f(x) is a+bx+cx^2 .

So what I was trying to find out was just how lm() deals with various 
definitions of the orthogonal polynomials its presented with.  Another 
way, maybe, to ask, is: how does one specify to fit exactly to

   a + bx +cx^2  vs

   bx + cx^2   vs
   cx^2
?

Thanks and apologies again to all the people who quite properly 
misunderstood what I was harping on due to the munging of my first post.

Carl
David Winsemius wrote: