Coef() not incorporating random effect of parameter in interaction coefficient

Hello!

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 y and y:z.

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.

Thanks

  • Operating System: macOS Catalina
  • brms Version: 2.16.2

Yes, I agree that “the effect of y depends on the group." However, my intuition is different as to how that should show up in the model output. The interaction y:z is not the total effect of y. Rather, that would be y + y:z and coef() should produce group-level differences for y.