3dlme with multiple covariates of interest

Hi everyone!

I’m looking to set up a 3lme with two covariates of interest that are continuous variables. Below is my model and the error message that I’m getting. Any ideas what I could be doing wrong? The script runs fine if I only use one covariate of interest under my gltcode. Thanks!!

3dLME -prefix LME_TaskxSexxRunxPercHDDxCravProv_covaryAgeDaysLastDrink.nii.gz -jobs 30
-mask /home/mr2649/YSC1/bioimagesuite35/images/MNI_T1_2mm_mask.nii.gz
-model ‘Age+DaysDrk+TaskSexTimepercHDDCravP’
-SS_type 3
-qVars ‘Age,DaysDrk,percHDD,CravP’
-qVarCenters ‘35.9,17.26,11.35,0’
-ranEff ‘~1+CravP’ \
-resid LME_TaskxSexxRunxPercHDDxCravProv_covaryAgeDaysLastDrink_resid.nii.gz
-num_glt 2 \
-gltLabel 1 ‘Male_stress_HDD_CravP’ -gltCode 1 'Gender : 1Male Task : 1stress percHDD : CravP : ’
-gltLabel 2 ‘Male_drug_HDD_CravP’ -gltCode 2 ‘Gender : 1Male Task : 1drug percHDD : CravP :’
-dataTable
Subj Sex Age percHDD DaysDrk CravP Time Task InputFile
pa0080 Male 47 34 85 -0.14 early stress …/…/…/Common_paXXX_stress_orig.nii.gz
pa0086 Male 27 12 31 -2.14 early stress …/…/…/Common_paXXX_stress_orig.nii.gz

Sex = male or female
Time = early, mid or late
Task = stress, drug or neutral

These are just sample subjects and contrasts.

** Error:
Incorrect variable name in GLF coding: 1*stress

