# \donttest{
## Proportional odds logistic regression ##
if(require(rstanarm) & require(MASS)){
m1 <- stan_polr(Sat ~ Infl + Type,
data = MASS::housing,
prior = rstanarm::R2(0.2, 'mean'),
refresh = 0,
iter = 500)
# marginal predictions holding covariates at means #
bayesOrdinalPredsF(m1,
at = list(Type = c("Tower", "Apartment")),
at_means = TRUE,
n_draws = 500)
}
# }
Run the code above in your browser using DataLab