I am running a model that includes a varying effect for one predictor that is included in an interaction term. Similar to this:
bf( x ~ 1 + y + y:z (1 + y | group))
A global parameter estimate is produced for both
However, when using
coef() (with no specifications, only default settings) , all groups have the same coef estimate for the parameter
y:z. In my head this shouldn’t be, because the effect of
y depends on the group.
Are there other specifications for the
coef() function that I am missing? I expect the coefficient of
y:z to vary depending on group.
Any advice here would be much appreciated.
- Operating System: macOS Catalina
- brms Version: 2.16.2