On Thu, 18 Oct 2001, Jonathan Pietkiewicz wrote:
> Is it possible to set the intercept of a 3rd order
> polynomial fit to zero and compute the R squared value
> of that fit? I'm having some trouble.
>
summary(lm(y~poly(x,3)-1))
does the fit and gives the r^2 [defined in this case as RSS/sum(y^2)]
-thomas
Thomas Lumley Asst. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._