It’s a multilevel model with a categorical response, logit link. Brms version is 2.19.0. When I use fitted.brmsfit
to make a prediction for a hypothetical new datapoint for which the group-level factor in newdata
equals NA, the predicted values differ across function calls.
This does not happen when I use re_formula = NA
or give the group-level factor a value that is actually observed in the training data. But it does also happen with re_formula = NULL, scale = "linear"
when the group-level factor in newdata
equals NA.
Based on the above, I infer that this stochasticity must be related to the way in which the link scale parameter values are averaged across draws. But shouldn’t this average be identical across calls given that it’s based on all the draws? In fact, shouldn’t it be simply something akin to rowMeans(posterior_samples(mod))
?
My mind is boggling real bad, causing anxiety and anguish.