Convert from Probability to Odds Ratio

e_convert_probability_to_oddsratio(p = NULL, sw_percent = FALSE)

Arguments

p

list of probabilities

sw_percent

T/F input is percent

Value

or list of odds ratios

Examples

p <- c(0, 0.1, 0.2, 1/3, 1/2, 2/3, 0.8, 0.9)
e_convert_probability_to_oddsratio(p)
#> [1] 0.0000000 0.1111111 0.2500000 0.5000000 1.0000000 2.0000000 4.0000000
#> [8] 9.0000000