I am attempting to fit a model in
brms and I am using
cmdstanr as the backend. I am getting the following error:
fatal error: bracket nesting level exceeded maximum of 256 ... note: use -fbracket-depth=N to increase maximum nesting level
The model formula is
response ~ X + X:Y
Y is nested within
X is a factor with 17 levels,
Y is a factor with 22 levels.
Running on a subset of the data such that
X has 9 levels and
Y has 12 levels, the model compiles without problems and produces a sensible fit without issues.
For this reason, I am guessing this has something to do with the number of levels (which is large, due to the interaction), but that’s just a guess.
Is there a suggested solution? For example, what do I need to do to “use -fbracket-depth=N to increase maximum nesting level”?