[R] glmer -- extracting standard errors and other statistics

Weiss, Bernd bernd.weiss at uni-koeln.de
Mon Sep 22 01:49:32 CEST 2008


John Poulsen schrieb:
> Hello,
> 
> I am using glmer() from lmer(lme4) to run generalized linear mixed 
> models.  However, I am having a problem extracting the standard errors 
> for the fixed effects.
> 
> I have used:
> 
> summary(model)$coef
> fixed.effects(model)
> coef(model)
> 
> to get out the parameter estimates, but do not seem able to extract the 
> se's.
> 
> Anybody have a solution?
> 

You need to extract the variance-covariance matrix:

library(lme4)

gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd), 
              family = binomial, data = cbpp))

sqrt(diag(vcov(gm1)))


HTH,

Bernd



More information about the R-help mailing list