fmt_effect: format estimated regression coefficients from a model. It is...

Description Usage Arguments

View source: R/format.R

Description

format estimated regression coefficients from a model. It is common to present effects in terms of odds ratios, prevalence ratios, or hazard ratios by applying the exponential function (exp) to the regression coefficients. It is also common to present these ratios with 95 (i.e., conf_level = 0.95) in model summary tables.

Usage

1
2
fmt_effect(effect, std.error, transform = NULL, conf_level = NULL,
  reference_index = NULL, reference_label = "1 (reference)")

Arguments

effect

a numeric vector of estimated regression coefficients

std.error

a numeric vector of standard error estimates corresponding to the regression coefficients in the effect vector.

transform

a function that will be applied to the values in effect (e.g., exponentiating to produce odds ratios).

conf_level

(optional) the desired confidence level for interval estimation. It is common to use conf_level = 0.95 to produce 95 confidence intervals.

reference_index

(optional) If there is a referent group in the effect values, specify the indices of the group. For example, if effect = c(0, 1/2, 1) describing the relative increase in hazard for groups B and C relative to A, then reference_index = 1.

reference_label

(optional) a string indicating how the reference group will be labeled in representations of the model effects.


bcjaeger/rpriori documentation built on Nov. 4, 2019, 6:52 a.m.