From 182cd350ac04a637fd4dc5a81c8aa3b1729c55d9 Mon Sep 17 00:00:00 2001 From: shotgunosine Date: Fri, 6 May 2022 12:44:16 -0500 Subject: [PATCH] add error message as my flight starts to board --- bids/modeling/statsmodels.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bids/modeling/statsmodels.py b/bids/modeling/statsmodels.py index e9092d1a3..28ea96201 100644 --- a/bids/modeling/statsmodels.py +++ b/bids/modeling/statsmodels.py @@ -288,6 +288,12 @@ def __init__(self, level, name, transformations=None, model=None, group_by.append(self.level) self.group_by = group_by + # Check for intercept only run level model and throw an error + if (self.level == 'run') and (self.model['X'] == [1]): + raise NotImplementedError("Run level intercept only models are not currently supported." + "If this is a feature you need, please leave a comment at" + "https://github.com/bids-standard/pybids/issues/852.") + def __repr__(self): return f"<{self.__class__.__name__}[{self.level}] {self.name}>"