[R-sig-ME] Confidence intervals for effects in glmer()

CL Pressland Kate.Pressland at bristol.ac.uk
Tue Jun 9 11:57:02 CEST 2009


Dear fellow novice,

I've used mcmc to estimate confidence intervals in lme4. You don't need the 
coda package as it's included in lme4 now. For you it would look like this:

fit4.mcmc<-mcmcsamp(fit4, n=1000) #or whatever resample number you think is 
appropriate
HPDinterval(fit4.mcmc)	#this will fit to alpha 0.05 as default.

As far as I am aware this is a fairly good method of estimating CIs in 
mixed models, but Ben are you saying that there may be issues with this 
process?

Kate

--On 08 June 2009 19:40 -0400 Ben Bolker <bolker at ufl.edu> wrote:

>   It depends on what approximations you're willing to accept.
>
>   Crudely doing +/- 2 standard deviations, or (DANGER DANGER)
> using the 'known' df to compute t-scores (the "gm1" example
> given in ?glmer has a fairly straightforward structure, with
> 15 groups):
>
> library(lme4)
> example(glmer)
> s <- summary(gm1)@coefs
>
> fac <- 2
> s[,"Estimate"]+fac*outer(c(-1,1),s[,"Std. Error"])
>
> fac <- qt(0.975,df=14)
> s[,"Estimate"]+fac*outer(c(-1,1),s[,"Std. Error"])
>
>
>   Does anyone know the current status of mcmcsamp,
> either for LMMs or for GLMMs ... ?
>
>   Ben Bolker
>
> Robert A. LaBudde wrote:
>> This may be blindingly obvious to the casual observer, but I'm
>> chagrined to admit I'm stumped.
>>
>> I'm fitting a simple mixed effect logistic model using 'lme4':
>>
>> require('lme4')
>> fit4<- glmer(x ~ 1 + 1|lab, data=eg, nAGQ=5, family='binomial')
>> summary(fit4)
>> ranef(fit4)
>>
>> I would like 95% confidence intervals on 'lab' and the residuals effects.
>>
>> Using lme() in 'nlme', I had the function intervals() available. Now I
>> don't.
>>
>> Any hints to de-perplex a novice?
>>
>> Thanks.
>> ================================================================
>> Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: ral at lcfltd.com
>> Least Cost Formulations, Ltd.            URL: http://lcfltd.com/
>> 824 Timberlake Drive                     Tel: 757-467-0954
>> Virginia Beach, VA 23464-3239            Fax: 757-467-2947
>>
>> "Vere scire est per causas scire"
>>
>> _______________________________________________
>> 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 / www.zoology.ufl.edu/bolker
> GPG key: www.zoology.ufl.edu/bolker/benbolker-publickey.asc
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



----------------------
Kate Pressland
Office D95
School of Biological Sciences
University of Bristol
Woodland Road
Bristol, BS8 1UG

Kate.Pressland at bristol.ac.uk




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