# NOT RUN {
library(rstanarm)
fit <- stan_glm(mpg ~ wt + am, data = mtcars, chains = 1)
hdi(fit)
# fit logistic regression model
fit <- stan_glm(
vs ~ wt + am,
data = mtcars,
family = binomial("logit"),
chains = 1
)
# compute hdi, transform on "odds ratio scale"
hdi(fit, trans = exp)
# }
Run the code above in your browser using DataLab