Prior on intercept when using offset in brms

I am asking here and not on brms’s issue tracker on GitHub because I’m not sure if this is really a bug or if I am just misunderstanding something.

When using an offset in the model formula (e.g.

y_var ~ 1 + x_var + offset(offset_var)

), then brms seems to be still using the same default prior on the intercept as when omitting the offset (i.e.

y_var ~ 1 + x_var

in the above example). I am considering the negbinomial(link = "log") family, but this probably also applies analogously to other families. For the negbinomial(link = "log") family, the default Student’s t prior for the intercept seems to be centered at the logarithm of the median of the response (log(median(y_var)) = median(log(y_var))). Therefore, my question is: If an offset is specified, shouldn’t the center of the default prior for the intercept be adjusted (in the above example e.g. by taking log(median(y_var)) - median(offset_var) or – probably better – by directly taking median(log(y_var) - offset_var), keeping in mind that the median is not linear and thus the two expressions are in general not the same)? And shouldn’t the scale of the default Student’s t prior for the intercept be adjusted analogously?

(Note: With “intercept”, I am meaning the intercept at centered predictors.)

The same issue also arises when using the additional response information rate() on the left-hand side of the formula instead of offset() on the right-hand side (in the above example, I think this would be

y_var | rate(exp(offset_var)) ~ 1 + x_var

since rate() automatically takes the logarithm).

My brms version is 2.13.0.

Perhaps the Stan Forums are not really the right place for this. So I opened an issue in brms’s issue tracker on GitHub.

The Stan forums are a good place, but I am slow to respond at the moment as brms-related questions are just flooding in every day. You need to give us a little bit of time to respond.

1 Like

Sure, no problem. Thanks for replying on GitHub.