I'm trying to using lm(poly) to get a polynomial regression for some points, but got some questions about the regression formula coefficients it returns.
sample like this:
x=seq(1,100) y=x^2+3*x+7 fit=lm(y~poly(x,2))
Results are:
lm(formula = y ~ poly(x, 2))
Coefficients:
(Intercept) poly(x, 2)1 poly(x, 2)2
3542 30021 7452
Why are the coefficients not 7,3,2?
Thank you very much!