Title: Easy Odds Ratio Tables
Version: 0.0.1
Description: Creates text, 'LaTeX', Markdown, or Bootstrap-styled HTML-formatted odds ratio tables with confidence intervals for multiple logistic regression models.
License: MIT + file LICENSE
Encoding: UTF-8
Imports: stats, knitr, kableExtra, MASS
RoxygenNote: 7.3.1
NeedsCompilation: no
Packaged: 2024-06-16 19:56:55 UTC; neilmehta
Author: Neil Mehta ORCID iD [aut, cre]
Maintainer: Neil Mehta <neilmhta@gmail.com>
Repository: CRAN
Date/Publication: 2024-06-18 14:20:02 UTC

Create Odds Ratio Table

Description

This function creates a table displaying odds ratios with confidence intervals for logistic regression models.

Usage

create_OR_table(
  ...,
  output_format = c("markdown", "latex", "html", "plaintext"),
  bootstrap_options = NULL
)

Arguments

...

One or more logistic regression models.

output_format

The output format for the table. Can be "markdown", "latex", "html", or "plaintext". Default is "plaintext".

bootstrap_options

A character vector of Bootstrap table styles for HTML output. Default is NULL.

Value

Displays a formatted table of odds ratios with confidence intervals.

Examples

# Simulate data
set.seed(123)
dataset <- data.frame(
  response = sample(c(0, 1), 100, replace = TRUE),
  var1 = rnorm(100),
  var2 = rnorm(100),
  var3 = rnorm(100)
)

# Fit logistic regression models
model1 <- glm(response ~ var1 + var2, family = binomial, data = dataset)
model2 <- glm(response ~ var1 + var2 + var3, family = binomial, data = dataset)

# Create OR table as plaintext
create_OR_table(model1, model2)

# Create OR table with custom bootstrap options and HTML
create_OR_table(model1, model2, output_format="html", bootstrap_options = c("striped", "hover"))