# NOT RUN {
library(bayestestR)
posterior <- rnorm(1000)
ci(posterior, method = "ETI")
ci(posterior, method = "HDI")
df <- data.frame(replicate(4, rnorm(100)))
ci(df, method = "ETI", ci = c(.80, .89, .95))
ci(df, method = "HDI", ci = c(.80, .89, .95))
library(rstanarm)
model <- stan_glm(mpg ~ wt, data = mtcars, chains = 2, iter = 200, refresh = 0)
ci(model, method = "ETI", ci = c(.80, .89))
ci(model, method = "HDI", ci = c(.80, .89))
# }
# NOT RUN {
library(brms)
model <- brms::brm(mpg ~ wt + cyl, data = mtcars)
ci(model, method = "ETI")
ci(model, method = "HDI")
library(BayesFactor)
bf <- ttestBF(x = rnorm(100, 1, 1))
ci(bf, method = "ETI")
ci(bf, method = "HDI")
library(emmeans)
model <- emtrends(model, ~1, "wt")
ci(model, method = "ETI")
ci(model, method = "HDI")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab