# NOT RUN {
if (require("rstanarm") && require("rstantools")) {
model <- stan_glm(mpg ~ wt + cyl, data = mtcars, chains = 1, iter = 500, refresh = 0)
model_performance(model)
model <- stan_glmer(
mpg ~ wt + cyl + (1 | gear),
data = mtcars,
chains = 1,
iter = 500,
refresh = 0
)
model_performance(model)
}
if (require("BayesFactor") && require("rstantools")) {
model <- generalTestBF(carb ~ am + mpg, mtcars)
model_performance(model)
model_performance(model[3])
model_performance(model, average = TRUE)
}
# }
Run the code above in your browser using DataLab