[R-sig-ME] Extract standard error of the variance component in lme4 package (GLMM).
Steve Walker
steve.walker at utoronto.ca
Wed Oct 15 15:49:22 CEST 2014
The standard approach is to bootstrap the standard errors with
`bootMer`. But this can take a long time.
Is there a reason you want standard errors instead of confidence
intervals? If not, you could try profile confidence intervals. Here is
an example:
library(lme4)
data(grouseticks)
form <- TICKS~YEAR+scale(HEIGHT)+(1|BROOD)+(1|INDEX)+(1|LOCATION)
(m <- glmer(form, family = "poisson", data = grouseticks))
(cim <- confint(m, oldNames = FALSE))
## ------------------------------------------------------------
## Bootstraping takes a _long_ time, but does give you
## standard errors:
## ------------------------------------------------------------
## (bt <- bootMer(m, function(mm) VarCorr(mm)$BROOD[,], 100))
## sd(bt$t, na.rm = TRUE)
## ------------------------------------------------------------
Cheers,
Steve
On 2014-10-15, 3:29 AM, Martí Casals wrote:
> Dear all,
>
> I’ve fitted a classical Poisson GLMM with lme4. I obtain the variance of
> random effect (variance component) with the following script:
>
>
> print(VarCorr(model),comp="Variance")
>
>
> but I’d like to print the standard error of the variance component. I think
> it is possible with the new version of the lme4 package. How it can be
> obtain?
>
>
>
> Thanks in advance,
>
>
> Martí
>
>
>
More information about the R-sig-mixed-models
mailing list