AFNI version info (`afni -ver`

):

Precompiled binary linux_centos_7_64: Aug 22 2021 (Version AFNI_21.2.05 'Nerva')

Hi,

I am using 3dLME to estimate the effect of trial type and age (and their interaction) on task-dependent functional connectivity previously calculated. In my current implementation, we have one within-subject variable which is task (3 levels - target, distractor, baseline) and one between-subject variable (age) as a quantitative variable. We previously were using 3dLME with predefined age groupings (young/middle/old), but after switching to age as a quantitative variable in the model we got vastly different results. While our new results are potentially real, I just want to make sure everything with my 3dLME implementation is right before interpreting the results.

For the model with age as a quantitative variable, here is an example of my code:

Note that my centering is the average age across all subjects

```
3dLME -overwrite -prefix ${output_file} \
-resid ${output_resids} \
-model "trialtype*age" \
-qVars "age" \
-qVarCenters "48.67142857142857" \
-ranEff '~1' \
-SS_type 3 \
-num_glt 6 \
-gltLabel 1 'targ-dist' -gltCode 1 'trialtype : 1*targ -1*dist ' \
-gltLabel 2 'dist-base' -gltCode 2 'trialtype : 1*dist -1*base ' \
-gltLabel 3 'targ-base' -gltCode 3 'trialtype : 1*targ -1*base ' \
-gltLabel 4 'trial_types' -gltCode 4 'trialtype : +1*targ -1*dist 1*base ' \
-gltLabel 5 'age' -gltCode 5 'age : ' \
-gltLabel 6 'age_trialtype_interaction' -gltCode 6 'trialtype : 1*targ -1*dist age : ' \
-dataTable \
Subj trialtype age InputFile \
101 targ 22 ${input_file}.101+tlrc[95] \
101 dist 22 ${input_file}.101+tlrc[98] \
101 base 22 ${input_file}.101+tlrc[101] \
...
```

My first question is a confirmation that everything there seems correct and there aren't any obvious errors? For testing the age x trial-type interaction does the model and gltCode appear accurate?

Next, I had a question about the gltCode for testing effects across three groups. In my original implementation of 3dLME where we used age groupings instead of continuous age, to get the age x trial type interaction I did the following:

```
-gltLabel 12 'age_trialtype_interaction' -gltCode 12 'agegroup : 1*young +1*middle -1*old trialtype : 1*targ -1*dist ' \
```

I am a bit confused on the proper way to add the 1 / +1 / -1 in front of the variables and how that impacts the direction with which the effect is being calculated and output. Is it possible that this glt is testing for effects where young and middle is greater than old, whereas in my 3dLME code with age as a quantitative variable the effect it is looking for is in the opposite direction, thus causing the different results? Any insight on this part would be helpful as well.

Happy to provide more information if it is helpful