hazard_ratio: Builds a function used to calculate hazard ratios.

Description Usage Arguments Details Value

Description

Builds a function to fit a Cox model to the outcome survival object and returns the hazard ratios for each covariate level.

Usage

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

Arguments

outcome

The dependent variable, specifies a Surv object as a string. For example, hazard_ratio("Surv(time, status)").

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 hazard ratios.


stulacy/epitab documentation built on May 30, 2019, 4:41 p.m.