Hi everyone,

I'm fitting a straightforward glmer model with the family=binomial. I expected the mean of the random effect for the intercept to be near zero, but that isn't the case, as the mean is .91:

> (model.3 <- glmer(TA ~ 1 + Problem + Across + (1|PID), data=Data.Timed, family = binomial, nAGQ=100))
Generalized linear mixed model fit by the adaptive Gaussian Hermite approximation
Formula: TA ~ 1 + Problem + Across + (1 | PID)
   Data: Data.Timed
   AIC   BIC logLik deviance
 158.8 172.9 -75.38    150.8
Random effects:
 Groups Name        Variance Std.Dev.
 PID    (Intercept) 18.869   4.3439
Number of obs: 256, groups: PID, 64

Fixed effects:
            Estimate Std. Error z value Pr(>|z|)
(Intercept)  -1.1328     0.7304  -1.551   0.1209
Problem      -0.5864     0.2449  -2.394   0.0167 *
Across       -1.3768     0.4280  -3.217   0.0013 **
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
        (Intr) Problm
Problem -0.390
Across  -0.208 -0.150

 That is, I'm doing a mixed effects logistic regression. The PID is the participant ID; there are 4 Problems (essentially timepoints: 0, 1, 2, 3) and Across is a time-varying covariate (0, 1, 2, or 3).

The mean of the random effects is:
> colMeans(ranef(model.3)$PID[])
(Intercept)
  0.9137307

Additionally, the variance of the random effect is in the model output as 18.869, yet when I calculate the variance of the random effects directly, I get a much smaller value:
> var(ranef(model.3)$PID[])
            (Intercept)
(Intercept)    7.806402

Should I be surprised by either of the issues I note above? My concern is that I was planning on plotting the model implied curves using the fixed effects (so that the curves would represent an individual specific trajectory for a participant with a random effect of 0). Yet, there are no individuals with a random effect of zero and the mean is not zero. Thus, such a plot doesn't seem as useful as I initially thought it would.

Thanks for any thoughts on this,
Ken



	[[alternative HTML version deleted]]

