Dear Todd,

I have (another) question regarding residual motion effects in fMRI.  I am wondering if it is possible to put the 24 movement regressors into the K matrix of the spm_filter routine (along with the high pass filter cosine functions) to remove the residual motion effects rather than include them as regressors in the design matrix?  In my study, I have to keep the number of regressors limited (<20 so I can apply a process that will test for serial correlations in the residuals).  I am comfortable tinkering around with spm_filter, but I just want to make sure that if I remove the residual motion effects this way, I am doing it correctly.  Can you provide any suggestions regarding this?

Yes this is perfectly fine - in fact you could put all your confounds into K;
and the estimation and inference will not change.

The only think you have to ensure is that the construction of the
residual-forming matrix based on K properly accounts for the fact that
the confounds are not unit ortho-normal (i.e., X0' = pinv(X0) for the DCT
drift terms but this is not generally true).

With very best wishes,

Karl