# Filtering procedure in simple correlation

Hi all,

my question is related to simple correlation analysis in resting state. I’m still learning to perform this type of analysis, and I find this topic quite trivial, so I want to make sure I’m getting everything right.
I want to use a bandpass filter (0.01 - 0.10 Hz), and I have basically two solutions:
A) Run deconvolution using only nuisance regressors, and filter the residual. Then, extract the activity from the seed and run the regression analysis on the filtered residual, using seed activity as the only regressor in the model;
B) Filter the data BEFORE the model. In order to avoid the reintroduction of nuisance-related variations into frequencies previously suppressed by the bandpass filter, both dataset and nuisance regressors need to be filtered. Then, run a single model, which should include both nuisance regressors and activity extracted from the seed.

Both procedures are used in literature, but results are not identical, and I wonder why. Furthermore, I’d like to know if one procedure is more advisable than another.

Hope the question is clear.
Thanks in advance,
Simone

Additional informations.
Datasets have been preprocessed (slice-time corrected, deobliqued, despiked, motion corrected, co-registered and normalized to a Talairach space, spatially filtered with a gaussian filter of 6mm FWHM).
Motion parameters (6), white matter signal, and cerebro-spinal fluid signal have been extracted, to use them as nuisance regressors.

I’m sure Rick will chime in, but the AFNI point of view is that all the regression and filtering should be done in one step, not in two steps. That is what the 3dTproject program is for – it will “project out” (the mathematical lingo) the nuisance regressor, including the cosines and sines for the frequencies being rejected.

Rick’s super-script, afni_proc.py, can do all of the above processing, including the steps that you mention in your (parenthetical remark).

Hi Simone,

Projection operations do not commute, unless the projected
elements are orthogonal. In this example they are not.

In order to do the operations sequentially (which is still
not a good idea, see ‘censoring’ below), one should filter
the nuisance regressors. That would make the 2 sets of
regressors (nuisance and filter) orthogonal.

Without that, filtering after nuisance regression would
leave time series that were no longer orthogonal to
the nuisance regressors. In the other direction, doing
nuisance regression after filtering would leave time
series that were no longer orthogonal to the filtered
terms.

So without filtering the nuisance terms, not only are
the methods different, they are both incorrect.

Projecting out both at once, in a single regression (as
is done by afni_proc.py), eliminates the need to make
them orthogonal. It also makes clear exactly what is
being removed from the time series.

“Both at once” also has the benefit of being able to
censor time points properly. While it is possible to
do so in the sequential case, it is easier to do at once.

“Both at once” also has the benefit of properly tracking
degrees of freedom, so one knows if a subject should be
dropped for having too few degrees of freedom remaining
for a reasonable analysis.

Does that seem reasonable?

• rick

Thanks to both Bob and Rick for your precious answers!

That is clear.
Actually, my previous idea was to filter the nuisance terms before the regression, as I tried to explain in the (B) method. Anyway, I understand that the suggested procedure is the simultaneous one (afni_proc.py → 3dTproject).
I will run bandpass&regression in afni_proc.py, and then I will use the single subjects errts* datasets for the simple correlation (as suggested in step 2 in the afni_proc.py help page).
That should be ok.

Thank you!
Simone

That sounds good, Simone. Sorry for missing
those details on the (B) case!

• rick