How to get R^2 stats using afni_proc.py (resting state and 3dREMLfit)?

Hello afni experts,

what option can I use in afni_proc.py (in resting state and using reml) to get as additional output how much variance was removed by the noise model (including the motion regressors, tissue based regressors, drift etc). I would like to evaluate how much variance was removed for each subjects depending on the no of nuisance regressors I use.

Thank you very much for your help !
Carolin

Try adding option -rout to the afni_proc.py option -regress_opts_3dD. For example:

-regress_opts_3dD -rout

Hello Gang,
thank you very much for your reply. I tried your suggestion but it still does not output the R^2 stats. Maybe -rout does not output the R^2 stats for the error in resting state? Below is the script that I used:

afni_proc.py -subj_id ${subj}
-script proc.py_scripts_remltest/proc_${subj}.sh
-out_dir ${top_dir}${subj}/${subj}.3dDeconvolve_remltest
-dsets ${func_dir}pb04.P1002.scale_masked_Despiked_wds.nii.gz
-blocks regress -regress_reml_exec -regress_opts_reml -rout -regress_motion_file /tmp/mri2/hierarchical/BOLD_variability/data/P1/G1/P1002/P1002.preprocessedtest/dfile_rall.1D -regress_apply_mot_types demean deriv -regress_extra_ortvec ${stim_times_dir}cwm.1D ${stim_times_dir}ccsf.1D -regress_extra_ortvec_labels cwm ccsf

The only bucket datasets that I get are: TSNR.P1002 and stats.P1002_REMLvar. The last one contains the reml variance parameters. Do you have any other suggestion that I can try?

Best
Carolin

Carolin,

Maybe -rout does not output the R^2 stats for the error in resting state?

Indeed by default R^2 would not be provided for those regressors of no interest. Conceptually at least two issues seem to be involved: 1) remove the default option -nobout from the 3dDeconvolve command, and 2) bundle those regressors of no interest so that you would obtain the overall R^2. I’m not well-versed as to how to address the issues within the framework of afni_proc.py. Hope someone else will chip in and provide a solution.