rlearner309 wrote:
I have a simple regression using lm().
model <- lm(dist ~ speed, data = cars) sModel <- summary(model)
If I just want to check the coefficient, I can use summary(lm())$coef; if I need the standard error, I can use summary(lm())$s, if I need the residuals,
It is recommended to extract the information using coef() or resid() as in coef(model) # or coefficients(model) resid(model) # or residuals(model)
I can use summary(lm())$res. OK. How can I get the R-squares and Adjusted R-squares using $...? Is there a function, like objects(), that can show all the references for values?
str(sModel) sModel$r.squared sModel$adj.r.squared HTH, Tobias ______________________________________________ [email protected] 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.

