Hi Alex,
> Instead of thresholding a smoothed SPM t map in the GUI, i'd like to do
> that myself in matlab. To do so, I'd pass the t values from the SPM
> contrast to tcdf.m and threshold the returning p values. However, I am
> not sure how many degrees are correct in this case, since the t map has
> been smoothed beforehand. Is there a rule of thumb to determine the
> degrees of freedom here?
you can probably do this without using any spm functions, but there is
no need :) If you load the corresponding SPM.mat, all the information is
right there to do this, using something like
% get, read in SPM.mat
mat = spm_select(1, 'mat', 'Select SPM.mat', [], pwd, 'SPM.mat');
[p, nm, e, ~] = spm_fileparts(mat);
load(mat);
% read in original spmT
V_ori = spm_vol([p filesep 'spmT_0001.img']);
t_ori = spm_read_vols(V_ori);
t_ori(isnan(t_ori)) = 0;
% set, derive uncorrected threshold
thr = 0.001;
thr_uc = spm_u(thr,[1 SPM.xX.erdf],SPM.xCon(1).STAT);
% threshold original t-map
t_thr = t_ori > thr_uc;
% write out
V_ori.fname = [p filesep 'spmT_0001_thr.img'];
spm_write_vol(V_ori, t_thr);
... which seems to work for me. A similar approach can be taken for
fwe-corrected t-values using spm_uc, or FDR corrected t-values using
spm_uc_FDR.
I hope this helps,
Marko
--
____________________________________________________
PD Dr. med. Marko Wilke
Facharzt für Kinder- und Jugendmedizin
Leiter, Experimentelle Pädiatrische Neurobildgebung
Universitäts-Kinderklinik
Abt. III (Neuropädiatrie)
Marko Wilke, MD, PhD
Pediatrician
Head, Experimental Pediatric Neuroimaging
University Children's Hospital
Dept. III (Pediatric Neurology)
Hoppe-Seyler-Str. 1
D - 72076 Tübingen, Germany
Tel. +49 7071 29-83416
Fax +49 7071 29-5473
[log in to unmask]
http://www.medizin.uni-tuebingen.de/kinder/epn/
____________________________________________________
|