[R] Odp: extract R-squared and P-value from lm results
Petr PIKAL
petr.pikal at precheza.cz
Fri Jan 29 15:18:37 CET 2010
Hi
r-help-bounces at r-project.org napsal dne 29.01.2010 15:04:39:
> Hi, R Users
>
> I find a problem in extracting the R-squared and P-value from the lm
results
> described below (in Italic),
>
> *Residual standard error: 2.25 on 17 degrees of freedom*
> *Multiple R-squared: 0.001069, Adjusted R-squared: -0.05769 *
> *F-statistic: 0.01819 on 1 and 17 DF, p-value: 0.8943 *
> *
> *
> Any suggestions will be appreciated. Thanks.
What about filling such question in CRAN search facility. When I put your
subject line into it I got many relevant hits.
If you want to see how summary(fit) is structured than use
str(summary(fit))
If I remember it correctly
summary(fit)$r.sqared
but you can easily find it yourself.
Regards
Petr
>
> Wenjun
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
More information about the R-help
mailing list