View source: R/convert_between_OR_to_RR.R
oddsratio_to_riskratio | R Documentation |
Convert Between Odds Ratios and Risk Ratios
oddsratio_to_riskratio(OR, p0, log = FALSE, ...) riskratio_to_oddsratio(RR, p0, log = FALSE)
OR, RR |
Risk ratio of |
p0 |
Baseline risk |
log |
Take in or output the log of the ratio (such as in logistic models). |
... |
Arguments passed to and from other methods. |
Converted index, or if OR
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()
and riskratio()
Other convert between effect sizes:
d_to_r()
,
diff_to_cles
,
eta2_to_f2()
,
odds_to_probs()
p0 <- 0.4 p1 <- 0.7 (OR <- probs_to_odds(p1) / probs_to_odds(p0)) (RR <- p1 / p0) riskratio_to_oddsratio(RR, p0 = p0) oddsratio_to_riskratio(OR, p0 = p0) m <- glm(am ~ factor(cyl), data = mtcars, family = binomial() ) oddsratio_to_riskratio(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.