FitLins ignore if model regressor is missing


I am running Fitlins 0.10.1, trying to implement a GLM that includes 5 aCompCor components as nuisance variables (among other variables). However, some of my functional runs do not have 5 aCompCor components. That is, in these runs, <5 components explained 50% of the variance. FitLins throws an error when trying to run my model on these runs since the 4th or 5th component (e.g. a_comp_cor04) are not present.

Is there a way for Fitlins to simply ignore these regressors if not present? Alternatively, would it be valid to manually add in columns of zeros in the confounds tsv file for these missing regressors?


I think I would expect a warning but not an error on something like this.

The BIDS stats model specification does not say anything about this case: bsmschema.models.Model — BIDS Stats Models Specification

So it has been left to implementors to choose so far.

For my SPM implementation, I have chosen to throw a warning and move on.

But it may be worth making this behavior more clear in the BIDS stats model spec.

Yes, there is a way to ignore them.

--drop-missing will drop missing regressors for each run.

I agree this should probably be better incorporated into an error/warning.

@Remi-Gau I think this has to be left as implementation detail…

1 Like

Hi, I originally included --drop-missing in my fitlins command because that’s what I figured it would do. Unfortunately I still get the error. I will confirm this is the case, and if so, I’ll post something on the GitHub instead because it sounds like a bug.


Yes, please do, that would be a bug indeed

--drop-missing still throws errors with missing regressors · Issue #371 · poldracklab/fitlins · GitHub Confirmed it was the case, so moving the discussion to GitHub.


though as a general thought I wonder what would be a good way to guide future developpers to see what implementation choices have been made by other developpers in the past.