Print

Print


Dear Daniel,

it isn't hard to code a t test in Matlab yourself -- after the formula  
found in textbooks. In fact, it's easy to code a whole regression,  
including betas and residuals. I have been coding t tests for years,  
and the results have been always the same as those delivered by SPM.

Best wishes,
Roberto Viviani
Dept. of Psychiatry and Psychotherapy III
University of Ulm, Germany

Quoting "Mathalon, Daniel" <[log in to unmask]>:

> Dear SPMers,
>
> We are running a full factorial model in SPM 8 using a condition   
> variable (representing two groups) and 8 additional covariates,   
> including 1 Condition x Covariate interaction term.
>
> We've extracted the data from one voxel to compare results with SPSS  
>  linear regression or ANOVA programs, fully expecting them to agree   
> (as a check that our script was working correctly).
>
> We find that the beta values estimated by SPM for that voxel for   
> each variable in the model and the regression coefficients estimated  
>  by SPSS are in perfect agreement.  The residual degrees of freedom   
> in both SPM and SPSS also agree.
>
> However, we are finding that the t-test values generated in SPM and   
> SPSS do not agree. For example, for the interaction term of   
> interest, in SPSS t =1.459, but in SPM's t-map t =1.3414.  We can't   
> figure out why, but we suspect that the standard error of the beta   
> must be estimated differently (since the betas and the degrees of   
> freedom appear to be the same in SPSS and SPM).
>
> Does anyone have any ideas about why we are observing these   
> discrepancies?  Any insights or strategies for tracking this down   
> would be greatly appreciated.
>
> Thanks,
>
> Dan
>
>
> Daniel H. Mathalon, Ph.D., M.D.
> Professor of Psychiatry
> University of California, San Francisco
>
> Mail Address:
> Psychiatry Service 116d
> San Francisco VA Medical Center
> 4150 Clement St.
> San Francisco, CA 94121
>
> Office phone:  (415) 221-4810, ext. 3860
> Fax:  (415) 750 6622
> e-mail:  [log in to unmask]
>