And here is an example based on 1st level results. The differences in T values are pretty big, although the pattern is similar.I think I missed something in the code?TData = (beta_0001*Contrast(1)+beta_0002*Contrast(2))./(sqrt(ResMS*(Contrast*(X'*X)^(-1)*Contrast')));
Thanks,Chao-GanOn Wed, Oct 30, 2013 at 10:50 PM, YAN Chao-Gan <[log in to unmask]> wrote:Dear SPM experts,Recently I would like to calculate the values based on the estimated files (skip spm_results_ui), I followed the formulas in Page 20 of www.fil.ion.ucl.ac.uk/~mgray/Presentations/2nd level analysis- Design contrast & inference.pptX=SPM.xX.X;Contrast=[1 -1];TData = (beta_0001*Contrast(1)+beta_0002*Contrast(2))./(sqrt(ResMS*(Contrast*(X'*X)^(-1)*Contrast')));However, the results (Left in the attached figure) is slightly different from the results generated by spm_results_ui (Right in the attached figure). Furthermore, seems this difference is even bigger when applied to 1st level results (maybe due to the hidden high-pass filtering regressors?)I am wondering if the differences are caused simply by data precision, or I made something wrong in the above code?Thanks a lot for your time and help in advance!Best,Chao-Gan--Chao-Gan YAN, Ph.D.Research ScientistThe Nathan Kline Institute for Psychiatric Research, 140 Old Orangeburg Road, Orangeburg, NY 10962Center for the Developing Brain, Child Mind Institute, 445 Park Avenue, New York, NY 10022The Phyllis Green and Randolph Cowen Institute for Pediatric Neuroscience, New York University Child Study Center, New York, NY 10016-Initiating + Service NodeThe R-fMRI Network (RFMRI.ORG)--Chao-Gan YAN, Ph.D.Research ScientistThe Nathan Kline Institute for Psychiatric Research, 140 Old Orangeburg Road, Orangeburg, NY 10962Center for the Developing Brain, Child Mind Institute, 445 Park Avenue, New York, NY 10022The Phyllis Green and Randolph Cowen Institute for Pediatric Neuroscience, New York University Child Study Center, New York, NY 10016-Initiating + Service NodeThe R-fMRI Network (RFMRI.ORG)