I have
fit.all <-lm(Sepal.Length ~ .,iris)
summary(fit.all)->fit.all.summary
print(fit.all.summary$coefficients)
I have
fit.all <-lm(Sepal.Length ~ .,iris)
summary(fit.all)->fit.all.summary
print(fit.all.summary$coefficients)
They are simply in the exact order that you passed the data.frame
to lm()
.
data(iris)
iris <- iris[, c(5,4,3,2,1)] #change column order
fit.all <-lm(Sepal.Length ~ .,iris)
summary(fit.all)->fit.all.summary
print(fit.all.summary$coefficients)
Output:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.1712663 0.27979415 7.760227 1.429502e-12
Speciesversicolor -0.7235620 0.24016894 -3.012721 3.059634e-03
Speciesvirginica -1.0234978 0.33372630 -3.066878 2.584344e-03
Petal.Width -0.3151552 0.15119575 -2.084418 3.888826e-02
Petal.Length 0.8292439 0.06852765 12.100867 1.073592e-23
Sepal.Width 0.4958889 0.08606992 5.761466 4.867516e-08