# NOT RUN {
library(bayestestR)
library(rstanarm)
model <- stan_glm(
Sepal.Length ~ Petal.Width * Species,
data = iris,
chains = 2, iter = 200
)
x <- rope(model)
plot(x)
x <- hdi(model)
plot(x) + theme_modern()
data <- rnorm(1000, 1)
x <- p_direction(data)
plot(x)
x <- p_direction(model)
plot(x)
model <- stan_glm(
mpg ~ wt + gear + cyl + disp,
chains = 2,
iter = 200,
data = mtcars
)
x <- equivalence_test(model)
plot(x)
# }
# NOT RUN {
library(bayestestR)
library(see)
lm0 <- lm(qsec ~ 1, data = mtcars)
lm1 <- lm(qsec ~ drat, data = mtcars)
lm2 <- lm(qsec ~ wt, data = mtcars)
lm3 <- lm(qsec ~ drat + wt, data = mtcars)
result <- bayesfactor_models(lm1, lm2, lm3, denominator = lm0)
plot(result, n_pies = "one", value = "probability") + theme_modern() +
scale_fill_pizza(reverse = TRUE)
# }
Run the code above in your browser using DataLab