On Tue, 3 Feb 2004, Timur Elzhov wrote:
> Dear R experts,
>
> Excuse me if my question will be stupid...
> I'd like to fit data with x^2 polynomial:
>
<snip>
> out <- lm(T ~ poly(X, 4), data = d)
> out
> Call:
> lm(formula = T ~ poly(X, 2), data = d)
>
> Coefficients:
> (Intercept) poly(X, 2)1 poly(X, 2)2
> 9.803 -108.075 51.007
>
> So, d$T best fitted with function
> 9.803 -108.075 * X + 51.007 * X^2,
No. The predictors are not X and X^2, but two orthogonal polynomials.
Look at the help page for poly().
-thomas
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html