Hi SPM community!
I'm looking for a fast and efficient way to extract residuals (epsilon
hat's) for each time point (for each voxel, of course) during the GLM
procedure. This requires a lot of memory, so I guess SPM just calculates it
on the fly and just keeps the RSS (or actually ResMS), but I wanted to play
with the epsilon hat's.
The method I was going to try was to use the beta_hat's and subtract
Y_fitted from Y_actual (i.e. epsilon_hat = Y_actual - X * beta_hat). But I
wasn't sure if this was a good idea since I understand that SPM's GLM
procedure involves drift correction and filtering so that Y_actual may not
actually be raw signals from the *img files. Or, there could be some other
reasons that this might not be correct.
Is there a better (or more correct) way to extract the residuals for each
time point? Perhaps, a way to modify model specification or estimation
functions?
Thanks a lot in advance.
Joon
|