Effect of temporal filter order on degrees of freedom

I am interested in tracking lost degrees of freedom in XCP-D, like how afni_proc.py already does. Based on Reynolds et al. (preprint) and Caballero-Gaudes & Reynolds (2017), I know that each frequency that is removed by the filter also removes two degrees of freedom. I assumed that that was because filtering is typically applied with a forwards-backwards filter (e.g., scipy.signal.filtfilt), but I could be wrong. If that is the case, then does the effect of the filter on degrees of freedom change with the filter order?

@rickr @CesarCaballeroGaudes is this something you would know about?

1 Like

It is not related to the order of the IIR filter (forward-backward filter implemented in scipy.signal.filtfilt). afni_proc.py considers two degrees of freedom because it implements both sine and cosine regressor for each frequency to be removed (at the FFT resolution). @rickr can confirm the implementation.

1 Like

Thanks @CesarCaballeroGaudes. That makes a lot of sense.

@CesarCaballeroGaudes is right of course. Note that the sine/cosine regressor method should be identical to that of using a straight FFT (subject to computational truncation differences). Applying direct FFT to data and other regressors before later regression (of more interest) should be the same, but makes it more work to track DoF.

  • rick
1 Like