Converting Pearson Correlation to Spearman Correlation in a Modulated GLM Analysis

Dear AFNI community,

I am currently conducting a modulated GLM analysis using the following 3dDeconvolve command:

3dDeconvolve -input pb01.imagery.r??.volreg+tlrc.HEAD \
    -censor txt/censor_imagery_combined_2.1D \
    -mask /data/fmri/freesurfer/subjects/MNI152/SUMA/ribbon_mask2+tlrc \
    -num_stimts 9 \
    -stim_times 1 txt/Mixed_sample.txt "BLOCK4(1.6,1)" -stim_label 1 "Sample" \
    -stim_times_AM2 2 txt/Mixed_delay_mod.txt "BLOCK4(5.6,1)" -stim_label 2 "Delay_mod" \
    -stim_times 3 txt/Mixed_probe.txt "BLOCK4(2,1)" -stim_label 3 "Probe" \
    -stim_file 4 txt/motion_demean.1D'[0]' -stim_label 4 "Roll" -stim_base 4 \
    -stim_file 5 txt/motion_demean.1D'[1]' -stim_label 5 "Pitch" -stim_base 5 \
    -stim_file 6 txt/motion_demean.1D'[2]' -stim_label 6 "Yaw" -stim_base 6 \
    -stim_file 7 txt/motion_demean.1D'[3]' -stim_label 7 "dS" -stim_base 7 \
    -stim_file 8 txt/motion_demean.1D'[4]' -stim_label 8 "dL" -stim_base 8 \
    -stim_file 9 txt/motion_demean.1D'[5]' -stim_label 9 "dP" -stim_base 9 \
    -tout -nofull_first -polort 3 -bucket tlrc_GLM_bycond/mod_glm_delay_cond -jobs 24

In this analysis, the delay_mod regressor has three levels: condition1, condition2, and condition3, corresponding to amplitude values 1, 2, and 3. However, actually these conditions only represent a rank order and not a numeric relationship.

In other words, the output I’m obtaining for each voxel is the Pearson correlation between the conditions, but I would prefer to calculate the Spearman correlation, given the rank-order nature of the conditions.

Is there a way to implement "Spearman regression" in place of "Pearson regression" within the context of this GLM analysis?

Thank you in advance for your help!

AM regression makes the assumption of a linear relationship between the modulator and the magnitude of the betas. If that relationship does not hold, particularly if there are only 3 such levels, they should be processed using separate regressors.

-rick

Thanks for your help!