Hi

Bert Gunter <gunter.ber...@gene.com> napsal dne 14.04.2010 18:01:52:

> Below.
> 
> -- Bert 
> 
> 
> Bert Gunter
> Genentech Nonclinical Statistics
> 
> 
> Coefficients are different as you fit different values. See
> 
> ?poly
> 
> poly(-10:10,2)
> 
> I believe that others give you better explanation. So you can not use 
> coefficients evaluated by lm(.~poly(...)) directly.
> 
> -- Well, it depends what you mean by "use...directly." But I think the

I mean that you can use

fit<- lm(y~x+I(x^2))
coef(fit)[1] + coef(fit)[2]*x + coef(fit)[3]*x^2

but you can not use

fit<- lm(y~poly(x,2))
coef(fit)[1] + coef(fit)[2]*x + coef(fit)[3]*x^2

to compute y.

Regards
Petr


> answer is, "yes you can." See ?SafePrediction  for details. -- Bert
> 
> Regards
> Petr
> 
> > 
> > Thanks in advance,
> > Stefan
> > 
> > ______________________________________________
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> 
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to