[R-sig-ME] Standard errors for random effects

Ben Bolker bolker at ufl.edu
Thu Apr 1 17:21:47 CEST 2010


  I can't tell what the OP wanted.

  I added a bullet point to the FAQ explaining (*after* explaining that
it's a questionable thing to do) how you can get the (quadratic
approximation of) the standard deviations of the random effects
*variances* derived from the (numerical approximations of the) second
derivatives of the likelihood surface from an nlme fit.

  I've also (hope that's OK) added your comment below to the FAQ, under
a separate section.

Doran, Harold wrote:
> I don't think this is what the OP is referring to. If you want the standard errors of the conditional means, then you can extract them as follows:
> 
> (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
> attr( ranef(fm1, postVar = TRUE)[[1]], "postVar")
> 
> This is the variance/covariance matrix of the conditional means. So, grab what you need from the array here. The postVar argument is used to get the so called posterior means. However, I ssuepcta t some point this term will be deprecated and replaced with something more appropriate. 
> 
> -----Original Message-----
> From: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Luca Borger
> Sent: Thursday, April 01, 2010 10:55 AM
> To: Tahira Jamil; r-sig-mixed-models at r-project.org
> Subject: Re: [R-sig-ME] Standard errors for random effects
> 
> Hello,
> 
> no, as the sampling distribution of random effects/variance estimates is 
> usually strongly asymmetric and thus better alternatives should be used. See 
> the mail archives for posts by Douglas Bates or the drafts of his 
> forthcoming book or the wiki for mixed models:
> 
> http://glmm.wikidot.com/faq
> Standard errors of variance estimates
>   a.. Paraphrasing Doug Bates: the sampling distribution of variance 
> estimates is in general strongly asymmetric: the standard error may be a 
> poor characterization of the uncertainty.
>   b.. Alternatives?
>     a.. The development version of lme4, lme4a, allows for computing 
> likelihood profiles of variances.
>     b.. An MCMC-based approach (MCMCglmm, etc.) will provide posterior 
> distributions of the variance parameters: quantiles or credible intervals 
> (HPDinterval() in coda()) will characterize the uncertainty.
> 
> 
> 
> HTH,
> 
> Cheers,
> 
> Luca
> 
> 
> ----- Original Message ----- 
> From: "Tahira Jamil" <tahirajamil at yahoo.com>
> To: <r-sig-mixed-models at r-project.org>
> Sent: Thursday, April 01, 2010 10:41 AM
> Subject: [R-sig-ME] Standard errors for random effects
> 
> 
>> Hi
>> I am wondering how can we extract standard errors of random effects. Is it 
>> possible or not in lme4.
>> Best regards
>>
>> Tahira Jamil
>> PhD student
>> Biometris Wageningen
>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


-- 
Ben Bolker
Associate professor, Biology Dep't, Univ. of Florida
bolker at ufl.edu / people.biology.ufl.edu/bolker
GPG key: people.biology.ufl.edu/bolker/benbolker-publickey.asc




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