I have (in my opinion) a nested data-set, which I want to analyze with a mixed effects model (R's lme4 function). I need help with the model specification. The data-set consists of three subject groups ('group': control, disease due to gene1, same disease due to gene2) with 15, 10 and 10 subjects respectively. The brain MRI of each subject was subdivided in 78 anatomical regions ('region') and for each region 1 observation of tissue integrity ('value') was made, so 2730 observations in total. The within-subject variability is high, as expected due to the different anatomical locations, whereas the between-subject variability in each region is low. Nevertheless, I am trying to find if there are anatomical regions showing different values between groups. What about this model?

m1 = lmer(value ~ group + region + (1|subj))

Thanks in advance!

  • $\begingroup$ That looks OK to me, you are fitting a random intercept model to account for the correlation between participants' scores. $\endgroup$
    – mdewey
    Dec 14, 2016 at 10:13
  • $\begingroup$ Your current model does not answer that question of "anatomical regions showing different values between groups". This would imply an interaction term between group and region. $\endgroup$
    – Niek
    Dec 14, 2016 at 10:35
  • 1
    $\begingroup$ @Niek region has 78 levels so an interaction may not be wise. $\endgroup$ Dec 15, 2016 at 18:47

1 Answer 1


I would advise caution. Your model:

m1 = lmer(value ~ group + region + (1|subj))

will estimate a fixed effect for group and a fixed effect for region, while controlling for the non-independence within subjects, which does not answer the question of "regions showing different values between groups" as mentioned in a comment on the OP. As also mentioned in that comment, an interaction term could help. However, in your case, the region variable has 78 levels so this would not seem wise.

An alternative approach is to model region as a random effect (random intercept) and specify group as a random coefficient:

m2 <- lmer(value ~ group + (1+group|region) + (1|subj))

Such a model will estimate a variance for the random effect of region (and subject), and the random coefficient for group will tell you if the effect of group differs among different regions


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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