一切都在标题中...我知道如何存储估计值,但我不知道如何存储它们的标准错误...谢谢
> x <- runif(100)
> y <- 5 + 3 * x + rnorm(100, 0, 0.15)
> reg <- lm(y~x)
>
> summary(reg)
Call:
lm(formula = y ~ x)
Residuals:
Min 1Q Median 3Q Max
-0.32198 -0.12626 0.02584 0.10873 0.31411
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.00931 0.03087 162.25 <2e-16 ***
x 2.98162 0.05359 55.64 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.1499 on 98 degrees of freedom
Multiple R-squared: 0.9693, Adjusted R-squared: 0.969
F-statistic: 3096 on 1 and 98 DF, p-value: < 2.2e-16
>
> reg$coef
(Intercept) x
5.009309 2.981617