Skip to content
Prev 172079 / 398503 Next

Extract statistics from lm()

Look at the data structure produced by summary()
[1] "call"          "terms"         "residuals"     "coefficients"
  [5] "aliased"       "sigma"         "df"            "r.squared"
  [9] "adj.r.squared" "fstatistic"    "cov.unscaled"

Now look at the data structure for the coefficients in the summary:
Estimate Std. Error   t value     Pr(>|t|)
(Intercept)    5.032  0.2202177 22.850117 9.547128e-15
groupTrt      -0.371  0.3114349 -1.191260 2.490232e-01
[1] "matrix"
(Intercept)    groupTrt
   22.850117   -1.191260

albyn

Quoting Bogaso <bogaso.christofer at gmail.com>: