Hi Anderson,
On returning to this to add my F-tests, I noticed that Flameo also generates "zfstat" files that appear to correspond to the fstat files. So that means maybe I don't need to manually convert the F-tests to Zstats using ftoz myself before running cluster correction?
However, when I use these Flameo generated files with cluster vs. my own generated fzstat files, I get totally different thresholding results. For example, when I manually use ftoz, using the degrees of freedom, I get rather large clusters surviving for all 4 of my f-tests. When I run cluster with the Flameo generated zfstat files, I get virtually no clusters across all 4 f-tests (at the same t=3.1 and p0.01 threshold).
So I am confused, because in theory they should be the same exact data, and therefore yield the same exact clusters. Can you please provide some insight as to (a) whether I am doing the ftoz wrong or (b) whether the zfstat represents something else, that I shouldn't use?
Thanks! see my code below, in case helpful.
Michelle
############# STEP 1 ############
#get smoothness estimates for the whole brain using mask
#DOF for design 3 = 225 - 83 = 142
smoothest -d 142 -r res4d.nii.gz -m mask.nii.gz >> cluster_correction/smoothness_output_wholebrain_mask.txt
########## STEP 2 convert your F stat files #########
foreach f(1 2 3 4)
# convert F test into Z test for design 1
# note sure if i need to do this... .
# number of columns in F test contrast = 24
# number of rows in contrasts = 142
ftoz -zout fzstat${f}_converted fstat${f} 24 142
#mask zstat image using ANATOMICAL brain mask
# "fzstat converted" version is the file I generated using ftoz
# "zfstat" version is the Flameo generated file
fslmaths zfstat${f}.nii.gz -mas mask.nii.gz zfstat${f}_mask.nii.gz
fslmaths fzstat${f}_converted -mas mask.nii.gz fzstat${f}_converted_mask.nii.gz
end
############# STEP 3 ############
#####cluster-wise hypothesis testing for voxels passing threshold tcd cl
#REQUIRES GETTING INPUTS FROM SMOOTHEST FILE
#DLH 0.0444563
#VOLUME 226501
#RESELS 104.047
cd cluster_correction/
foreach f (1 2 3 4)
# for "zfstat" version Flameo generated file
cluster -i ../zfstat${f}_mask.nii.gz -t 3.1 -o zfstat${f}_corrected_clusters_3.1_p.01 -d 0.044 --volume=226501 -p .01 --othresh=fsztat${f}_corrected_thresh_3.1_p.01.nii.gz > cluster_info_wholebrain_3.1_fzstat${f}_corrected_p.01.txt
# for "fzstat converted" - my version generated using ftoz
cluster -i ../fzstat${f}_converted_mask.nii.gz -t 3.1 -o fzstat${f}_converted_corrected_clusters_3.1_p.01 -d 0.044 --volume=226501 -p .01 --othresh=fzstat${f}_converted_corrected_thresh_3.1_p.01.nii.gz > cluster_info_wholebrain_3.1_fzstat${f}_converted_corrected_p.01.txt
end