Robust-tedana (MPPCA + tedana): how to obtain the MPPCA rank for degrees-of-freedom accounting?

I am running a multi-echo task-fMRI pipeline following Tahayori et al. (2025), “Robust-tedana” (bioRxiv). Specidically, i do MPPCA (dwidenoise) on the raw echoes, then fMRIPrep, then tedana with robustica and a modified decision tree. First-level GLMs are in FSL FEAT.

My question is about the degrees-of-freedom accounting for the MPPCA step specifically.

The paper sets the degrees of freedom per pipeline, and for robust-tedana uses min(MPPCA rank, robustica component count. It also notes that MPPCA is a sliding-window method, so the signal rank and the effective degrees of freedom are non-stationary, and that not accounting for this inflates the test statistics.

What I cannot work out is how to obtain the MPPCA rank in practice. dwidenoise in the MRtrix version I have does not output a rank map, and because the patches overlap and are averaged, a per-patch rank would in any case not be the number that enters the t-statistic correction for the whole run. I also found the earlier thread on the general problem, Accounting for reduced degrees of freedom in fMRI GLMs, which is useful on the principle but does not resolve this.

For the tedana step itself the route is clear, since the rejected components can go into the design matrix. MPPCA leaves no regressors to add.

So: how is the MPPCA rank obtained for this purpose, and is there a recommendation on whether this needs correcting in practice, or whether the effect is small enough to note as a limitation and leave alone or if there another completely different solution?

I believe you can get the voxel-wise degrees of freedom from dwidenoise off the development branch of MRtrix3. I would probably take the minimum degrees of freedom in your analysis mask, but something like the median might be more reasonable.

I recall looking into this a while ago, and I don’t think I ever found a satisfactory answer. For connectivity analyses, you can use something like xDF to calculate the effective degrees of freedom, but for a task GLM I don’t know if any of the tools let you provide a known DOF value for the input data.