AM script not producing AM output

Hello AFNI experts!

I have a perplexing problem. I have previously run amplitude modulation scripts (very very similar to the one I’ll share below) and successfully got output for both the #0_coef as well as the #1_coef amplitude modulator. When I looked at the X.xmat.1D file I similarly correctly saw my standard regressor, then my demeaned AM regressor.

However, I re-ran a very similar script (pasted below) and am now no longer seeing the #1_coef output. I am only seeing the standard regressor (#0_coef). Similarly, when I look at the X.xmat.1D plot, I only see my standard regressors, not any AM regressors. I’m wondering what went wrong here? Thank you so much! I have pasted things I hope are helpful below. I’m happy to email/post any other useful information. THANK YOU!

  1. Stimulus timing file example for anticipation_agg.1D. there are three runs (three rows) with my onset*AM:duration this is how I had my timing files set up before as well. They were just broken down into conditions (e.g., anticipation_condition1_agg.1D + anticipation_condition2_agg.1D = the file you see here anticipation_agg.1D)

8.4516:3.016 30.62:3.017 41.1672:3.017 52.7342:3.016 65.82:3.017 78.3672:3.017 89.9342:3.016 1002:3.017 113.5672:3.017 125.6342:3.016 138.22:3.017 151.2676:3.016 162.3335:3.017 186.9834:3.017 198.556:3.017 208.6172:3.016 220.6832:3.017 233.256:3.017 243.8176:3.016 256.8836:3.017 281.0336:3.017
8.464
4:3.016 30.5974:3.017 41.1646:3.016 52.736:3.017 65.7972:3.017 78.3634:3.017 89.932:3.017 113.582:3.017 125.6472:3.016 138.2132:3.017 151.286:3.017 162.3476:3.016 173.4135:3.017 186.982:3.016 198.5465:3.017 208.6135:3.017 220.682:3.016 233.2462:3.017 243.8132:3.017 256.882:3.016 270.4462:3.017 281.0132:3.016
8.473
2:3.017 18.542:3.016 30.6062:3.017 41.1736:3.017 52.742:3.016 65.8062:3.017 78.3735:3.016 89.9396:3.017 100.0066:3.017 113.5732:3.016 125.6396:3.017 138.2062:3.017 151.2736:3.016 162.3396:3.017 173.4066:3.016 186.9726:3.017 198.5396:3.017 208.6066:3.016 220.6722:3.017 233.2392:3.017 243.8062:3.016 256.8722:3.017 270.4392:3.016 281.005*2:3.017

  1. Here is some output from stats.s1712.HEAD

type = string-attribute
name = BRICK_LABS
count = 398
'Full_Fstat~Ant#0_Coef~Ant#0_Tstat~Ant_Fstat~FB#0_Coef~FB#0_Tstat~FB_Fstat~Resp#0_Coef~Resp#0_Tstat~Resp_Fstat~Missing#0_Coef~Missing#0_Tstat~Missing_Fstat~Task.V.BL_GLT#0_Coef~Task.V.BL_GLT#0_Tstat~Task.V.BL_GLT_Fstat~Ant.V.BL_GLT#0_Coef~Ant.V.BL_GLT#0_Tstat~Ant.V.BL_GLT_Fstat~FB.V.BL_GLT#0_Coef~FB.V.BL_GLT#0_Tstat~FB.V.BL_GLT_Fstat~Resp.V.BL_GLT#0_Coef~Resp.V.BL_GLT#0_Tstat~Resp.V.BL_GLT_Fstat~

  1. Here is my individual level analysis script. I am specifying the [1] when setting up my glt’s so I’m unsure why I appear to still be getting either the standard regressor alone or a sum of #0 + #1. Thank you!

    afni_proc.py -subj_id $subj
    -dsets $subj_dir/func/sub-${subj}_task-seat_run-1_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
    $subj_dir/func/sub-${subj}_task-seat_run-2_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
    $subj_dir/func/sub-${subj}_task-seat_run-3_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
    -scr_overwrite
    -script $results/$subj/proc.$subj.$GLM
    -out_dir $subj.results.$GLM
    -blocks blur mask scale regress
    -copy_anat $subj_dir/anat/sub-${subj}_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz
    -blur_size 6
    -regress_est_blur_errts
    -regress_run_clustsim yes
    -regress_stim_times_offset -0.831
    -regress_stim_times $stimdurmoddir/anticipation_agg.1D
    $stimdurmoddir/feedback_agg.1D
    $stimdurmoddir/response_agg.1D
    $stimdurmoddir/missing_agg.1D
    -regress_stim_labels Ant
    FB
    Resp
    Missing
    -regress_stim_types ‘AM1’
    -regress_basis_multi ‘dmBLOCK(0)’
    -regress_make_ideal_sum IDEAL_sum.1D
    -regress_motion_file $topdir/derivatives/afni/confounds/sub-${subj}/sub-${subj}_task-seat_allruns_motion.1D
    -regress_motion_per_run
    -regress_extra_ortvec $topdir/derivatives/afni/confounds/sub-${subj}/sub-${subj}_task-seat_allruns_aCompCor6.1D
    $topdir/derivatives/afni/confounds/sub-${subj}/sub-${subj}_task-seat_allruns_cosine.1D
    $topdir/derivatives/afni/confounds/sub-${subj}/sub-${subj}_task-seat_allruns_fd.1D
    -regress_extra_ortvec_labels aCompcor6 cosine fd
    -regress_opts_3dD
    -allzero_OK
    -GOFORIT 8
    -num_glt 4
    -gltsym ‘SYM: +Ant[1] +FB[1] +Resp[1]’ -glt_label 1 Task.V.BL
    -gltsym ‘SYM: +Ant[1]’ -glt_label 2 Ant.V.BL
    -gltsym ‘SYM: +FB[1]’ -glt_label 3 FB.V.BL
    -gltsym ‘SYM: +Resp[1]’ -glt_label 4 Resp.V.BL
    -cbucket cbucket.stats.$subj
    -jobs 30

    cd …
    end

Hi Megan,

Long story short: I think you should be using -regress_stim_types AM2 (rather than AM1).

Long story long: Amplitude modulation and duration modulation are somewhat different beasts.

AM1 means to assume any modulation effects (amplitude or duration), and make only 1 regressor, which contains both the mean and modulation effects. Making that assumption is uncommon (for the case of an actual amplitude modulator), one generally wants to see main effects and modulation effects separately.

Duration modulation never adds an extra regressor. It convolves the current ones to be for events of the given durations. So when doing DM, is it very common to use AM1 (if there are no actual amplitude modulators).

Use of AM2 is explicitly for the case where there is at least one modulation term attached to events (not including duration modulation). When using AM2, modulators will be modeled separately from the average response.

Since you have a modulation term, you should use AM2. Having a DM term does not really affect this.

To summarize:
If you only have DM, use AM1.
If you ever have a modulation term, use AM2 (probably).

Does this seem reasonable?

  • rick

Hi Rick,

Thank you very much! I will do so and see if that helps the output.

Best,
Megan