Dear all I am interested in the GRF and statisitcs in the spm. I carried out some simulations to understand thresholding processes in spm and had questions about spatial extent test. I generated the 128*128 ramdom image having the unit variance and smoothed with a Gaussian kernel FWHM of 8 by 8. (Matthew's program was reffer to this analysis.) >From the spm course note, ch4, pp7, the uncorrected p for the spatial extent test is given by equation (6) and corrected p is given by equation (7). And I plot the theoretical probability of the spatial extent test when simulated images is thresholded at different Z values and different areas n. This script is: %----------------------------------- %This script uses matlab functions in spm 96. % %The parameters of simulated images:dimension=[128 128],smoothness=[8 8],volume=128*128. % %The corrected p value for spatial extent test for u=1:500;for k=1:100;pnumax(u,k)= spm_P(1,[8 8],u*0.01,k,128*128);end;end %The uncorrected p value for spatial extent test for u=1:500;for k=1:100;pnu(u,k)= 1-spm_kcdf(k,u*0.01,[8 8]);end;end figure; imagesc(pnu'); title('uncorrected p');xlabel('Z threshold * 100');ylabel('Extent threshold');colorbar figure;imagesc(pnumax'); title('corrected p');xlabel('Z threshold * 100');ylabel('Extent threshold');colorbar k=100;%Extent threshold figure;plot([1:500],pnu(:,k),[1:500],pnumax(:,k)); title(['Extent threshold' int2str(k)]);xlabel('Z threshold * 100');ylabel('Probability') u=400;%high threshold figure;plot([1:100],pnu(u,:),[1:100],pnumax(u,:)); title(['Z threshold' int2str(u)]);xlabel('Extent threshold');ylabel('Probability') %------------------------------------------------------------ >From the graph,the uncorrected p-value is greater than the corrected p-value by the combination of a certain u and k. Why is this? In this simulation, the probability of getting one or more clusters of size k or more, above high threshold u, almost corresponds to the corrected p-value. Thank you for your help, ----------------------------------------- Takanori Kochiyama Graduate School of Human and Environmental Studies, Kyoto University 京都大学大学院人間・環境学研究科(総合人間学部松村研究室) 河内山 隆紀 E-mail:[log in to unmask] Tel:+81 75 753 7862 ----------------------------------------- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%