# NOT RUN {
library(bayestestR)
posterior <- rnorm(10000)
map_estimate(posterior)
plot(density(posterior))
abline(v = map_estimate(posterior), col = "red")
library(rstanarm)
model <- rstanarm::stan_glm(mpg ~ wt + cyl, data = mtcars)
map_estimate(model)
library(brms)
model <- brms::brm(mpg ~ wt + cyl, data = mtcars)
map_estimate(model)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab