library(bayestestR)
posterior <- rnorm(1000)
spi(posterior)
spi(posterior, ci = c(.80, .89, .95))
df <- data.frame(replicate(4, rnorm(100)))
spi(df)
spi(df, ci = c(.80, .89, .95))
if (FALSE) {
library(rstanarm)
model <- stan_glm(mpg ~ wt + gear, data = mtcars, chains = 2, iter = 200, refresh = 0)
spi(model)
}
Run the code above in your browser using DataLab