Voxel-wise whole-brain analysis question

Hey,

I know for voxel-wise whole-brain analysis, you can analyze which clusters/voxels of the brain show certain effects of interest. I think the model includes the brain voxel as the outcome variable and some behavioral variables as the regressors. But is there any tool that allow you to do it vice versa? I want to use a behavioral variable (A) as the outcome variable. And I want to see the gray matter volumes in which brain voxels/clusters (main effect) as well as their interaction with another behavioral variable (B) predict this outcome variable A, after controlling for multiple voxel-wise tests. In this case, the gray matter volume in each brain voxel is the regressor rather than the outcome variable. Is it possible to do that?

Thank you.

Siyuan

3dttest++, 3dMVM, 3dLME, and 3dLMEr are suitable options. To begin, convert the behavioral variable (A) into a voxel-level dataset for each individual using a command such as:

3dcalc -a template -expr 'A*step(a)' -prefix ...

Here, A represents the behavioral value for the individual, and template is a 3D dataset (e.g., gray matter volume or a mask). Subsequently, utilize the newly generated data as the outcome variable and consider the gray matter volumes as a voxel-level covariate in programs like 3dttest++.

Gang

Hi Gang,

Thank you so much for your input! I implemented this command to create the 3d data of this outcome variable A. Then I attempted to execute the following command:

3dLME -prefix afni_outputs/VBM_Wholebrain_interaction -jobs 2 \
-model "Sex*GMV+Age+TIV+IQR" \
-qVars "Age,TIV,IQR" \
-vVars "GMV"  \
-SS_type 3   \
-num_glf 1    \
-glfLabel 1 "Sex_GMVInteraction" \
-glfCode 1 "Sex : 1*Male & 1*Female GMV :"    \
-dataTable \
Subj GMV Sex Age TIV IQR InputFile \
1	GMV_001_3dvol+tlrc	Female	27	1346.84	84.04	behA_001+tlrc	\
4	GMV_004_3dvol+tlrc	Male	30	1593.69	84.43	behA_004+tlrc	\
...

The GMV_001_3dvol_tlrc is the voxel-wise GMV covariate, and the behA_001+tlrc is the newly created voxel-wise A outcome variable. I want to analyze the voxel-wise interaction between Sex and GMV on variable A.

However, I saw this error message:

~~~~~~~~~~~~~~~~~~~ Model test failed  ~~~~~~~~~~~~~~~~~~~
Possible reasons:

0) Make sure that R packages nlme and phia have been installed. See the 3dLME
help documentation for more details.

1) Inappropriate model specification with options -model, or -qVars.

2) In correct specifications in general linear test coding with -gltCode.

3) Mistakes in data table. Check the data structure shown above, and verify
whether there are any inconsistencies.

4) Inconsistent variable names which are case sensitive. For example, factor
named Group in model specification and then listed as group in the table hader
would cause grief for 3dLME.

** Error: 
   Quitting due to model test failure...

I guess it was because I set up the glfCode in an incorrect way? But I don't know what would be the more appropriate way to set it up. Could you help with it?

In addition, I guess I can just run 3dClustSim on the output file to obtain the cluster-wise corrected results?

Thank you!

Josie

Josie,

Is it the case that you don't really have any within-individual variables? If so, 3dLME is not a suitable program for your case. Use 3dMVM instead.

Also, I would be very careful with adding so many covariates in the model. What effects do you want to focus on?

Gang

Hi Gang,

Thank you for the reply! Yes I don't have any within subject variable. I will try 3dMVM instead. I want to focus on the interaction between Sex and the voxel-wise gray matter volume (GMV) on predicting the Behavioral variable A, after controlling for age, total intracranial volume (TIV), and image quality rating (IQR). I wonder if

-glfCode 1 "Sex : 1*Male & 1*Female GMV :"    

would still be the suitable way to set up the interaction? Or what would be the best way to define the interaction?

Thank you!

Josie

Josie,

what would be the best way to define the interaction?

For interaction, consider the following:

-num_glt 3    \
-gltLabel 1 "Male_GMV" \
-gltCode 1 "Sex : 1*Male GMV :"    \
-gltLabel 2 "Female_GMV" \
-gltCode 2 "Sex : 1*Female GMV :"    \
-gltLabel 3 "Interaction_GMV" \
-gltCode 3 "Sex : 1*Male -1*Female GMV :"    \

