# Setting up contrasts in lmer?

0

I have 139 subjects (ID), with measurements taken at two time points (Time1, Time2), at 148 brain regions, a dependent measure called volume, and a covariate called thickness.

Each subject has 148 brain regions with volume and thickness measured twice

I am trying to find out if there is a difference in volume between timepoint 1 and timepoint 2 while controlling for thickness. I want to know which brain regions show this difference. I need help setting up the contrasts.

I am using R. and trying to figure out a model with linear mixed models with (1|ID) as random factor, fixed factors regions, thickness. I have timepoint as factor with two levels 1 and 2

Data is longitudinally organized. Do I need to organize the regions by factors? I have them as Region 1,2,3,4 etc.

Model lmer(volume ~ time * region + thickness + (1 | ID)


How do I set up the contrasts and post hoc to find out regional differences in volume?

• I believe this paper (biorxiv.org/content/early/2018/02/20/238998) directly addresses the questions you're asking including the issue of multiple comparisons. They also have a program available for finding out regional differences. – bluepole Jan 13 '19 at 16:15

I would start with a global test to see if there are any differences between the regions. Because you have too many regions, you could do this using a random effect, e.g.,

fm1 <- lmer(volume ~ time + thickness + (1 | ID) + (time | region), data)


in which I assume that time is a factor with the first level corresponding to the first time point. Then you could look at the variance of the time random effect in the different regions. If this variance is statistically different than zero, this would tell you that in some regions there are differences between the two time points.

You could then look at which regions there is a difference fitting a model like

fm2 <- lmer(volume ~ time * region + thickness + (1 | ID), data)


and do a multiple testing correction for the p-values of the interaction terms using, e.g., the FDR method in p.adjust().

• How about to first test if there is a change in volume across all regions: all_regions <- **lmerTest::lmer(volume~ time + thickness + (1+thickness + time|ID), data = DATA)) – Sheraz Jan 14 '19 at 18:55
• And then same model for individual regions? (i.e. subset the data for each region) – Sheraz Jan 14 '19 at 18:56