John Ashburner wrote:
>>Is there an explanation for the blobs shifting *towards* regions where
>>the T-statistic is 0 (even though the residuals are also 0)? This cannot
>>be an effect of masking. It may happen if the smoothing is done after
>>masking, but that is easily solved by masking after smoothing.
>
> Try copy/pasting the following one dimensional example, and you'll see the
> peak in the t field shifted towards the low noise region....
[SPM in 10 lines of code]
This is a very strange thing. Activation shifting away from the centre...
I modified the code a little by applying a mask (created from the
original data) after smoothing. The shifting of activity is an error
introduced by the smoothing (activity is smeared into air voxels, while
the noise is suppressed/removed). This is of course always a problem if
too much smoothing is used.
By applying the mask, the activation that was smeared into the air is
removed. But the masking thing will probably not work in other cases
(active centra close to, but not on the edge, will move towards
the edge). Using only little smoothing, and applying a mask afterwards,
may solve many of these problems.
I think this shifting of activity towards the edge of the brain is
something to really take into consideration. The amount of shifting
seems to be directly related to the amount of smoothing. I don't know
the exact relation though. It seems that `further investigation is
needed'...
With best regards,
Alle Meije
--
Brain Mapping Unit
Dept. of Psychiatry
University of Cambridge
Addenbrooke's Hospital
Cambridge CB2 2QQ
Tel: +44 (0)1223 336963
Fax: +44 (0)1223 336581
[log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% the most compact way of representing SPM and the GLM!
%
% written by John Ashburner
% (with some additional decorations)
%
h=1;
% Simulated data
Y = [randn(100,30)*.01 h+randn(100,30)*1];
Y(:,31) = Y(:,31) + kron([0 1 0 1 0 1 0 1 0 1]',ones(10,1)) *5; % Activation
% display the data as a matrix and orthographically (in t-direction)
subplot(3,3,1);imagesc(Y);title('Raw Simulated Data');
subplot(3,3,4);plot(Y');title('Raw Simulated Data');
% make a mask: include only voxels that are >1/8 times the mean intensity
MSK=mean(Y,1)>(h/16);
% Smoothed
Y = conv2(Y,exp(-[-20:20].^2/(2*10))/sqrt(2*pi*10),'same');
% display the smoothed data as a matrix and orthographically (in
t-direction)
subplot(3,3,2);imagesc(Y);title('Convolved Simulated Data');
subplot(3,3,5);plot(Y');title('Convolved Simulated Data');
% apply mask after smoothing
%Y = Y.*(ones(100,1)*MSK);
% Design matrix
X = [kron([0 1 0 1 0 1 0 1 0 1]',ones(10,1)) ones(100,1)];
% Contrast
c = [1 0];
subplot(3,3,3);imagesc(X);title('design matrix')
subplot(3,3,6);bar(c);title('contrast');
set(gca,'xlim',[.5 2.5],'ylim',[-.25 1.25],'xtick',[],'ytick',[]);
% This is SPM at its simplest....
beta = (X'*X)\X'*Y; % Beta image (beta0002.img)
res = sum((Y - X*beta).^2); % Residuals (ResMS.img)
con = c*beta; % Contrast image (con0001.img)
rms = sqrt(res/(100-2)*(c*inv(X'*X)*c')); % Projected standard
% deviation
t = rms; % define: rms = 0 -> t=0
ft=find(t); % only compute t statistic
t(ft) = con(ft)./rms(ft); % where rms > 0
subplot(3,3,7);plot(con);title('Contrast field');grid on
subplot(3,3,8);plot(t);title('t field');grid on
|