View source: R/convert_between_riskchange.R
oddsratio_to_riskratio | R Documentation |
Convert Between Odds Ratios, Risk Ratios and Other Metrics of Change in Probabilities
oddsratio_to_riskratio(OR, p0, log = FALSE, verbose = TRUE, ...)
oddsratio_to_arr(OR, p0, log = FALSE, verbose = TRUE, ...)
oddsratio_to_nnt(OR, p0, log = FALSE, verbose = TRUE, ...)
logoddsratio_to_riskratio(logOR, p0, log = TRUE, verbose = TRUE, ...)
logoddsratio_to_arr(logOR, p0, log = TRUE, verbose = TRUE, ...)
logoddsratio_to_nnt(logOR, p0, log = TRUE, verbose = TRUE, ...)
riskratio_to_oddsratio(RR, p0, log = FALSE, verbose = TRUE, ...)
riskratio_to_arr(RR, p0, verbose = TRUE, ...)
riskratio_to_logoddsratio(RR, p0, log = TRUE, verbose = TRUE, ...)
riskratio_to_nnt(RR, p0, verbose = TRUE, ...)
arr_to_riskratio(ARR, p0, verbose = TRUE, ...)
arr_to_oddsratio(ARR, p0, log = FALSE, verbose = TRUE, ...)
arr_to_logoddsratio(ARR, p0, log = TRUE, verbose = TRUE, ...)
arr_to_nnt(ARR, ...)
nnt_to_oddsratio(NNT, p0, log = FALSE, verbose = TRUE, ...)
nnt_to_logoddsratio(NNT, p0, log = TRUE, verbose = TRUE, ...)
nnt_to_riskratio(NNT, p0, verbose = TRUE, ...)
nnt_to_arr(NNT, ...)
OR , logOR , RR , ARR , NNT |
Odds-ratio of |
p0 |
Baseline risk |
log |
If:
|
verbose |
Toggle warnings and messages on or off. |
... |
Arguments passed to and from other methods. |
Converted index, or if OR
/logOR
is a logistic regression model, a
parameter table with the converted indices.
Grant, R. L. (2014). Converting an odds ratio to a range of plausible relative risks for better communication of research findings. Bmj, 348, f7450.
oddsratio()
, riskratio()
, arr()
, and nnt()
.
Other convert between effect sizes:
d_to_r()
,
diff_to_cles
,
eta2_to_f2()
,
odds_to_probs()
,
w_to_fei()
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_oddsratio(RR, p0 = p0)
oddsratio_to_riskratio(OR, p0 = p0)
riskratio_to_arr(RR, p0 = p0)
arr_to_oddsratio(nnt_to_arr(NNT), p0 = p0)
m <- glm(am ~ factor(cyl),
data = mtcars,
family = binomial()
)
oddsratio_to_riskratio(m, verbose = FALSE) # RR is relative to the intercept if p0 not provided
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.