3
$\begingroup$

Background: I’m analyzing data with mixed-models (lmer in lme4) from an experiment that had RTs and Error Rates as dependent variables. This is a repeated-measures design with approximately 300 measurements for each of the 190 human subjects. The fixed-effects are 1 between-subjects experimental manipulation (dichotomous), 2 within-subjects experimental manipulations (both dichotomous), and 1 subject variable (continuous, centered). My uncorrelated random effects are the participants, and 2 stimulus characteristics. For the mixed-models, I’ve coded the experimental manipulations as a -.5/+.5 contrasts so that the parameters are estimates of the experimental effects and the intercept should be the grand mean.

The grand mean produced by the RT model (740 ms) does not match the mean I get if I average all of the individual trials (730 ms). Why does this happen?

A related question: the GLMM (binomial distribution, logistic link function) for error rates produces a parameter estimate with an associated Z-score that has an absolute value over 2, but when I look at the means (determined the same way as above) to examine this difference they are tiny and almost identical (0.01353835 vs. 0.01354846). What are the values that I can provide that support the reliable parameter estimate?

I have a feeling the discrepancy between my calculated means and the model estimates has something to do with the random factors (perhaps the grouping by subjects), but I’m not sure exactly what.

If I want to display descriptive statistics along with the table of mixed model estimates, how should these descriptive be determined? Any points to references, examples, etc. will be greatly appreciated.

If this is all just a brain fart on my part, please let me know that too.

Edit: It is probably also important to mention that the amount of trials and types of trials contributed are not the same for every person. The between-subject manipulation changes the proportions of the different trial types presented, and for RTs only correct trials were analyzed. There were, however, very few errors made.

$\endgroup$
  • $\begingroup$ How are you obtaining the predictions from the models? Are you just looking at the fixed effects coefficients, or are you actually computing predictions for each cell of the design (ex. via ezPredict)? $\endgroup$ – Mike Lawrence Jun 25 '11 at 6:04
  • $\begingroup$ I'm just looking at the fixed effect coefficients. Is that the wrong way to get my model predictions? $\endgroup$ – Matt Jun 25 '11 at 12:38
  • $\begingroup$ @Mike Lawrence I tried using your ezPredict to see if it could help me understand what's going on, but it wouldn't work on my lmer object -I think because my dichotomous predictor variables are not coded as factors. You seem to have a pretty good handle on these LMMs. Can you explain to me -or point me somewhere that can- why the intercept in my RT model is not the same as my observed grand mean? $\endgroup$ – Matt Jun 26 '11 at 1:03
  • $\begingroup$ ezPredict seems to work fine for me when I use it with models including 2-level variables that have been converted to +.5/-.5. What error did you encounter? By the way, if you don't want to go to the hassle of converting your variables, you can tell R to use "sum contrast" coding instead of the default "treatment contrast" coding. This is done via options(contrasts=c('contr.sum','contr.poly')). To revert to the default: options(contrasts=c('contr.treatment','contr.poly')) $\endgroup$ – Mike Lawrence Jun 26 '11 at 14:53
  • $\begingroup$ Here's the error I got: Error in if (grep("I(", vars[i], fixed = T)) { : argument is of length zero. Please let me know if you want me to provide you with any more information regarding my data and its structure. $\endgroup$ – Matt Jun 27 '11 at 2:31
2
$\begingroup$

With regards to your general observation that the grand mean predicted by the mixed effects model is not equal to the grand mean of the data, I believe that this is an expected behaviour and attributable to the fact that shrinkage occurs in mixed effects models. My understanding of shrinkage is that, taking your example of participants as random effects, the model's estimate of a given participant's effect is influenced by not only that participant's data but also the data from the other participants. The consequence of this is that each participant's effect becomes shrunk towards the grand mean in proportion to how deviant their raw mean is (as well as the relative variability of their data, I believe). The result is that the predictions from the model for even simple descriptives like the grand mean can vary from their raw counterparts.

For more on shrinkage and it's rationale, here's a link to section 7.3 "Shrinkage in mixed effects models" (bottom of page 275) from Baayen's "Analyzing Linguistic Data" text.

$\endgroup$
  • $\begingroup$ Thanks. That sounds about right to me. I'm going to post something about this on the mixed-models list to see if anyone concurs or has something to add. Also, when you have written up stuff using mixed models, what descriptives do you provide? $\endgroup$ – Matt Jun 27 '11 at 2:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.