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.