If I perform the following calculations:
>> load SPM                                        
>> cB=spm_get_data(SPM.xCon(1).Vcon,[50; 50; 50])  

cB =

   -1.4833

>> l=spm_get_data(SPM.VResMS,[50; 50; 50])         

l =

    3.1513

>> VcB=SPM.xCon(1).c'*SPM.xX.Bcov*SPM.xCon(1).c    

VcB =

   13.5666

>> Z=cB./sqrt(l*VcB)                               

Z =

   -0.2269

>> Zimage=spm_get_data(SPM.xCon(1).Vspm,[50; 50; 50])

Zimage =

   -1.5833


Why does Zimage not match Z? Am I missing something?

I am trying to get the SE of each beta and was going to use the above calculations by replacing SPM.xCon(1).c with a contrast for each beta (e.g. beta1=[1 0 0 0 0 0]), but if I can't reproduce the Tmap from the formulas, I'm not confident in SE measurement.

The above was derived from:
spm_contrasts lines 173-178

Any thoughts would be appreciated.


--
Best Regards, Donald McLaren
=====================
D.G. McLaren
University of Wisconsin - Madison
Neuroscience Training Program
Office: (608) 265-9672
Lab: (608) 256-1901 ext 12914
=====================
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 (608) 265-9672 or email.