Dear Annchen,

Check the archives... betainc problems arise from either:  DF too low, or FWHM (estimated) too small. As you have 4 subjects and DF=3, the subject sample size is the problem.  

I believe the problem is Random Field Theory; in short, if your degrees of freedom are less than or equal to the dimension of your image (i.e. D=3), then the theory doesn't work.  The technical explanations is that a (theoretical, continuous) T random field with DF<=D will have infinities in it with probability 1, a result of the denominator hitting zero exactly.

-Tom


On Tue, Jan 24, 2012 at 3:52 AM, Annchen Knodt <[log in to unmask]> wrote:
Hi SPMers,

We're running into a problem trying to perform a one-sample t-test with 4 subjects from an older population and wondering if anyone has any thoughts on how to address it.  We've successfully estimated the model, but as we proceed to view the results, we get the following error, just after we specify the threshold (regardless of whether we specify FWE or uncorrected, or 0 as the value):  

??? Error using ==> betainc
X must be in the interval [0,1].

Error in ==> spm_Tcdf at 106
F(Q) = xQxPos -(xQxPos*2-1).*0.5.*betainc(v(Qv)./(v(Qv)+x(Qx).^2),v(Qv)/2,1/2);

Error in ==> spm_P_RF>spm_ECdensity at 159
   EC(1,:) = 1 - spm_Tcdf(t,v);

Error in ==> spm_P_RF at 63
EC  = spm_ECdensity(STAT,Z,df);

Error in ==> spm_uc_RF at 37
   [P P p] = spm_P_RF(1,0,u,df,STAT,R,n);

Error in ==> spm_uc at 39
u = spm_uc_RF(a,df,STAT,R,n);

Error in ==> spm_getSPM at 752
   uu      = spm_uc(0.05,df,STAT,R,n,S);

Error in ==> spm_results_ui at 263
       [SPM,xSPM] = spm_getSPM;

??? Error while evaluating uicontrol Callback


We've tried masking by gray matter volume in a few different ways (as suggested in this post: https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind0808&L=spm&P=R12632&1=spm&9=A&I=-3&J=on&d=No+Match%3BMatch%3BMatches&z=4) - then we don't see the error but rather SPM appears to hang for quite some time after displaying:

SPM8: spm_results_ui (v3928)                       21:16:39 - 10/01/2012
========================================================================
contrast image  1               :        ...written con_0001.img
spm{T} image  1                 :       ...written spmT_0001.img
SPM computation                 :            ...height threshold>>


Also of note is the fact that we are able to view the results from a regression model as an alternative specification.  We've never seen anything quite like this, so any suggestions or insights you might have would be greatly appreciated!

Thanks,

Annchen Knodt

~~~~~~~~~~~~
Annchen Knodt
Graduate Student
Computational Biology & Bioinformatics Program
Laboratory of Neurogenetics
Duke University






--
__________________________________________________________
Thomas Nichols, PhD
Principal Research Fellow, Head of Neuroimaging Statistics
Department of Statistics & Warwick Manufacturing Group
University of Warwick, Coventry  CV4 7AL, United Kingdom

Web: http://go.warwick.ac.uk/tenichols
Email: [log in to unmask]
Phone, Stats: +44 24761 51086, WMG: +44 24761 50752
Fax:  +44 24 7652 4532