if (FALSE) { # require("quadprog") && require("rstanarm")
library(bayestestR)
posterior <- rnorm(1000)
spi(posterior)
spi(posterior, ci = c(0.80, 0.89, 0.95))
df <- data.frame(replicate(4, rnorm(100)))
spi(df)
spi(df, ci = c(0.80, 0.89, 0.95))
# \donttest{
library(rstanarm)
model <- suppressWarnings(
stan_glm(mpg ~ wt + gear, data = mtcars, chains = 2, iter = 200, refresh = 0)
)
spi(model)
# }
}
Run the code above in your browser using DataLab