OR, logOR, RR, ARR, NNT: Odds-ratio of odds(p1)/odds(p0), log-Odds-ratio of log(odds(p1)/odds(p0)), Risk ratio of p1/p0, Absolute Risk Reduction of p1 - p0, or Number-needed-to-treat of 1/(p1 - p0). OR and logOR
can also be a logistic regression model.
p0: Baseline risk
log: If:
TRUE:
In oddsratio_to_*(), OR input is treated as log(OR).
In *_to_oddsratio(), returned value is log(OR).
FALSE:
In logoddsratio_to_*(), logOR input is treated as OR.
In *_to_logoddsratio(), returned value is OR.
verbose: Toggle warnings and messages on or off.
...: Arguments passed to and from other methods.
Returns
Converted index, or if OR/logOR is a logistic regression model, a parameter table with the converted indices.
Examples
p0 <-0.4p1 <-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
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
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()