June 03, 2010

SPM2 Gem 6: Contrast SE Computation

An email from Will Penny on how a contrast's standard error is computed.

Subject: Re: Beta SE in SPM2?
From: Will Penny <wpenny@FIL.ION.UCL.AC.UK>
Date: Fri, 27 Feb 2004 11:26:35 +0000
To: SPM@JISCMAIL.AC.UK

Tobias,

> How do I extract beta SE in SPM2?  As far as I can see I can only get
> y, Y, beta, and Bcov...have I missed something?

If you're referring to the Standard Error or the Standard deviation of the
parameter estimates then this isn't stored explicitly.

Its computed on the fly when one makes an inference about a contrast. See the
following lines (153-158) in spm_contrasts:

case 'T'                                  %-Compute SPM{t} image
         %---------------------------------------------------------------
        cB    = spm_get_data(xCon(ic).Vcon,XYZ);
        l     = spm_get_data(VHp,XYZ);
        VcB   = xCon(ic).c'*SPM.xX.Bcov*xCon(ic).c;
        Z     = cB./sqrt(l*VcB);

So, if you did a contrast xCon(ic).c'=[1 0 0 0] to test the null
hypothesis that the first parameter is zero then cB will be equal to
beta1 and sqrt(l*VcB) will be equal to std(beta1) - the standard
deviation of the first parameter estimate.

Note that l is the residual sum of squares at that voxel which is
stored in the image ResMS.img and accessed via the file handle VHp.

In this way SPM does'nt have to store Standard Deviations/covariances
for every voxel and beta - so saving disk space. But its not that
handy for what you want !

Hope this helps, Will.


- No comments Not publicly viewable


Add a comment

You are not allowed to comment on this entry as it has restricted commenting permissions.

Search this blog

Tags

Most recent comments

  • I love this quote: "Complete reporting of results, i.e. filing of statistical maps in public reposit… by Kevin Black on this entry
  • Taylor: I've just quickly scanned the BrainVoyager documentation, and it appears that the Cluster–Le… by Thomas Nichols on this entry
  • Cindy, I can see you didn't like my comments but I didn't get based on what you deemed them outrageo… by Yolanda on this entry
  • Thomas, Could you comment on the applicability of your findings to BrainVoyager's Cluster–Level Stat… by Taylor on this entry
  • Here is a sample of recent corrections from PNAS, collated by Mike Angstadt. Correction for Crockett… by Thomas Nichols on this entry

Blog archive

Loading…
Not signed in
Sign in

Powered by BlogBuilder
© MMXXI