Can I return credible intervals from `predict`?

Please also provide the following information in addition to your question:

  • Operating System: Ubuntu 19.04
  • brms Version: 2.9.0 (Github)

I’m working with a categorical model of the form:
My model is:
mod <- brm(Reason ~ V1 + V2 +V3 + (1|ID),
data = Data ,
family = categorical(link = “logit”),
prior = priors)

I am using predict.brmsfit to return predicted probabilities of each ‘Reason’ with:
predict(mod, newdata = NULL, re_formula = ~ (1|ID),
summary = T)

and using cbind to attach the returned predicted probabilities to the original data frame for visualization.

Is it possible to also return 95% credible intervals surrounding the predicted probabilities?

The quantiles in the output are already boundaries of a credible interval by definition.

How do I return the quantiles? I’m only getting a single value for each response category (row)

ah I see. for categorical models use fitted().


fitted(mod, newdata = NULL, re_formula = ~ (1|ID), summary = T)

returned the complete matrix I was looking for