create_OR_table {easyORtables} | R Documentation |
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"))
[Package easyORtables version 0.0.1 Index]