The treatment of zeros as either zeros or as missing data will depend
on whether or not "implicit masking" is specified when you set up the
linear model. If implicit masking is used, zeros will indicate
missing data.
Best regards,
-John
On 1 August 2013 23:00, MCLAREN, Donald <[log in to unmask]> wrote:
> 0 is a numeric value and usually interpreted as such in SPM and most
> programs. If the data are missing, then you should code the data as
> missing.
>
> I believe that if you have no NaNs, then 0 is interpreted as missing.
>
> If you have missing data, SPM does not compute the statistics for
> those voxels. Using nanmean and other work arounds would not be valid
> as the degrees of freedom are different. What you'd need to do is
> compute the statistics, determine the p-value based on the reduced df,
> then create an adjusted statistic map that would get had you had data
> from all subjects. This approach is implemented in GLM Flex.
>
> 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, Aug 1, 2013 at 5:50 PM, DUBOIS Mathieu <[log in to unmask]> wrote:
>> Hello,
>>
>> Sorry to ask again but I have some problems with the 2 sample t-test.
>>
>> I have loaded the betas matrices produced by SPM and I compute the residuals
>> in python with msse = numpy.mean((Y - numpy.dot(design_matrix, betas)) ** 2,
>> axis=0) (design_matrix is loaded from SPM.mat and Y is loaded from the image
>> files with a mask to extract only a subset of pixels).
>>
>> Now I have noticed that I obtain a different value than what is in the ResMS
>> file. More precisely the values seems close most of the time but are
>> sometimes completely different. I have noticed that this happens on border
>> voxels. A look at the Y matrices on those voxels shows that they are null on
>> a loarge fraction of the subject.
>>
>> Therefore I was wondering if SPM treat the value 0 differently (for instance
>> considering it NaN and using nanmean & friends).
>>
>> Mathieu
|