Hi Donald, Thanks for the nice and helpful suggestion. I think it is the point that I missed in my data processing. Thanks again. Bests! ------------------------------------------------------------------- Hongjian He Zhejiang University, Hangzhou, China. Email: hehongj(AT)gmail.com On Mon, Jul 11, 2011 at 2:46 AM, MCLAREN, Donald <[log in to unmask]> wrote: > In SPM, there is also a high-pass filter that is applied to the data. > > If you look in spm_spm: > > W will be an identity matrix if you turn off AR(1) > xX.K is the high-pass filter. > > xX.xKXs = spm_sp('Set',spm_filter(xX.K,W*xX.X)); % KWX > xX.xKXs.X = full(xX.xKXs.X); > xX.pKX = spm_sp('x-',xX.xKXs); > KWY = spm_filter(xX.K,W*Y); > beta = xX.pKX*KWY; > > Best Regards, Donald McLaren > ================= > D.G. McLaren, Ph.D. > Postdoctoral Research Fellow, GRECC, Bedford VA > Research Fellow, Department of Neurology, Massachusetts General Hospital and > Harvard Medical School > Office: (773) 406-2464 > ===================== > This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED > HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is > intended only for the use of the individual or entity named above. If the > reader of the e-mail is not the intended recipient or the employee or agent > responsible for delivering it to the intended recipient, you are hereby > notified that you are in possession of confidential and privileged > information. Any unauthorized use, disclosure, copying or the taking of any > action in reliance on the contents of this information is strictly > prohibited and may be unlawful. If you have received this e-mail > unintentionally, please immediately notify the sender via telephone at (773) > 406-2464 or email. > > > > > On Sun, Jul 10, 2011 at 2:17 PM, Hongjian He <[log in to unmask]> wrote: >> Dear all, >> Does anyone have any idea about the beta calculation in SPM? I found >> it different with what I got from matlab regression. >> I run SPM with a simple first level model with the design matrix >> including two task condition, a linear trend term and a dc-term. No >> global normalization and AR(1) are specified. After the estimation, I >> can find the beta value for a example voxel, such as 0.5288. >> >> I then take the time series of that voxel (Y), and do the regression >> in matlab. The design matrix (or regressors X) has been set to be >> exactly the same with SPM.xX.X. To find the beta value, I did the >> calculation as (X' * X) \ X' * Y. However, the value I got is >> -4.9671. I also considered the percentage unit, and did the >> normalization with a factor of 100/dc-term. The result of that is >> -0.6954. >> >> Could anyone help me to understand the procedure I missed to find the >> same regression value for the two cases? >> >> Thanks in advance! >> ------------------------------------------------------------------- >> Hongjian He >> Zhejiang University, Hangzhou, China. >> Email: hehongj(AT)gmail.com >> >