[R-sig-ME] Confidence Intervals on Fitted Values from lmer

Corey Godfrey Corey.Godfrey at cadmusgroup.com
Fri Oct 1 22:17:48 CEST 2010

Yes, that seems to be the tricky part. I am able to extract what I need for the fixed effects from the variance-covariance matrix. However, the resulting confidence intervals are much wider than I believe they should be. I think this might be because the random effects are helping to explain some of the variance in the data, resulting in "significant" t-values on my fixed effects of interest, but they (the random effects) are not included in the calculation of the confidence intervals. Therefore, a plot of the fitted values and  confidence intervals appears to show a non-significant association between fitted values and my fixed effect of interest (i.e., you could draw a straight line between the CIs).

I apologize for not including the code in my post, but it is quite lengthy. I am also not a statistician or an expert in R, so am doing my best to explain this problem without getting in too far over my head.

-----Original Message-----
From: dmbates at gmail.com [mailto:dmbates at gmail.com] On Behalf Of Douglas Bates
Sent: Friday, October 01, 2010 3:55 PM
To: Corey Godfrey
Cc: r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] Confidence Intervals on Fitted Values from lmer

On Fri, Oct 1, 2010 at 2:33 PM, Corey Godfrey
<Corey.Godfrey at cadmusgroup.com> wrote:
> Hello,

> I would like to plot confidence intervals around the fitted values of a mixed effects model. Is this advisable? If so, is there a method for doing so?

First you need to decide what kind of confidence interval you have in
mind, involving the fixed-effects parameters only or both the fixed-
and random-effects.  You may be able to get what you want from the
variance-covariance matrix for the estimates of the fixed-effects
parameters, available as vcov(fittedModel), but I can't guarantee it.
I would need to think more carefully about the interpretation of the
various types of variability.

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