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!!
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
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:
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
I ran the model you recommended and had no error messages. I did want to check in about two things:
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)?
Let’s say I found a significant activation in putamen for the following contrast:
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
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.
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):
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.
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.