3dLME Grouping variables

Hello Team AFNI,

I am trying to run a multilevel model using 3dLME. I have two factors in the model, Group (2 levels) and Age (continuous; random effect). Initially, I coded Group as 1 and 0, so that the intercept is when Group=0 (see script A below). Then, I recoded Group as 0.5 and -0.5 (script B below), so that the intercept would be halfway between the two groups. However, this produced the exact same results as when Group was coded as 1 and 0. When I pull ROIstats and run the model separately in R, I get different results depending on how I coded Group.

So my questions are:

How does 3dLME treat the Group variable? And what does it feed into R?
Am I coding it correctly?

Script A

3dLME -prefix lme-B+C
-jobs 4
-model ‘Group*Age’
-qVars ‘Age’
-qVarCenters ‘14.79’
-ranEff ‘~1|Subj’
-resid lme-B+C-resid
-dataTable
Subj Group Age InputFile
A1 1 15.37 ‘input+tlrc[18]’
A1 1 17.45 ‘input+tlrc[18]’


A45 0 13.68 ‘input+tlrc[18]’
A45 0 16.01 ‘input+tlrc[18]’

Script B

3dLME -prefix lme-B+C
-jobs 4
-model ‘Group*Age’
-qVars ‘Age’
-qVarCenters ‘14.79’
-ranEff ‘~1|Subj’
-resid lme-B+C-resid
-dataTable
Subj Group Age InputFile
A1 0.5 15.37 ‘input+tlrc[18]’
A1 0.5 17.45 ‘input+tlrc[18]’


A45 -0.5 13.68 ‘input+tlrc[18]’
A45 -0.5 16.01 ‘input+tlrc[18]’

Thank you!
Jordan

Jordan,

Even though you dummy code the variable Group in both of your scripts, but you didn’t declare it as a quantitative variable. Therefore 3dLME simply treated it as a factor, and that’s why you got exactly the same result between the two approaches. To let 3dLME do what you intended to achieve, declare Group as a quantitative varialbe and center it properly with something like:

3dLME -prefix lme-B+C \
-jobs 4 \
-model ‘Group*Age’ \
-qVars ‘Group,Age’ \
-qVarCenters ‘0,14.79’ \
-ranEff ‘~1|Subj’ \
-resid lme-B+C-resid \