convert_measures.Rd
These helper functions are mostly used internally to convert effect measures for the calculation of E-values. The approximate conversion of odds and hazard ratios to risk ratios depends on whether the rare outcome assumption is made.
toRR(est, rare, delta = 1, ...) toMD(est, delta = 1, ...)
est | The effect estimate; constructed with one of |
---|---|
rare | When converting a |
delta | When converting an |
... | Arguments passed to other methods. |
An object of class "estimate" and the desired effect measure. Also includes as an attribute its conversion history.
Uses the conversions listed in Table 2 of VanderWeele TJ, Ding P. Sensitivity Analysis in Observational Research: Introducing the E-Value. Annals of Internal Medicine. 2017;167(4):268–75.
See also VanderWeele TJ. Optimal approximate conversions of odds ratios and hazard ratios to risk ratios. Biometrics. 2019 Jan 6;(September 2018):1–7.
# Both odds ratios are 3, but will be treated differently # depending on whether rare outcome assumption is reasonable OR(3, rare = FALSE)#> [1] 3#> [1] 3#> [1] 1.732051#> [1] 3#> $class #> [1] "RR" "estimate" #> #> $sd #> [1] 1.2 #> #> $history #> [,1] [,2] #> [1,] "OLS" "3" #> [2,] "MD" "2.5" #>