Do I understand the current recommended approach?
Designs allowing t-tests
Here we can use the 3dttest++ function with the -Clustsim option. Is this the way to do it?
3dttest++ -prefix output_name -mask mask_sim+tlrc -Clustsim \
-setA \
sub003.results/stats.sub003+tlrc'[1]' \
sub007.results/stats.sub007+tlrc'[1]' \
etc...
Where the mask is the TT_N27+tlrc. mask resampled to the e.g. stats.sub01+tlrc.
How do you see the resulting tables when using -clustsim (and not -Clustsim) since I see no output in the terminal? -Clustsim at least gives me the tables in text-files.
Are the “warnings” in the output bewlow about “sh: 1: Syntax error: Bad fd number” dangerous?
++ 3dttest++: AFNI version=AFNI_16.2.09 (Aug 6 2016) [64-bit]
++ Authored by: Zhark++
++ 33511 voxels in -mask dataset
++ Number of -clustsim threads set to 12
++ loading input datasets
++ Memory usage now = 3,802,575 (3.8 million [mega])
++ t-testing:0123456789.0123456789.0123456789.0123456789.0123456789.!
++ ---------- End of analyses -- freeing workspaces ----------
++ Memory usage now = 5,500,667 (5.5 million [mega])
++ Creating FDR curves in output dataset
++ Smallest FDR q [1 SetA_Zscr] = 0.0121619
+ Added 1 FDR curve to dataset
++ Output dataset ./output_name+tlrc.BRIK
++ Output dataset ./TT.3eOS8yW1h6y.resid.nii
++ ================ Starting -clustsim calculations ================
+ ===== temporary files will have prefix TT.3eOS8yW1h6y =====
+ ===== running 12 -randomsign jobs (834 iterations per job) =====
+ #0 jobs command:
3dttest++ -DAFNI_AUTOMATIC_FDR=NO -DAFNI_DONT_LOGFILE=YES -randomsign 834 -nomeans -toz -mask mask_sim+tlrc -setA TT.3eOS8yW1h6y.resid.nii -prefix .//TT.3eOS8yW1h6y.000.nii
sh: 1: Syntax error: Bad fd number
++ 3dttest++: AFNI version=AFNI_16.2.09 (Aug 6 2016) [64-bit]
++ Authored by: Zhark++
++ 33511 voxels in -mask dataset
++ loading input datasets
++ Memory usage now = 2,261,659 (2.3 million [mega])
++ t-test randomsign:0sh: 1: Syntax error: Bad fd number
1sh: 1: Syntax error: Bad fd number
sh: 1: Syntax error: Bad fd number
2sh: 1: Syntax error: Bad fd number
3sh: 1: Syntax error: Bad fd number
4sh: 1: Syntax error: Bad fd number
5sh: 1: Syntax error: Bad fd number
6sh: 1: Syntax error: Bad fd number
sh: 1: Syntax error: Bad fd number
7sh: 1: Syntax error: Bad fd number
89.0123456789.0123456789.0123456789.0123456789.01!
++ ---------- End of analyses -- freeing workspaces ----------
++ Memory usage now = 363,437,159 (363 million [mega])
++ Output dataset .//TT.3eOS8yW1h6y.000.nii
+ ===== jobs have finished (42.47 s elapsed) =====
+ ===== starting 3dClustSim =====
3dClustSim -DAFNI_DONT_LOGFILE=YES -inset .//TT.3eOS8yW1h6y.???.nii -prefix TT.3eOS8yW1h6y.CSim -LOTS -both -nodec -cmd TT.3eOS8yW1h6y.CSim.cmd -mask mask_sim+tlrc
++ 3dClustSim: AFNI version=AFNI_16.2.09 (Aug 6 2016) [64-bit]
++ Authored by: RW Cox and BD Ward
++ 33511 voxels in mask (30.80% of total)
+ loading -inset './/TT.3eOS8yW1h6y.000.nii' with 834 volumes
++ -inset had 834 volumes = new '-niter' value
*+ WARNING: Smallest athr=0.01 ==> should have at least 1001 iterations instead of 834
++ Startup clock time = 0.3 s
++ Using 12 OpenMP threads
Simulating:0123456789.0123456789.0123456789.01234!
++ Clock time now = 5.0 s
*+ WARNING: pthr=0.000010 ; desired alpha=0.100000 -- but max simulated alpha=0.094724]
*+ WARNING: pthr=0.000010 ; desired alpha=0.100000 -- but max simulated alpha=0.094724]
+ [further messages about alpha are suppressed]
++ Clock time now = 6.4 s
++ Command fragment to put cluster results into a dataset header;
+ (also echoed to file TT.3eOS8yW1h6y.CSim.cmd for your scripting pleasure)
+ Append the name of the datasets to be patched to this command:
3drefit -atrstring AFNI_CLUSTSIM_NN1_1sided file:TT.3eOS8yW1h6y.CSim.NN1_1sided.niml -atrstring AFNI_CLUSTSIM_MASK file:TT.3eOS8yW1h6y.CSim.mask -atrstring AFNI_CLUSTSIM_NN2_1sided file:TT.3eOS8yW1h6y.CSim.NN2_1sided.niml -atrstring AFNI_CLUSTSIM_NN3_1sided file:TT.3eOS8yW1h6y.CSim.NN3_1sided.niml -atrstring AFNI_CLUSTSIM_NN1_2sided file:TT.3eOS8yW1h6y.CSim.NN1_2sided.niml -atrstring AFNI_CLUSTSIM_NN2_2sided file:TT.3eOS8yW1h6y.CSim.NN2_2sided.niml -atrstring AFNI_CLUSTSIM_NN3_2sided file:TT.3eOS8yW1h6y.CSim.NN3_2sided.niml -atrstring AFNI_CLUSTSIM_NN1_bisided file:TT.3eOS8yW1h6y.CSim.NN1_bisided.niml -atrstring AFNI_CLUSTSIM_NN2_bisided file:TT.3eOS8yW1h6y.CSim.NN2_bisided.niml -atrstring AFNI_CLUSTSIM_NN3_bisided file:TT.3eOS8yW1h6y.CSim.NN3_bisided.niml
+ ===== 3drefit-ing 3dClustSim results into ./output_name+tlrc.HEAD =====
++ 3drefit: AFNI version=AFNI_16.2.09 (Aug 6 2016) [64-bit]
++ Authored by: RW Cox
++ Processing AFNI dataset ./output_name+tlrc.HEAD
++ applying attributes
++ 3drefit processed 1 datasets
+ ===== deleting temp files TT.3eOS8yW1h6y.*.nii TT.3eOS8yW1h6y.*.niml =====
+ =============== -clustsim work is finished :-) ===============
A big question for me (probably just me being ignorant) is that when I run 3dttest++ without -Clustsim I get a dataset with a sub-brick with the mean and one with the t-scores, which to me makes sense. But when I add the -Clustsim option I get z-scores instead of t-scores. Can someone explain this?
Designs not allowing ttests, like 3dANOVA and 3dMVM
Here we cannot use the 3dttest++ method but have to run 3dClustsim separately.
First select a random subject so that I just can resample:
3dresample -inset TT_N27+tlrc. -master stats.sub003+tlrc. -prefix mask_sim
Then I use the errts for each subject in 3dFWHMx -acf to get the smoothness.
3dFWHMx -detrend -ACF NULL -input sub01.results/errts.sub01+tlrc. -mask mask_group_re_sam+tlrc.
Run this for all subjects and average the a b c coefficients. Then I need to simulate clusters using 3dClustsim. This function needs the dimensions and the smoothness so I run it using the re-sampled mask and the -acf parameters:
3dClustSim -acf avg(a) avg(b) avg(c) -mask mask_group_re_sam+tlrc.
This gives me the tables I need.
[b]These are the methods I use - Did I get anything wrong?
Thanks![/b]