[R-sig-ME] Extract standard error of the variance component in lme4 package (GLMM).

Ben Bolker bbolker at gmail.com
Wed Oct 15 15:54:30 CEST 2014


  If you really want them (with all the warnings about their often being
bad summaries of the uncertainty), http://rpubs.com/bbolker/varwald
gives a fairly straightforward recipe for getting the Wald standard
errors of the random effects standard deviations and correlations.

On 14-10-15 09:49 AM, Steve Walker wrote:
> 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í
>>
>>
>>
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



More information about the R-sig-mixed-models mailing list