I am interested in the effect of a continuous variable on some Y. I have 4 conditions crossed with participant and 1 observation per participant per condition. I fitted a linear mixed model using lme4 looking like this:

model <- lmer(Y ~ Cont + (1|Participant) + (1|Condition))

The model overfit when I included a random slope for participant (correlation of random slope and random intercept for participant close to 1.) so I left this out.

Now I looked at the fit regarding my participant intercepts and participants means and found a bias (depicted below, the solid line indicates the identity function). So intercepts were systematically overestimated for participants with low means and underestimated for participants with high means. I also looked at the correlation of the fixed effects and found a correlation of 0 (I did not center my continuous variable).

Am I still overfitting my data with this model or is this normal?

enter image description here

The residual plot looks like this:

enter image description here

  • $\begingroup$ What does the variable Cont represent? Also I understand the rationale for including a random effect for participants, but why include a random effect for condition? $\endgroup$ – Matt Barstead Aug 25 '17 at 11:16
  • $\begingroup$ Cont is the movement speed of the participants in each condition (one value per participant per condition). I understand your second question as 'Why a random and not a fixed effect for condition?': I am interested in the effect of my continuous variable and not in the specific effects for each condition - I'd rather generalize over all possible conditions. $\endgroup$ – V. F. Aug 25 '17 at 13:41

Your Answer

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

Browse other questions tagged or ask your own question.