Output of 3dGroupInCorr

Dear AFNI experts,

I hope everyone is well! I have a (hopefully quick) question about the output of 3dGroupInCorr.

I ran:


cd "$deriv_dir" # change directory to where pre-processed files are

# define prefix
out_GroupInCorr=FC_task-"$task"_wholebrain_pearson

# set up FC
3dSetupGroupInCorr -mask $code_dir/$epi_mask_rest -prefix "$FC_dir"/$out_GroupInCorr -byte ./sub-*/func/*_task-"$task"_desc-fullpreproc_bold.nii.gz

cd "$FC_dir"
3dGroupInCorr -setA "$FC_dir"/$out_GroupInCorr.grpincorr.niml -verb -batch MASKAVE "$code_dir"/seeds_MMC


This creates an output file for each of my seeds (seedFC_*+trlc.) with 2 sub-bricks #0 FC_task-rest_mean and #1 FC_task-rest_Zscr.

Is it correct that what is shown in the 0th sub-brick shows the mean of arctanh(correlation)?

If so, is it correct to run the code below to create a #2 sub-brick containing the actual correlation values to use for, e.g. thresholding?


for (( r=0; r<${num_seeds}; r++)); do

	echo "${seeds[$r]}"

    # 0th sub brick shows mean of arctanh(correlation)
    # 1st sub brick shows Z score of t-statistic for above mean

    3dcopy ${seeds[$r]}+tlrc all_${seeds[$r]}+tlrc

    # compute actual correlation values
    3dcalc -a all_${seeds[$r]}+tlrc[0] -expr 'tanh(a)' -prefix corr_${seeds[$r]}

    # append volume
    3dTcat all_${seeds[$r]}+tlrc -glueto corr_${seeds[$r]}+tlrc

done

The volume corr_seedFC_*+trlc then has three sub-bricks as output (#0 FC_task-rest_mean #1 FC_task-rest_Zscr #2 FC_task-rest_mean. This is the output of 3dinfo for each sub-brick:

3dinfo -dmin -dmax corr_seedFC_[0]
-0.155135| 1.77568|
3dinfo -dmin -dmax corr_seedFC_
[1]
-8.48432| 13|
3dinfo -dmin -dmax corr_seedFC_*[2]
-0.153903| 0.944229|

Is it hence correct that they show the mean of arctanh(correlation), the Z score of t-statistic of the mean, and the mean of correlation respectively? I just want to make sure that I did not mess up my data before thresholding the maps based on the correlation maps.

Your insight is as always highly appreciated!

Thanks in advance,
Stef

[ul]
[li] It is correct that [0] and [1] are the mean of arctanh(correlation) and the Z-statistic/score of how far that mean is from 0.
[/li][li] However, it is not true that [2] is “the mean of correlation” – it is the tanh(mean of arctanh(correlation)) – which is somewhat different.
[/li][li] For example, take 3 values = 0.3, 0.6, 0.9, whose mean is obviously 0.6. However, the following calculation (using AFNI’s ccalc program) gives 0.677762 instead:
[/li]


ccalc 'tanh((atanh(0.3)+atanh(0.6)+atanh(0.9))/3)'

Which shows that the “stretching out” action of arctanh gives more weight to larger correlation values.
[/ul]

Dear Bob,

Thank you for your reply and for pointing out the issue of averaging correlations related to non-linear transformations.

Is there any way to actually derive the “mean of correlation” to threshold the maps at r=0.3?

From what I understand after discussing this with my supervisor, there are (at least) these three options:
[ul]
[li] Use 0th sub brick showing mean of arctanh(correlation) as input for 3dcalc -expr ‘tanh(a)’
[/li][li] Convert r=0.3 into arctanh(correlation) using ccalc ‘atanh(0.3)’
[/li][li] Run 3dGroupInCorr with the -sendall option to derive the individual arctanh(correlation) maps, then transform them back into correlation values using 3dcalc -expr ‘tanh(a)’, then average untransformed correlation values
[/li][/ul]

From experience with behavioural data and meta-analyses, my supervisor said that there no option is necessarily preferable. Is there any recommendation you could give based on your experiences with fMRI data? My dataset consists of 50 subjects with 600 time points.

Many thanks and best regards,
Stef