Re: [R] to get the R-Squared value

2009-07-10 Thread Greg Hirson
Agus, Take a look at the summary method for lm - ?summary.lm x = 1:10 y = 2*x + rnorm(10) summary(lm(y~x)) names(summary(lm(y~x))) summary(lm(y~x))$r.squared # [1] 0.9892822 Hope that helps, Greg Agus Susanto wrote: Dear all, I know there are 'coef', 'predict', 'fit' to get the correspon

Re: [R] to get the R-Squared value

2009-07-10 Thread Henrique Dallazuanna
Using the example from lm help page: summary(lm.D9)$r.squared See str(summary(lm.D9)) for more options. On Fri, Jul 10, 2009 at 7:01 PM, Agus Susanto wrote: > Dear all, > I know there are 'coef', 'predict', 'fit' to get the corresponding > outputs. Is that possible to get the value of R-square

[R] to get the R-Squared value

2009-07-10 Thread Agus Susanto
Dear all, I know there are 'coef', 'predict', 'fit' to get the corresponding outputs. Is that possible to get the value of R-squared from a 'lm' output? Many thanks. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE