Hi AFNI experts,
I’m running an analysis and wanted to make sure I am correctly setting up the group-level model that includes a subject-specific covariate.
Subject-level model (3dDeconvolve)
For each subject, I run a GLM that includes trial-type regressors and motion parameters. The relevant portion of the script is:
3dDeconvolve \
-overwrite \
-input sub-${subj}_task-TASK_allrun_space-MNI152NLin2009cAsym_SI.nii.gz \
-mask sub-${subj}_space-MNI152NLin2009cAsym_GM_probseg_resampled.nii.gz \
-concat '1D: 0 343 686' \
-polort A \
-nobout \
-noFDR \
-num_stimts 6 \
-local_times \
-stim_times 1 Stim_Onset.txt 'GAM(8.6,0.547,6)' -stim_label Stim \
-stim_times 2 Determ_Onset.txt 'GAM(8.6,0.547,2)' -stim_label Determ \
-stim_times 3 PE_Pos_Onset.txt 'GAM(8.6,0.547,2)' -stim_label PE_Pos \
-stim_times 4 PE_Neg_Onset.txt 'GAM(8.6,0.547,2)' -stim_label PE_Neg \
-stim_times 5 Error_Stim_Onset.txt 'GAM(8.6,0.547,6)' -stim_label StimError \
-stim_times 6 Error_Feedback_Onset.txt 'GAM(8.6,0.547,2)' -stim_label FeedbackError \
-ortvec Motion.1D'[0..5]' MotionParam \
-ortvec Motion_deriv.1D'[0..5]' MotionParamDerv \
-num_glt 2 \
-gltsym "SYM: Determ +PE_Pos +PE_Neg" -glt_label General_Task \
-gltsym "SYM: 0.5*PE_Pos +0.5*PE_Neg -Determ" -glt_label Unsigned_PE_Effect \
-cbucket sub-${subj}_Trial_Type_betas.nii.gz \
-bucket sub-${subj}_Trial_Type.nii.gz \
-fitts sub-${subj}_fitts.nii.gz \
-errts sub-${subj}_errts.nii.gz
The GLT I’m interested in at the group level is the Unsigned_PE_Effect contrast.
For each subject, I also have a behavioral model-derived Asymmetry Index (AI).
AI is computed from subject-wise learning rates: (α_pos − α_neg) / (α_pos + α_neg).
I want to test, at the group level, whether the Unsigned PE contrast varies systematically as a function of AI.
What I think I should do
My current understanding is:
- Extract the GLT brick for Unsigned_PE_Effect from each subject’s bucket.
- Create a list file (
A_list.txt) containing one image per subject. - Create a covariates file (
ai.txt) containing subject IDs and their AI. - Use
3dttest++something like:
3dttest++ -prefix group_UnsignedPE_AI \
-setA A_list.txt \
-covariates ai.txt
My questions
- Is
3dttest++the correct tool, or should I be using3dMVMor3dLME, given that this is a single contrast per subject but with a subject-level covariate? - Is the covariate treated correctly by listing AI in a separate covariate table (one row per subject matching
setAorder)?
I want to make sure I’m setting up the parametric modulation by AI properly and not missing anything important.
Thank you in advance for any guidance — I really appreciate the help!
-- sahithyan