2
votes

I'd like to pull out the standard error for a regression done using lmer(). For example,

library(lme4)
data(iris)
head(iris)
model <- lmer(Sepal.Length ~ Sepal.Width + (1 | Species), data=iris);       
summary(model)

Looking at the fixed effects of the summary, you can see the standard errors.

Fixed effects:
            Estimate Std. Error t value
(Intercept)   3.4062     0.6683   5.097
Sepal.Width   0.7972     0.1062   7.506

I'd like to pull this out instead of having to type it in manually.

1
Why is this off topic? It's a question about statistical programming. - Blake Shurtz

1 Answers

5
votes
summary(model)$coef[, 2, drop = FALSE]

Or

sqrt(diag(vcov(model)))