AFNI version info: AFNI_23.0.03 'Commodus'
Hello,
I was wondering how to specify a continuous quantitative variable (BMI) in a 3dMVM contrast? And is it possible to include a quantitative variable in a glt?
Here is my code currently and the goal is to calculate a 2-way interaction between task (ER: emotion regulation & FR: food regulation) by sex and by bmi:
> 3dMVM -prefix MVM_task_by_sex_by_bmi -jobs 4 \
> -bsVars "bmi*sex" \
> -wsVars "task" \
> -qVars "bmi"
> -num_glf 2 \
> -glfLabel 1 task_sex -glfCode 1 'sex : 1*male -1*female task : 1*ER -1*FR' \
> -glfLabel 2 task_bmi -glfCode 2 'bmi : 1*bmi task : 1*ER -1*FR' \
> -num_glt 2 \
> -gltLabel 1 male_task -gltCode1 'sex : 1*male task : 1*ER -1*FR' \
> -gltLabel 2 female_task -gltCode2 'sex : 1*female task : 1*ER -1*FR' \
> -dataTable \
Thank you for your help!
aloijm
July 16, 2023, 8:59pm
2
In your data table, you would have a column that has the value of bmi for each individual row.
Yep, I have that in my data table, here's a small piece of it:
Subj sex task bmi InputFile \
SKY0xxx male ER 0.85525 /pathtodata/SKY0xxx_ER_combined+tlrc \
I was hoping to get confirmation from others that my contrast is set-up correctly and if a quant variable can be used in a glt?
Thank you.
Gang
July 17, 2023, 2:52pm
4
I have two suggestions:
(1) It is important to center bmi
within each sex before feeding the values into the data table. And then add option -qVarCenters 0
to your script.
(2) Change the following
-num_glf 2 \
-glfLabel 1 task_sex -glfCode 1 'sex : 1*male -1*female task : 1*ER -1*FR' \
-glfLabel 2 task_bmi -glfCode 2 'bmi : 1*bmi task : 1*ER -1*FR' \
-num_glt 2 \
-gltLabel 1 male_task -gltCode1 'sex : 1*male task : 1*ER -1*FR' \
-gltLabel 2 female_task -gltCode2 'sex : 1*female task : 1*ER -1*FR' \
to
-num_glt 4 \
-gltLabel 1 task_sex -gltCode 1 'sex : 1*male -1*female task : 1*ER -1*FR' \
-gltLabel 2 task_bmi -gltCode 2 'task : 1*ER -1*FR bmi :' \
-gltLabel 3 male_task -gltCode 3 'sex : 1*male task : 1*ER -1*FR' \
-gltLabel 4 female_task -gltCode 4 'sex : 1*female task : 1*ER -1*FR' \
Gang
Hi Gang,
Thank you for your help with this. I made those changes and now I'm getting the following error:
** Error:
The number of -gltCode is not consistent with that
specified by -num_glt 4
Here's the beginning of my code:
3dMVM -prefix MVM_task_by_sex_by_bmi -jobs 4 \
-bsVars "bmi*sex" \
-wsVars "task" \
-qVars "bmi" \
-qVarCenters 0 \
-num_glt 4 \
-gltLabel 1 task_sex -gltCode 1 'sex : 1*male -1*female task : 1*ER -1*FR' \
-gltLabel 2 task_bmi -gltCode 2 'task : 1*ER -1*FR bmi :' \
-gltLabel 3 male_task -gltCode3 'sex : 1*male task : 1*ER -1*FR' \
-gltLabel 4 female_task -gltCode4 'sex : 1*female task : 1*ER -1*FR' \
-dataTable \
Thank you in advance for your help!
Gang
August 22, 2023, 3:27am
6
Change the following two lines
-gltLabel 3 male_task -gltCode3 'sex : 1*male task : 1*ER -1*FR' \
-gltLabel 4 female_task -gltCode4 'sex : 1*female task : 1*ER -1*FR' \
to
-gltLabel 3 male_task -gltCode 3 'sex : 1*male task : 1*ER -1*FR' \
-gltLabel 4 female_task -gltCode 4 'sex : 1*female task : 1*ER -1*FR' \
Gang