I would like to perform Bayesian Logistic Regression using the bayestestR
and rstanarm
in R. The output, I believe, is in the log(odds ratio). Do you know of a way in which I can convert everything, i.e. the centrality, uncertainty, existence and significance indices into odds ratio instead. I know tbl_summary
function from gtsummary
package has an argument, exponentiate = TRUE
that returns everything in OR.
Code:
library(rstanarm)
library(bayestestR)
data <- iris %>%
filter(Species != "setosa") %>%
droplevels()
model <- stan_glm(Species ~ Sepal.Width, data = data, family = "binomial", refresh = 0)
describe_posterior(model)
# Summary of Posterior Distribution
#
# Parameter | Median | 95% CI | pd | ROPE | % in ROPE | Rhat | ESS
# ---------------------------------------------------------------------------------------------
# (Intercept) | -6.16 | [-10.46, -2.30] | 99.95% | [-0.18, 0.18] | 0% | 1.001 | 2842.00
# Sepal.Width | 2.15 | [ 0.83, 3.64] | 99.92% | [-0.18, 0.18] | 0% | 1.001 | 2799.00