freesurfers,

i have a question about how t-tests are computed in fsfast.  

so t = ces/sqrt(cesvar), but how exactly is cesvar calculated?  

i thought it would be:
cesvar = variance_of_residual *    c*(X' * X)^-1*c'
  where X is the stim matrix and c is the contrast vector and ' denotes transpose

two questions:

1. i tried computing cesvar myself, but it is not the equation above (for the one subject i was playing with, cesvar was ~1.5x the above equation).  what is the equation that is used?

2. intuitively, the second half of that [ c*(X' * X)^-1*c ] penalizes for correlations in your stimulus matrix, particularly for those relevant to your contrast.  is that a good way to think about it?


thanks in advance!


alex