Package 'easyORtables'

Title: Easy Odds Ratio Tables
Description: Creates text, 'LaTeX', Markdown, or Bootstrap-styled HTML-formatted odds ratio tables with confidence intervals for multiple logistic regression models.
Authors: Neil Mehta [aut, cre]
Maintainer: Neil Mehta <[email protected]>
License: MIT + file LICENSE
Version: 0.0.1
Built: 2024-09-17 04:42:01 UTC
Source: https://github.com/cran/easyORtables

Help Index


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"))