[R] lmer binomial model overestimating data?
Thomas Lumley
tlumley at u.washington.edu
Mon Jun 19 20:33:26 CEST 2006
On Wed, 14 Jun 2006, Martin Henry H. Stevens wrote:
> Hi folks,
> Warning: I don't know if the result I am getting makes sense, so this
> may be a statistics question.
>
> The fitted values from my binomial lmer mixed model seem to
> consistently overestimate the cell means, and I don't know why. I
> assume I am doing something stupid.
Not really, there is something subtle going on. The model says that
logit E[Y|x, random effects] = x*beta+random effects
Now, when you compute the observed values you are averaging over the
random effects to get
E[E[Y|x, random effects]]= E[ invlogit(x*beta +random effects)]
where invlogit is the inverse of logit.
When you compute the fitted values you are also averaging, but on the
linear predictor scale to get
E[logit(E[Y|x, random effects])]= invlogit(x*beta)
The logit/unlogit operation is not linear, so these are not the same. In
fact, invlogit(x*beta) is always further from 1/2 than E[Y|X].
With linear regression it is useful and fairly standard to think of the
random effects part of a mixed model as giving a model for the covariance
of Y, seperate from the fixed-effects model for the mean of Y. With
generalized linear models these can no longer be separated: adding random
effects changes the values and the meaning of the fixed effects
parameters.
-thomas
More information about the R-help
mailing list