3dLMEr "Duplicates found in InputFile column!"

AFNI version info (afni -ver): AFNI_24.3.10

Hello,
We are looking to assess effects of brain change pre- to post-treatment on post-treatment symptoms. We want to see how this effect varies as a function of task condition and treatment type. To explain the variables in the model below:

  • Condition = task condition, negative versus positive pictures
  • Treatment = which kind of treatment they received in between scans
  • T1 = pre-treatment timepoint
  • T2 = post-treatment timepoint
  • GAD7 = the symptom score
  • Brain_change e.g. 101_change_Neg+tlrc = I used 3dcalc to create these change volumes, reflecting post-treatment minus pre-treatment activation.
  • InputFile e.g. 101-GAD7_T2+tlrc = I created "volumes" of symptom scores to use as the InputFile in 3dLMEr. So for example, in the script below, 101-GAD7_T2+tlrc refers to a volume where every "voxel" is the same number reflecting Subj 101's post-treatment symptom score.

I am getting the following error. I had assumed that, because there are two rows per subject reflecting the two task conditions, we would need to include random effects of subject and therefore we should use 3dLMEr. But maybe I am incorrect about that?

** ERROR: Duplicates found in "InputFile" column!!!
-- Note: Listed files are AFTER the 1st instance of the duplicates.
[2] 101-GAD7_T2+tlrc
[4] 102-GAD7_T2+tlrc
[6] 103-GAD7_T2+tlrc
[8] 104-GAD7_T2+tlrc
(etc)

My script is below with a portion of the data table:


3dLMEr -prefix Picture_ChtoCh_Cond -jobs 4  \
-model 'Brain_Change*Treatment*Condition+GAD7_T1+motion_T1+motion_T2+(1|Subj)' \
-resid errts.Picture_ChtoCh_Cond  \
-qVars 'motion_T1,motion_T2,GAD7_T1' \
-qVarsCenters '0.09,0.09,12.09' \
 -SS_type 3 \
 -mask MNI_mask_resampled+tlrc \
 -dataTable  \
  Subj motion_T1 motion_T2 Treatment Condition GAD7_T1 Brain_Change InputFile\
 101   0.166   0.1597   BA   Neg   10   ChangeFiles/101_change_Neg+tlrc   101-GAD7_T2+tlrc \
 101   0.166   0.1597   BA   Pos   10   ChangeFiles/101_change_Pos+tlrc   101-GAD7_T2+tlrc \
 102   0.0694   0.0654   BA   Neg   6   ChangeFiles/102_change_Neg+tlrc   102-GAD7_T2+tlrc \
 102   0.0694   0.0654   BA   Pos   6   ChangeFiles/102_change_Pos+tlrc   102-GAD7_T2+tlrc \
 103   0.1409   0.147   BA   Neg   7   ChangeFiles/103_change_Neg+tlrc   103-GAD7_T2+tlrc \
 103   0.1409   0.147   BA   Pos   7   ChangeFiles/103_change_Pos+tlrc   103-GAD7_T2+tlrc \
(etc)

I'm not entirely sure what the specific research question is for this analysis. Would computing the difference in Brain_Change between the two conditions for each participant as input address the issue?

Gang Chen

Thanks for the quick reply Gang! We would prefer not to compute a change score between conditions, because we don't expect large differences between the conditions. We were just wanting to include Condition in the model to account for any small differences there might be between the negative and positive task conditions. (To clarify - this is referring to brain activity to negative versus positive pictures in the task).

Our research question is whether the amount of pre- to post-treatment change in brain activity is related to the effectiveness of the treatment. The primary effects of interest are:

  • the Brain_change main effect
  • the Brain_change x Treatment interaction.

Another option, which might be more straightforward, would be to use 3dMVM to look at Brain_Change x Treatment effects in the Negative and Positive conditions separately.

We would prefer not to compute a change score between conditions, because we don't expect large differences between the conditions.

I'm still a bit confused about the data structure. By "a change score between conditions," do you mean the “post-treatment symptom score” shown in the last column of the data table? In other words, does each condition correspond to a separate score for each participant? If so, I’m puzzled why the two input files listed in the last column have the same filename for both conditions. Could you clarify?

Gang Chen

Yes, sorry to add confusion! I think I misunderstood your earlier response.

The InputFile, e.g. 101-GAD7_T2, is the post-treatment symptom score - this is what we are wanting to predict.

The thing that varies between Conditions (Positive versus Negative images) is the BrainChange variable. These files are separately computed to reflect pre- to post-treatment change in brain activity to Positive images and Negative images in our task.

We are wanting to know if the amount of change in brain activity relates to symptom outcomes. For example, participants whose brain activity to the images decreases pre- to post-treatment might also be participants who have low post-treatment symptom scores.

The InputFile is the same in both rows for a given participant because that participant only has one post-treatment symptom score. And we want to predict this using change in brain activity to Positive as well as Negative images.

Let me know if that helps to clarify!

Thanks!
Hannah

Hi Hannah,

Let me see if I’m understanding the data structure correctly: under the Pos and Neg conditions, the brain state shows a change from pre- to post-treatment, but the behavioral outcome (e.g., symptom score) remains constant for each participant across those conditions.

If that’s the case, there are both conceptual and technical challenges to consider. Conceptually, treating condition and brain state as explanatory variables would imply they influence the behavioral outcome; yet the outcome doesn’t vary. This raises a problem of causal interpretation: if there’s no observable change in the outcome, it’s hard to argue that either condition or brain state has an effect.

Technically, including condition and brain state as predictors of a non-varying outcome can lead to estimation issues in hierarchical models such as singular fits or zero variance estimates, since there's no variability for the model to explain.

Am I still missing something?

Gang Chen

Hi Gang,

OK, yes that completely makes sense. I don't think I was realizing that it is unusual to have a repeated measure when the outcome does not vary with this measure. I can see the conceptual and technical issues with doing this.

Thank you for your thorough explanation!

We will go with separate 3dMVM models for Neg and Pos.

Best,
Hannah