# NOT RUN {
if (!exists("example_model")) example(example_model)
print(family(example_model))
# linear predictor on log-odds scale
linpred <- posterior_linpred(example_model)
colMeans(linpred)
# probabilities
# same as posterior_linpred(example_model, transform = TRUE)
probs <- posterior_epred(example_model)
colMeans(probs)
# not conditioning on any group-level parameters
probs2 <- posterior_epred(example_model, re.form = NA)
apply(probs2, 2, median)
# }
Run the code above in your browser using DataLab