[R] Extract R-squared from summary of lm
Peter Dalgaard
P.Dalgaard at biostat.ku.dk
Fri Jan 22 16:23:10 CET 2010
Trafim Vanishek wrote:
> Dear all,
>
> I cannot find to explicitly get the R-squared or adjusted R-squared from
> summary(lm())
>
> names(summary(RegModel.1))
[1] "call" "terms" "residuals" "coefficients"
[5] "aliased" "sigma" "df" "r.squared"
[9] "adj.r.squared" "fstatistic" "cov.unscaled"
> summary(RegModel.1)$r.squared
[1] 0.55389
> summary(RegModel.1)$adj.r.squared
[1] 0.5432683
--
O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list