if (FALSE) {
# model with the treatment effect
fit1 <- brm(
count ~ zAge + zBase + Trt,
data = epilepsy, family = negbinomial(),
prior = prior(normal(0, 1), class = b),
save_all_pars = TRUE
)
summary(fit1)
# model without the treatent effect
fit2 <- brm(
count ~ zAge + zBase,
data = epilepsy, family = negbinomial(),
prior = prior(normal(0, 1), class = b),
save_all_pars = TRUE
)
summary(fit2)
# compute the posterior model probabilities
post_prob(fit1, fit2)
# specify prior model probabilities
post_prob(fit1, fit2, prior_prob = c(0.8, 0.2))
}
Run the code above in your browser using DataLab