Warning messages:
1: In if (is.na(code[[n]][QVpos + 2])) { :
the condition has length > 1 and only the first element will be used
2: In if (QVpos == 1) outList[[1]][[n]] ← NA else outList[[1]][[n]] ← glfConstr(code[[n]][-(QVpos:(QVpos + :
the condition has length > 1 and only the first element will be used
3: In QVpos:(QVpos + 2) :
numerical expression has 2 elements: only the first used
4: In QVpos:(QVpos + 2) :
numerical expression has 2 elements: only the first used

I’m looking to set up a 3lme with two covariates of interest that are continuous variables.

The following two lines are not semantically meaningful:

-gltLabel 1 ‘Male_stress_HDD_CravP’ -gltCode 1 'Gender : 1Male Task : 1stress percHDD : CravP : ’
-gltLabel 2 ‘Male_drug_HDD_CravP’ -gltCode 2 ‘Gender : 1Male Task : 1drug percHDD : CravP :’ \

Could you explain as to what you’re looking for?

if I just include this line of code in a model TaskxTimexSexxCravP:

-gltLabel 1 ‘Male_stress_CravP’ -gltCode 1 'Gender : 1Male Task : 1stress CravP : ’ \

my understanding is that this contrast will show me regions of significant activation during stressful condition that predict craving in males. Of note here, the craving variable varies within cluster (so we have diff craving values for each condition (stress, neutral or drug) and for each subject - I have mean centered within cluster and included crav as a random effect).

if I just include this line of code in a separate model TaskxTimexSexxHDD:

-gltLabel 1 ‘Male_stress_HDD’ -gltCode 1 'Gender : 1Male Task : 1stress HDD : ’ \

my understanding is that this contrast will show me regions of significant activation during stressful condition that predict binge/heavy drinking days in males.

What I would like to know is if the activation in the regions that appear to predict craving during stress in males (or females) may be stronger among those males (or females) with higher % of binge drinking days (i.e., this relationship between stress and craving in males may vary as a result of heavy drinking days).

What I would like to know is if the activation in the regions that appear to predict craving during stress in males (or females)
may be stronger among those males (or females) with higher % of binge drinking days (i.e., this relationship between stress
and craving in males may vary as a result of heavy drinking days)

If I understand it accurately, you’re interested in the interaction between craving and binge drinking. In that case, add another column in your data table (e.g., calling it BC) that lists the product of craving and binge drinking (after proper centering), and then specify the model with something like

-model ‘Age+DaysDrk+TaskSexTimepercHDD+TaskSexTimeCravP+TaskSexTime*BC’

Would the following two lines be what you’re looking for?

-gltLabel 1 ‘Male_stress_HDD_CravP’ -gltCode 1 ‘Gender : 1Male Task : 1stress BC :’
-gltLabel 2 ‘Male_drug_HDD_CravP’ -gltCode 2 ‘Gender : 1Male Task : 1drug BC :’ \

Thank you so much for your help!

I ran the model you recommended and had no error messages. I did want to check in about two things:

  1. Centering: the CravP variable I pre-centered (within cluster) and under qVarCenters for this variable I listed 0, but the percHDD variable I entered as is and then centered it by including the mean under QVarCenters. That means when I multiplied the HDD and the Craving column to include in my data table, one was not mean centered, while the other one was. However, I’m not sure how 3dlme is handling centering behind the scene in this scenario, and was wondering whether it would have been better to just center both variables outside of 3dlme, then just multiply the two to get BC, and then enter centered percHDD, cravP and the two multiplied (i.e., BC) in the data table while listing zeroes under qVarCenters for all three variables (CravP, percHDD and BC)?

  2. Let’s say I found a significant activation in putamen for the following contrast:

-gltLabel 1 ‘Male_stress_HDD_CravP’ -gltCode 1 ‘Gender : 1Male Task : 1stress BC :’ \

What’s the best way to follow up that finding? I.e., how do I interpret this increased activation in the putamen?

Thank you so much again!!
Milena

Milena,

was wondering whether it would have been better to just center both variables outside of 3dlme, then just
multiply the two to get BC, and then enter centered percHDD, cravP and the two multiplied (i.e., BC) in the
data table while listing zeroes under qVarCenters for all three variables (CravP, percHDD and BC)?

Yes, it makes more sense to manually center both variables for craving and binge drinking, and then add the product of their centered values. Also, set the center values as

-qVars ‘Age,DaysDrk,percHDD,CravP,BC’
-qVarCenters ‘35.9,17.26,0,0,0’ \

Let’s say I found a significant activation in putamen for the following contrast:
-gltLabel 1 ‘Male_stress_HDD_CravP’ -gltCode 1 ‘Gender : 1Male Task : 1stress BC :’
What’s the best way to follow up that finding? I.e., how do I interpret this increased activation in the putamen?

For this interaction, the following two lines may help you sort out their interrelationship.

-gltCode 1 ‘Gender : 1Male Task : 1stress percHDD :’
-gltCode 1 ‘Gender : 1Male Task : 1stress CravP :’

Keep in mind that linearity is assumed in the current model. If nonlinearity exists, that may complicate the situation.

Hi Gang,

Happy New Year! Hope you had a restful break!

Thank you so much for your help thus far! I was wondering if there was an advantage (or perhaps a disadvantage) of using one model with all the interactions included (as your suggested model below):

-model ‘Age+DaysDrk+TaskSexTimepercHDD+TaskSexTimeCravP+TaskSexTime*BC’

vs. running three separate 3dlmes with each of the interactions run individually (see below):

-model ‘Age+DaysDrk+TaskSexTimepercHDD’
-model 'Age+DaysDrk+Task
SexTimeCravP’
-model ‘Age+DaysDrk+TaskSexTime*BC’

Thank you!
Milena

Milena,

Other considerations (e.g., causal inference) aside, the full model is appropriate if the interaction effect ‘BC’ is substantial. Among the three individual models, the last one “-model ‘Age+DaysDrk+TaskSexTime*BC’” is problematic because the main effects of binge drinking and craving are not properly accounted for. The other two models assume the absence of the effect for one of the two variables.