[R] linear regression: Is there a way to get the results of lm as variables
CE.KA
ce.kaya75 at yahoo.fr
Wed Oct 21 11:07:28 CEST 2009
Hi R users
I used R to get the results of a linear regression
reg<-lm(y~x)
here are the results:
# Call:
# lm(formula = donnees$txi7098 ~ donnees$txs7098)
#
# Residuals:
# Min 1Q Median 3Q Max
# -0.037971 -0.013373 -0.004947 0.010618 0.053235
#
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# (Intercept) 0.08547 0.03028 2.822 0.011738 *
# donnees$txs7098 0.62306 0.12847 4.850 0.000150 ***
# ---
# Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#
# Residual standard error: 0.02199 on 17 degrees of freedom
# Multiple R-squared: 0.5805, Adjusted R-squared: 0.5558
# F-statistic: 23.52 on 1 and 17 DF, p-value: 0.0001502
I know how to get the coefficients as variable
for exemple:
reg$coefficients[1]=0.08547 (Estimate )
reg$coefficients[2]=0.62306 (Estimate )
My question is:
Is there a way to get the other results of lm as variables?
-Std. Errors?
-t value?
-Pr(>|t|) ?
-Residual standard error?
-Multiple R-squared?
-F-statistic?
Best regards
--
View this message in context: http://www.nabble.com/linear-regression%3A-Is-there-a-way-to-get-the-results-of-lm-as-variables-tp25988916p25988916.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list