3dLME syntax and sex as a variable

Hi everyone. This one is probably for Gang,
I have 2 quick questions about 3dLME syntax.

Currently I have 2 within-subjects fixed variables - cs (csm, csp, cst) and scan (scan1, scan2) - and I’d like to investigate the difference between each cs within the same scan and between the same cs between the two scans. So I’d like t-test between csm & csp, csm & cst, and csp & cst during scan1 and then during scan2 while also getting t-tests between the csm in scan 1 and the csm in scan2 (and also the csp & cst). I have set up my 3dLME call as follows with gltCode 1-6 for the companions within the same scans the gltCode 7-9 for the comparisons between the same cs but different scans. While I think the first 1-6 are right looking at the help page for 3dLME, the contrasts 7-9 threw me off because there were no examples of 2 within-subjects variables so I just want to ensure this will get me the contrasts I am looking for.


3dLME -prefix LME_test1 -jobs 24 \
-model "cs*scan+sex+stais+stait" \
-qvars "sex,stais,stait" \
-ranEff '~1+CS" \
-SS_type 3 \
-num_glt 9 \
-gltLabel 1 'csm-csp1' -gltCode 1 'cs : 1*csm -1*csp scan : 1*scan1' \
-gltLabel 2 'csp-cst1' -gltCode 2 'cs : 1*csp -1*cst scan : 1*scan1' \
-gltLabel 3 'csm-cst1' -gltCode 3 'cs : 1*csm -1*cst scan : 1*scan1' \
-gltLabel 4 'csm-csp2' -gltCode 4 'cs : 1*csm -1*csp scan : 1*scan2' \
-gltLabel 5 'csp-cst2' -gltCode 5 'cs : 1*csp -1*cst scan : 1*scan2' \
-gltLabel 6 'csm-cst2' -gltCode 6 'cs : 1*csm -1*cst scan : 1*scan2' \
-gltLabel 7 'csm1-csm2' -gltCode 7 'cs : 1*csm scan : 1*scan1 -1*scan2' \
-gltLabel 8 'csp1-csp2' -gltCode 8 'cs : 1*csp scan : 1*scan1 -1*scan2' \
-gltLabel 9 'cst1-csmt' -gltCode 9 'cs : 1*cst scan : 1*scan1 -1*scan2' \
-num_glf 2 \
-glfLabel 1 'csm-csp1' -glfCode 1 'scan : 1*scan1 cs : 1*csm -1*csp & 1*csm -1*cst' \
-glfLabel 2 'csm-csp2' -glfCode 2 'scan : 1*scan2 cs : 1*csm -1*csp & 1*csm -1*cst' \
-dataTable @table.txt

My last question - I have read in another post you can’t have something like a ‘sex’ variable in your model as I have above because it is not quantitative. is this true? The ‘condition’ codes in the examples are not quantitative either but then these are not covariates. Since I am interested in controlling for sex in my model is there a way to include this kind of information or no?

Thanks Gang!

EDIT: I thought of one more question in the meantime. For the input files should these be the appropriate sub-briks of the stats dataset (like in the 3dANOVAs) or something else like the REML datasets?

I assume that the variables “sex”, “stais” and “stait” are between-subjects in the sense that they don’t vary within subject. If so, 3dMVM would be a better choice unless you have missing data. And the script would be roughly the same except for the first few lines.

the contrasts 7-9 threw me off

They look fine and don’t differ in principle from the first 6 post hoc tests.

-num_glf 2
-glfLabel 1 ‘csm-csp1’ -glfCode 1 ‘scan : 1scan1 cs : 1csm -1csp & 1csm -1cst’
-glfLabel 2 ‘csm-csp2’ -glfCode 2 'scan : 1
scan2 cs : 1csm -1csp & 1csm -1cst’ \

These two tests are essentially t-tests, so include them as part of -gltCode

I have read in another post you can’t have something like a ‘sex’ variable in your model as
I have above because it is not quantitative. is this true?

Of course you can incorporate ‘sex’ into the model. I cannot see how you coded ‘sex’ in the table; however, I strongly suggest that you treat ‘sex’ as a categorical variable (factor), not quantitative variable even if you code it as something like 0 and 1 (or something else). It would be much more straightforward and less error-prone if you let the program to handle a factor.

The ‘condition’ codes in the examples are not quantitative either but then these are not covariates.

It seems that your definition of a “covariate” is a variable you don’t care about. I don’t adopt that connotation because a variable is treated the same regardless of the extent of interest from the investigator.

For the input files should these be the appropriate sub-briks of the stats dataset (like in the
3dANOVAs) or something else like the REML datasets?

Sub-brick specifications are fine as input for 3dMVM and 3dLME.