This is a statistical question rather than afni specific but since I’m using 3dTproject I was wondering what the relationship between polort and high-pass filter is. If I use a polort of 2 it will remove very low frequencies which is what high-pass filtering does, is that correct?
Also why does the 3dTproject help file say “It makes no sense to use a value of pp greater than 2, if you are bandpassing out the lower frequencies!”. This is probably related to my question above but I don’t understand why “it makes no sense”.
Is there also an option to perform only high-pass filtering with 3dTproject?
Sorry for not getting to this.
Yes, polort regression is very similar to high-pass filtering, though it is a little different, since the regressors do not span the same space.
The reason going above polort 2 is not so useful is because a slow cubic is pretty well modeled by a sine function (plus a quadratic). The higher degree polorts are not so useful when a bunch of sinusoids are already in the model.
I assume it would be redundant then to use both -polort and -bandpass together, right?
Paul wrote a very helpful explanation of the dangers of bandpass filtering, I wonder if polort suffers from the same problems, namely reduced D.O.F., when using 3dTproject?
Also, if my confounds file (-ort) include compcor and related cosine regressors from fmriprep, should I turn off both -bandpass and -polort? Or is using -polort always recommended?
Assuming you bandpass with 3dTproject (with the intention of removing at least slow drifts), I would still include exactly -polort 2, since sinusoids do not cover those degrees. And since polort 2 is only 3 regressors, I would not worry about DOF for them.
If bandpassing is only being done as a high-pass filter, it will not use so many regressors anyway. It is the low-pass filtering that devours DOF.
But indeed, be sure of what regresssors are being included (from fmriprep and from AFNI), you would not want to duplicate them. Do the fmriprep regresors include linear and quadratic terms? What frequencies are included?
Thanks Rick, that is very valuable advice.
Based on this post in the neurostars forum I think all compcor is doing is using a filtered version of the functional data (Discrete cosine basis, with a cutoff 128s) before performing the decompositions, but the output functional data isn't high-pass filtered.
However, if I intend to use the CompCor components I also need to use the outputted cosine regressors during later denoising. If I understood correctly, this would be equivalent to doing high-pass filtering.
I can also compute compcor components myself, in which case I have two options:
1- run CompCor with cosine pre-filter (which performs decomposition on a high-pass filtered version of the data, using discrete cosine basis, with a cutoff 128s). In this case, I need to use the cosine regressors during denoising as well, which is doing high-pass filtering.
2- I can also choose a polynomial pre-filter instead (Legendre polynomial basis, degree 2) before performing the decompositions. In this case I guess I don't need to include cosine regressors.
Because the output functional data isn't filtered, I think I should still use
-polort 2 in either case. Is option 2 maybe better than option 1, as far as 3dTproject is concerned?
It should be fine to use the compcor regressors and their sinusoids, and there would be no reason to bandpass in 3dTproject. It should be fine to still apply -polort 2, though it is possible that they have something in the model for that.
But this seems like a simple way to go, and you would not need to try to replicate the CompCor steps.