Skip to contents

Odds-ratio table from a fitted logistic GLM

Usage

odds_ratio_table(
  model,
  confidence = 0.95,
  digits = 3L,
  apa = FALSE,
  output_format = "dataframe",
  title = "Odds Ratios"
)

Arguments

model

A fitted glm with family = binomial().

confidence

Confidence level.

digits

Decimal places.

apa

APA formatting.

output_format

Output target.

title

Title.

Value

A character string.

Examples

set.seed(1)
df <- data.frame(y = rbinom(80, 1, 0.4), x = rnorm(80))
fit <- stats::glm(y ~ x, family = binomial(), data = df)
odds_ratio_table(fit)
#>                OR         95% CI p.value X.
#> (Intercept) 0.734 (0.469, 1.149)   0.176   
#> x           1.059 (0.640, 1.753)   0.823