Hello fellow SPMers,
I am attempting to apply Friston's method of calculating p values for clusters because I have
diffuse activations in my data. I found a code on the SPM listserv to do this (kindly provided by
Tom Nichols):
load SPM.mat %load in the statistics file of interest
k = 6928; %number of superthreshold voxels in the cluster
%this bit comes from Tom
df = [1 SPM.xX.erdf]; % DF
u = spm_invTcdf(1-0.025,df); % uncorrected 0.05 thresh two-tailed
STAT = 'T'
R = SPM.xVol.R; % Resels
FWHM = SPM.xVol.FWHM;
v2r = 1/prod(FWHM(~isinf(FWHM))); %-voxels to resels factor
n = 1;
P = spm_P_RF(1,k*v2r,u,df,STAT,R,n) % Corrected cluster P
When I run the code, I get an error in spm_P_RF that says:
??? Error using ==> times
Matrix dimensions must agree.
Error in ==> spm_P_RF at 64
P = triu(toeplitz(EC'.*G))^n;
My inputs obtained from the code were:
R =
1.0e+05 *
0.0000 0.0031 0.2295 4.0973
u=2.2
v2r=9.9877
FWHM =
0.4712 0.5184 0.4100
Can anyone make sense of the error? The other thing that struck me as odd is a resels to voxel
factor greater than 1 (v2r). I was under the assumption that there should be far fewer resels than
voxels.... Also the FWHM is [0.4712 0.5184 0.4100], but I used a [12 12 12] FWHM
smoothing. What is the difference between SPM.xVol.FWHM and the FWHM smoothing that you
apply to the grey matter file during VBM? Thanks in advance for any suggestions/comments.
|