Print

Print


Thanks!

Now I am using SPM.xX.Bcov directly, thus got the same results as
spm_results_ui.

TData =
(beta_0001*Contrast(1)+beta_0002*Contrast(2))./(sqrt(ResMS*(Contrast*SPM.xX.Bcov*Contrast')));

In the case of 2nd level statistical analysis, there should be no filtering
issue, right? Why SPM.xX.Bcov is slightly different from (X'*X)^(-1)?

>>SPM.xX.Bcov
    0.0656         0
         0    0.0438
>>(X'*X)^(-1)
    0.0625         0
         0    0.0455

Is this caused by an whitening issue?

Thanks,

Chao-Gan







On Thu, Oct 31, 2013 at 10:44 AM, MCLAREN, Donald
<[log in to unmask]>wrote:

> xX.xKXs   = spm_sp('Set',spm_filter(xX.K,W*xX.X)); % K*W*X
>
> Also,
> xX.xKXs.X = full(xX.xKXs.X);
> xX.pKX    = spm_sp('x-',xX.xKXs);                        %
> projector/pseudo-inverse
> xX.Bcov         = xX.pKX*xX.V*xX.pKX';
>
> Best Regards, Donald McLaren
> =================
> D.G. McLaren, Ph.D.
> Research Fellow, Department of Neurology, Massachusetts General Hospital
> and
> Harvard Medical School
> Postdoctoral Research Fellow, GRECC, Bedford VA
> Website: http://www.martinos.org/~mclaren
> 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 Thu, Oct 31, 2013 at 10:41 AM, YAN Chao-Gan <[log in to unmask]> wrote:
>
>> Thanks, Guillaume and Donald! I will read that.
>>
>> Hi Donald, what's K in your expression? Seems SPM.xX.K is a struct which
>> cannot be multiplied:
>>
>> >> SPM.xX.K
>>
>> ans =
>>
>>     HParam: 128
>>        row: [1x215 double]
>>         RT: 1.4000
>>         X0: [215x4 double]
>>
>> Best,
>>
>> Chao-Gan
>>
>>
>>
>> On Thu, Oct 31, 2013 at 10:31 AM, MCLAREN, Donald <
>> [log in to unmask]> wrote:
>>
>>> Try using:
>>> pinv(K*W*X)*xX.V*pinv(K*W*X)' instead of (X'*X^(-1))
>>>
>>> Then you should get the correct solution.
>>>
>>> Best Regards, Donald McLaren
>>> =================
>>> D.G. McLaren, Ph.D.
>>> Research Fellow, Department of Neurology, Massachusetts General Hospital
>>> and
>>> Harvard Medical School
>>> Postdoctoral Research Fellow, GRECC, Bedford VA
>>> Website: http://www.martinos.org/~mclaren
>>> 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 Wed, Oct 30, 2013 at 11:03 PM, YAN Chao-Gan <[log in to unmask]>wrote:
>>>
>>>> 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-Gan
>>>>
>>>>
>>>> On 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.ppt<http://www.fil.ion.ucl.ac.uk/~mgray/Presentations/2nd%20level%20analysis-%20Design%20contrast%20&%20inference.ppt>
>>>>>
>>>>> X=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 Scientist
>>>>> The Nathan Kline Institute for Psychiatric Research, 140 Old
>>>>> Orangeburg Road, Orangeburg, NY 10962
>>>>> Center for the Developing Brain, Child Mind Institute, 445 Park
>>>>> Avenue, New York, NY 10022
>>>>> The Phyllis Green and Randolph Cowen Institute for Pediatric
>>>>> Neuroscience, New York University Child Study Center, New York, NY 10016
>>>>> -
>>>>> Initiating + Service Node
>>>>> The R-fMRI Network (RFMRI.ORG)
>>>>> *http://rfmri.org/yan*
>>>>> http://scholar.google.com/citations?user=lJQ9B58AAAAJ&hl=en
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Chao-Gan YAN, Ph.D.
>>>> Research Scientist
>>>> The Nathan Kline Institute for Psychiatric Research, 140 Old Orangeburg
>>>> Road, Orangeburg, NY 10962
>>>> Center for the Developing Brain, Child Mind Institute, 445 Park Avenue,
>>>> New York, NY 10022
>>>> The Phyllis Green and Randolph Cowen Institute for Pediatric
>>>> Neuroscience, New York University Child Study Center, New York, NY 10016
>>>> -
>>>> Initiating + Service Node
>>>> The R-fMRI Network (RFMRI.ORG)
>>>> *http://rfmri.org/yan*
>>>> http://scholar.google.com/citations?user=lJQ9B58AAAAJ&hl=en
>>>>
>>>
>>>
>>
>>
>> --
>> Chao-Gan YAN, Ph.D.
>> Research Scientist
>> The Nathan Kline Institute for Psychiatric Research, 140 Old Orangeburg
>> Road, Orangeburg, NY 10962
>> Center for the Developing Brain, Child Mind Institute, 445 Park Avenue,
>> New York, NY 10022
>> The Phyllis Green and Randolph Cowen Institute for Pediatric
>> Neuroscience, New York University Child Study Center, New York, NY 10016
>> -
>> Initiating + Service Node
>> The R-fMRI Network (RFMRI.ORG)
>> *http://rfmri.org/yan*
>> http://scholar.google.com/citations?user=lJQ9B58AAAAJ&hl=en
>>
>
>


-- 
Chao-Gan YAN, Ph.D.
Research Scientist
The Nathan Kline Institute for Psychiatric Research, 140 Old Orangeburg
Road, Orangeburg, NY 10962
Center for the Developing Brain, Child Mind Institute, 445 Park Avenue, New
York, NY 10022
The Phyllis Green and Randolph Cowen Institute for Pediatric Neuroscience,
New York University Child Study Center, New York, NY 10016
-
Initiating + Service Node
The R-fMRI Network (RFMRI.ORG)
*http://rfmri.org/yan*
http://scholar.google.com/citations?user=lJQ9B58AAAAJ&hl=en