Dear afni experts,
I would like to know how does 3dDeconvolve -gltsym compute the t statistics for simple contrasts.
I thought I should be able to get the same results manually.
For a simple study having two conditions, A and B, I'd like to compute the t-stat for +A -B.
I used the following formula:
C = [zeros for baseline regressors, 1, -1]
X is design matrix from X.test.xmat.1D
dof (degrees of freedom) can be found using `3dinfo -verb stats.test_REML+orig`
beta_A and beta_B can be found in stats.test_REML+orig
t = (beta_A - beta_B) / sem
sem = sqrt(mse * C * (X' * X)^-1 * C')
mse = sum(errts^2, axis=-1) / dof where errts is from errts.test_REML+orig
However, the result was not equal to the t value in stats.test_REML+orig
Could anyone help and tell me what I'm missing here? Is this discrepancy due to the fact that I calculate the stats with 3dREMLfit?
Thank you!
Edited 1 time(s). Last edit at 10/24/2018 09:02AM by herrlich10.