R code for pulling out fixed effect standard errors in lme4 package

R code for pulling out fixed effect standard errors in lme4 package



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.



This question came from our site for people interested in statistics, machine learning, data analysis, data mining, and data visualization.





Why is this off topic? It's a question about statistical programming.
– Blake Shurtz
Aug 26 at 20:50




1 Answer
1


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



Or


sqrt(diag(vcov(model)))





+1 but the question is off-topic.
– amoeba
Aug 22 at 21:04





@amoeba I figured I’d respond and we’d migrate it to SO
– Mark White
Aug 22 at 21:07






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)