View source: R/convert_between_riskchange_ro_probs.R
| oddsratio_to_probs | R Documentation |
Convert Between Metrics of Change in Probabilities and Probabilities
oddsratio_to_probs(OR, p0, log = FALSE, odds = FALSE, ...)
logoddsratio_to_probs(logOR, p0, log = TRUE, odds = FALSE, ...)
riskratio_to_probs(RR, p0, odds = FALSE, ...)
arr_to_probs(ARR, p0, odds = FALSE, ...)
nnt_to_probs(NNT, p0, odds = FALSE, ...)
OR, logOR, RR, ARR, NNT |
Odds-ratio of |
p0 |
Baseline risk |
log |
If:
|
odds |
Should odds be returned instead of probabilities? |
... |
Arguments passed to and from other methods. |
Probabilities (or probability odds).
oddsratio(), riskratio(), arr(), and nnt(),
odds_to_probs(), and oddsratio_to_arr() and others.
p0 <- 0.4
p1 <- 0.7
(OR <- probs_to_odds(p1) / probs_to_odds(p0))
(RR <- p1 / p0)
(ARR <- p1 - p0)
(NNT <- arr_to_nnt(ARR))
riskratio_to_probs(RR, p0 = p0)
oddsratio_to_probs(OR, p0 = p0)
all.equal(nnt_to_probs(NNT, p0 = p0, odds = TRUE),
probs_to_odds(p1))
arr_to_probs(-ARR, p0 = p1)
nnt_to_probs(-NNT, p0 = p1)
# RR |>
# riskratio_to_arr(p0) |>
# arr_to_oddsratio(p0) |>
# oddsratio_to_nnt(p0) |>
# nnt_to_probs(p0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.