The inclusion of covariates is way much more complex than what is generally recognized in statistical modeling. To avoid some pitfalls, I would not include Age, TIV, and IQR in the model.

Gang

Hi Gang,

Thank you for this suggestion! I will try these commands. I understand the inclusion of covariates could make the model too complex, but we assume that these covariates would affect the effects and so we would still like to control for them. Or would it be better that we only include one covariate in the model?

Would commands below look good to you?

3dMVM -prefix afni_outputs/VBM_Wholebrain_interaction -jobs 2 \
-bsVars "Sex*GMV+Age+TIV+IQR"  \
-qVars "Age,TIV,IQR" \
-vVars "GMV"  \
-SS_type 3   \
-num_glt 3    \
-gltLabel 1 "Male_GMV" -gltCode 1 "Sex : 1*Male GMV :" \
-gltLabel 2 "Female_GMV" -gltCode 2 "Sex : 1*Female GMV :"  \
-gltLabel 3 "Interaction_GMV" -gltCode 3 "Sex : 1*Male -1*Female GMV :" \
-dataTable \
...

Thank you!

Josie

Including a covariate would likely improve the model fit, but data analysis requires more than simply letting the model dictate the results. Instead, domain knowledge should guide the selection of covariates. Traditional statistics textbooks and common data analysis practices often overlook the complexity and subtleties involved. Unfortunately, it is beyond the scope of this platform to delve into this topic.

Regarding your case, when considering only Sex and GMV, interpreting the interaction effects becomes straightforward. However, even for the main effects, careful handling is necessary for interpretation. On the other hand, adding other covariates (Age, TIV, and IQR) to the model can quickly complicate interpretation with various caveats.

Gang

Hi Gang,

Thank you for the suggestion. I executed the commands and saw a couple of coefficients generated, including a "Sex:GMV F", a "Interaction_GMV", and a "Interaction_GMV t". If I want to see the voxel-wise results (either F or t statistics) of the interaction effect (Sex*GMV), which output coefficient should I look at? Thank you!

Josie

I want to see the voxel-wise results (either F or t statistics) of the interaction effect (Sex*GMV)

The sub-brick labeled "Sex:GMV F" in the output provides an omnibus assessment of the interaction in the form of an F-statistic. In contrast, the sub-brick labeled "Interaction_GMV" shows the magnitude of the interaction, and "Interaction_GMV t" is the associated t-statistic. While "Sex:GMV F" represents the square of "Interaction_GMV t", the latter is more informative because it indicates the directionality (positive or negative).

Hi Gang,

Thank you so much for the reply! That is very helpful. I also tried to run the model with only one covariate because I did realize that including more covariates would further complicate the interpretation. However, it gave me this error:

Error in if (class(lop$dataStr[, ii]) == "factor") cat(nlevels(lop$dataStr[,  : 
  the condition has length > 1

Below was the new model that I tried to run:

3dMVM -prefix afni_outputs/VBM_Wholebrain_interaction_nocov -jobs 4 \
-bsVars "Sex*GMV+TIV"  \
-qVars "TIV" \
-vVars "GMV"  \
-SS_type 3   \
-num_glt 3    \
-gltLabel 1 "Male_GMV" -gltCode 1 "Sex : 1*Male GMV :" \
-gltLabel 2 "Female_GMV" -gltCode 2 "Sex : 1*Female GMV :"  \
-gltLabel 3 "Interaction_GMV" -gltCode 3 "Sex : 1*Male -1*Female GMV :" \
-dataTable @input_table_nocov.txt

I wonder if you have an idea of what might cause this error?

Thank you so much once again!

Josie

Josie,

Regarding the error message, could you provide a few lines of the file input_table_nocov.txt? This will help me better understand the issue and offer more precise assistance.

As for including variables in a model or program, one can always mechanically do so, and the program will generate results (except for certain numerical issues). However, it is essential to consider the interpretability of these results. With regard to the added variable TIV, is it meant to represent total intracranial volume? Also, does it vary between sexes? If that's the case, adding TIV to the model might complicate the interpretability of the results, and I advise caution against its inclusion.

Gang