odds_ratio {epitab}R Documentation

Builds a function used to calculate odds ratios.

Description

Builds a function to run logistic regression on the outcome variable of interest and return the odds ratios for each covariate level.

Usage

odds_ratio(outcome, adjusted = FALSE, relevel_baseline = FALSE,
  digits = 2, ci = TRUE)

Arguments

outcome

The dependent variable as a string.

adjusted

Whether to adjust for the other covariates, specified by independents argument to contingency_table.

relevel_baseline

Whether to use the largest level as the baseline.

digits

The number of digits to display.

ci

Whether to include a confidence interval in parentheses after the estimate.

Details

See documentation for contingency_table and vignette for usage.

Value

A function that is used to calculate odds ratios.


[Package epitab version 0.2.2 Index]