Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

oddsratio_to_riskratio

Convert between Odds ratios and Risk ratios


Description

Convert between Odds ratios and Risk ratios

Usage

oddsratio_to_riskratio(OR, p0, log = FALSE)

riskratio_to_oddsratio(RR, p0, log = FALSE)

Arguments

OR, RR

Risk ratio of p1/p0 or Odds ratio of odds(p1)/odds(p0), possibly log-ed.

p0

Baseline risk

log

Take in or output the log of the ratio (such as in logistic models).

Value

Converted index.

References

Grant, R. L. (2014). Converting an odds ratio to a range of plausible relative risks for better communication of research findings. Bmj, 348, f7450.

See Also

Other convert between effect sizes: d_to_common_language(), d_to_r(), eta2_to_f2(), odds_to_probs()

Examples

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)

effectsize

Indices of Effect Size and Standardized Parameters

v0.4.4-1
GPL-3
Authors
Mattan S. Ben-Shachar [aut, cre] (<https://orcid.org/0000-0002-4287-4801>), Dominique Makowski [aut] (<https://orcid.org/0000-0001-5375-9967>), Daniel Lüdecke [aut] (<https://orcid.org/0000-0002-8895-3206>), Indrajeet Patil [ctb] (<https://orcid.org/0000-0003-1995-6531>, @patilindrajeets), Ken Kelley [ctb], David Stanley [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.