I have been using mixed effect models to analyzing neuroimaging datasets with multiple scanning sessions per participant. All my previous models only included a random intercept, and it was not until recently that I heard about random slopes.

I am still uncertain about when I should be using a random intercept and slope in my mixed effect models? Any practical or theoretical insight would be greatly appreciated.

This is a general question, but for the sake of example lets say I am testing a hypothesis that there will be a negative relationship between total brain volume and depression severity symptoms (both variables are numeric). In this case, I am trying to control for age at scan since there are inconsistent intervals between scan sessions across all participants. Therefore, should I include a random intercept and random slope of age?

gamm4(GreyMatterVol ~ s(AgeAtScan, k=4) + DepressionSeverity, random=as.formula(~(1|sub), data=alltimepoints, REML=T)$gam

More Robert Jirsaraie's questions See All
Similar questions and discussions