# NOT RUN {
fit <- brm(rating ~ treat + period + carry + (1|subject),
data = inhaler, family = "cumulative",
prior = set_prior("normal(0,2)", class = "b"),
sample_prior = TRUE)
# extract all prior samples
samples1 <- prior_samples(fit)
head(samples1)
# extract prior samples for the population-level effects of 'treat'
samples2 <- posterior_samples(fit, "b_treat")
head(samples2)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab