3dDeconvolve only with motion regressors

I am planning to do a mixed-effect model to assess the association of BOLD signal in an ROI (the hippocampus) with some behavioral measures. To do that, I need to get the mean of Bold signal per time point in the ROI. But I prefere to first regress out the motion estimates from each run. I ran 3dDeconvolve on 8 funcational runs (see below) only with motion regressors as follows :

for b in {1..8};do
3dDeconvolve -input Run$b-AP-dummyRemoved-sliceRemove_MoCorr_DistCorr_anatomyAligned.nii.gz -polort a -num_stimts 6 -stim_file 1 Run$b-Motion-AFNI-converted.1D'[0]' -stim_base 1 -stim_label 1 roll -stim_file 2 Run$b-Motion-AFNI-converted.1D'[1]' -stim_base 2 -stim_label 2 pitch -stim_file 3 Run$b-Motion-AFNI-converted.1D'[2]' -stim_base 3 -stim_label 3 yaw -stim_file 4 Run$b-Motion-AFNI-converted.1D'[3]' -stim_base 4 -stim_label 4 dS -stim_file 5 Run$b-Motion-AFNI-converted.1D'[4]' -stim_base 5 -stim_label 5 dl -stim_file 6 Run$b-Motion-AFNI-converted.1D'[5]' -stim_base 6 -stim_label 6 dP -tout -x1D run$b-motions-regressors -xjpeg run$b-motions-regressors.jpg -fitts Run$b-fits.nii.gz -errts Run$b-res.nii.gz -bucket Run$b-motion-Stats.nii.gz -jobs 2 -virtvec;

I wonder whether this is the correct approach? Can I safely assume that motion is regressed out from the -fits? According to a colleague of mine, the correct model should look like this: y_hat = y-A' * A * y to regress out the motion while 3dDeconvolve does only this bit of the model: A' * A * y.

Do you think a subtraction is required as the next step? or Can I simply use the 'fits.nii.gz' for the downstream processing? I would greatly appreciate your help!


Hi Khazar,

I will leave thoughts on this approach to Gang.

But the fit time series is the model fit to the data. In this case, the fitts would ONLY contain the polort and motion terms, as that is the model. You want the errts output, which is the input with motion and polort projected out. errts = input - fitts.

Note that you can also pass all 6 motion parameters at once using -ortvec, since the statistics of the fit are of no interest. And for that matter, it would work just as well but be faster to run 3dTproject, which is built for this operation. The errts from 3dDeconvolve should be the same, but it takes longer to compute, since 3dDeconvolve is designed to output a lot of statistics.

  • rick

Thanks a lot Rick for the swift feedback. The issue is that the errt outputs look rather odd. They seem to be more of a noise pattern than an actual brain image. Attached, please find an example of a residual and a fit image. Do you happen to know what might be the reason? and would it make sense to extract mean BOLD signal from such a noisy image? Thank you!

PS: the functional runs are of submillimeter resolution with partial field of view. Happy to provide further details if needed.

Keep in mind that the residual time series has mean==0 at every voxel, so it will certainly look bad, visually. But it should be the original data with motion and polort removed. If you want it to look like a brain, you might add the mean back in. But that is unnecessary for any future regression.

Note that for any future regression, it would be appropriate to also project the motion and polort from those regressors.

  • rick

Ok, that makes sense. thank you so much for your help!