Converting Between r, d, and Odds Ratios (2024)

The effectsize package contains function to convertamong indices of effect size. This can be useful for meta-analyses, orany comparison between different types of statistical analyses.

The most basic conversion is between r values, a measure ofstandardized association between two continuous measures, and dvalues (such as Cohen’s d), a measure of standardizeddifferences between two groups / conditions.

Let’s looks at some (simulated) data:

library(effectsize)data("hardlyworking")head(hardlyworking)
> salary xtra_hours n_comps age seniority is_senior> 1 19745 4.16 1 32 3 FALSE> 2 11302 1.62 0 34 3 FALSE> 3 20636 1.19 3 33 5 TRUE> 4 23047 7.19 1 35 3 FALSE> 5 27342 11.26 0 33 4 FALSE> 6 25657 3.63 2 30 5 TRUE

We can compute Cohen’s d between the two groups:

cohens_d(salary ~ is_senior, data = hardlyworking)
> Cohen's d | 95% CI> --------------------------> -0.72 | [-0.90, -0.53]> > - Estimated using pooled SD.

But we can also compute a point-biserial correlation, which isPearson’s r when treating the 2-level is_seniorvariable as a numeric binary variable:

correlation::cor_test(hardlyworking, "salary", "is_senior")
> Parameter1 | Parameter2 | r | 95% CI | t(498) | p> ------------------------------------------------------------------> salary | is_senior | 0.34 | [0.26, 0.41] | 7.95 | < .001***> > Observations: 500

But what if we only have summary statistics? Say, we only have \(d=-0.72\) and we want to know what ther would have been? We can approximate r using thefollowing formula (Borenstein et al.2009):

\[r \approx \frac{d}{\sqrt{d^2 + 4}}\] And indeed, if we use d_to_r(), we get a prettydecent approximation:

d_to_r(-0.72)
> [1] -0.339

(Which also works in the other way, with r_to_d(0.12)gives 0.723)

As we can see, these are rough approximations, but they can be usefulwhen we don’t have the raw data on hand.

In multiple regression

Although not exactly a classic Cohen’s d, we can also approximate apartial-d value (that is, the standardized difference betweentwo groups / conditions, with variance from other predictors partilledout). For example:

fit <- lm(salary ~ is_senior + xtra_hours, data = hardlyworking)parameters::model_parameters(fit)
> Parameter | Coefficient | SE | 95% CI | t(497) | p> -----------------------------------------------------------------------------> (Intercept) | 14258.87 | 238.71 | [13789.86, 14727.87] | 59.73 | < .001> is seniorTRUE | 1683.65 | 316.85 | [ 1061.12, 2306.17] | 5.31 | < .001> xtra hours | 1257.75 | 40.33 | [ 1178.51, 1336.99] | 31.19 | < .001
> > Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed> using a Wald t-distribution approximation.
# A couple of ways to get partial-d:1683.65 / sigma(fit)
> [1] 0.495
t_to_d(5.31, df_error = 497)[[1]]
> [1] 0.476

We can convert these semi-d values to r values, butin this case these represent the partial correlation:

t_to_r(5.31, df_error = 497)
> r | 95% CI> -------------------> 0.23 | [0.15, 0.31]
correlation::correlation(hardlyworking[, c("salary", "xtra_hours", "is_senior")], include_factors = TRUE, partial = TRUE)[2, ]
> # Correlation Matrix (pearson-method)> > Parameter1 | Parameter2 | r | 95% CI | t(498) | p> ------------------------------------------------------------------> salary | is_senior | 0.23 | [0.15, 0.31] | 5.32 | < .001***> > p-value adjustment method: Holm (1979)> Observations: 500
# all close to:d_to_r(0.47)
> [1] 0.229

In binomial regression (more specifically in logistic regression),Odds ratios (OR) are themselves measures of effect size; they indicatethe expected change in the odds of a some event.

In some fields, it is common to dichotomize outcomes in order to beable to analyze them with logistic models. For example, if the outcomeis the count of white blood cells, it can be more useful (medically) topredict the crossing of the threshold rather than the raw count itself.And so, where some scientists would maybe analyze the above data with at-test and present Cohen’s d, others might analyze itwith a logistic regression model on the dichotomized outcome, andpresent OR. So the question can be asked: given such a OR, what wouldCohen’s d have been?

Fortunately, there is a formula to approximate this (Sánchez-Meca, Marı́n-Martı́nez, and Chacón-Moscoso2003):

\[d = log(OR) \times \frac{\sqrt{3}}{\pi}\]

which is implemented in the oddsratio_to_d()function.

Let’s give it a try:

# 1. Set a thresholdthresh <- 22500# 2. dichotomize the outcomehardlyworking$salary_high <- hardlyworking$salary < thresh# 3. Fit a logistic regression:fit <- glm(salary_high ~ is_senior, data = hardlyworking, family = binomial())parameters::model_parameters(fit)
> Parameter | Log-Odds | SE | 95% CI | z | p> -----------------------------------------------------------------> (Intercept) | 1.55 | 0.16 | [ 1.25, 1.87] | 9.86 | < .001> is seniorTRUE | -1.22 | 0.21 | [-1.63, -0.82] | -5.86 | < .001
> > Uncertainty intervals (profile-likelihood) and p-values (two-tailed)> computed using a Wald z-distribution approximation.
> > The model has a log- or logit-link. Consider using `exponentiate => TRUE` to interpret coefficients as ratios.
# Convert log(OR) (the coefficient) to doddsratio_to_d(-1.22, log = TRUE)
> [1] -0.673
Converting Between r, d, and Odds Ratios (2024)

FAQs

How do you convert rate ratio to odds ratio? ›

To convert, you should abstract from your studies reporting rate ratios the number of participants for each study arm (intervention / control, etc.) and the number of events dichotomized by study arm. Construct a 2 x 2 table from those 4 values and calculate your odds ratio.

How to convert odds ratio to correlation coefficient? ›

There is no transformation that converts an odds ratio or relative risk into a correlation.

How do you choose between odds ratio and relative risk? ›

However, in studies comparing the incidence of an event (e.g., clinical trials and cohort studies), relative risk is often the preferred measure of association because the odds ratio will always 'overstate' the magnitude of the effect (i.e., the odds ratios will be smaller than the relative risk for risk ratios less ...

How do you convert odds ratio to relative risk reduction? ›

Thus the odds ratio is (a/b) / (c/d) which simplifies to ad/bc. This is compared to the relative risk which is (a / (a+b)) / (c / (c+d)). If the disease condition (event) is rare, then the odds ratio and relative risk may be comparable, but the odds ratio will overestimate the risk if the disease is more common.

What is the difference between rate ratio and odds ratio? ›

Risk ratios and rate ratios are derived from randomized trials or cohort studies while odds ratios are calculated from case-control studies.

How do you convert odds ratio to risk ratio in R? ›

To convert an odds ratio to a risk ratio, you can use "RR = OR / (1 – p + (p x OR)), where p is the risk in the control group" (source: http://www.r-bloggers.com/how-to-convert-odds-ratios-to-relative-risks/).

How do you change coefficient to odds ratio? ›

To calculate the odds ratio, exponentiate the coefficient for a predictor. The result is the odds ratio for when the predictor is x+1, compared to when the predictor is x. For example, if the odds ratio for mass in kilograms is 0.95, then for each additional kilogram, the probability of the event decreases by about 5%.

What is the difference between odds ratio and correlation coefficient? ›

compared to a correlation coefficient. A correllation will tell you that there is a significant association between variable X and variable Y..but an odds ration goes further to tell you how variable X and Y is related.

What is the formula for odds ratio? ›

This calculator uses the following formulae to calculate the odds ratio (or) and its confidence interval (ci). or = a*d / b*c, where: a is the number of times both A and B are present, b is the number of times A is present, but B is absent, c is the number of times A is absent, but B is present, and.

How to interpret odds ratio and risk ratio? ›

A relative risk or odds ratio greater than one indicates an exposure to be harmful, while a value less than one indicates a protective effect. RR = 1.2 means exposed people are 20% more likely to be diseased, RR = 1.4 means 40% more likely. OR = 1.2 means that the odds of disease is 20% higher in exposed people.

When not to use odds ratio? ›

Unfortunately, there is a recognised problem that odds ratios do not approximate well to the relative risk when the initial risk (that is, the prevalence of the outcome of interest) is high. Thus there is a danger that if odds ratios are interpreted as though they were relative risks then they may mislead.

How to interpret RR? ›

A relative risk of one implies there is no difference of the event if the exposure has or has not occurred. If the relative risk is greater than 1, then the event is more likely to occur if there was exposure. If the relative risk is less than 1, then the event is less likely to occur if there was exposure.

How do you convert odds ratio? ›

Divide the odds by one plus the odds to convert the odds to a probability. Therefore, to convert 1/7 odds to a probability, divide 1/7 by 10/7 to get 0.10 as the result.

How do you convert odds ratio to number needed to treat? ›

Number Needed to Treat (NNT)
  1. Definition. ...
  2. Calculation. ...
  3. Example. ...
  4. Converting Odds Ratios to NNTs. ...
  5. NNT = (1-(PEER*(1-OR))) / ((1-PEER)*(PEER)*(1-OR)) ...
  6. NNH = ((PEER*(OR-1))+1) / (PEER*(OR-1)*(1-PEER))

How to convert relative risk reduction to absolute risk reduction? ›

Relative Risk Reduction = |EER-CER|/CER

The absolute risk of disease is 0.001%. The relative risk is 0.00001/0.001 = 0.1 and the relative risk reduction is 1- 0.1 = . 9 or 90% while the absolute risk reduction is 0.00001-0.001=-0.00099 or 0.099%.

How do you calculate the rate ratio? ›

Rate ratios are closely related to risk ratios, but they are computed as the ratio of the incidence rate in an exposed group divided by the incidence rate in an unexposed (or less exposed) comparison group. The rate in those NOT using hormones was 60 / 51,477.5 = 116.6 per 100,000 person-years.

How do you convert probability to odds ratio? ›

To convert from a probability to odds, divide the probability by one minus that probability. So if the probability is 10% or 0.10 , then the odds are 0.1/0.9 or '1 to 9' or 0.111. To convert from odds to a probability, divide the odds by one plus the odds.

What does an odds ratio of 1.5 mean? ›

As an example, if the odds ratio is 1.5, the odds of disease after being exposed are 1.5 times greater than the odds of disease if you were not exposed another way to think of it is that there is a 50% increase in the odds of disease if you are exposed.

Top Articles
💲Bulk Lot 40x 48v fat-tire Ebike LG shimano Throttle+PAS🌐STELBER.COM - bicycles - by dealer - bike sale - craigslist
SKID STEER - AMFG SPORKS PALLET FORKS 6K LB - USA MADE! WWW.IDIGTX.COM - heavy equipment - by dealer - sale - craigslist
Devotion Showtimes Near Xscape Theatres Blankenbaker 16
The Blackening Showtimes Near Century Aurora And Xd
My Boyfriend Has No Money And I Pay For Everything
Ati Capstone Orientation Video Quiz
Lesson 3 Homework Practice Measures Of Variation Answer Key
Iron Drop Cafe
Es.cvs.com/Otchs/Devoted
Ssefth1203
83600 Block Of 11Th Street East Palmdale Ca
Skylar Vox Bra Size
Marion County Wv Tax Maps
About Us | TQL Careers
Nj State Police Private Detective Unit
Available Training - Acadis® Portal
Google Feud Unblocked 6969
Craftology East Peoria Il
Classic | Cyclone RakeAmerica's #1 Lawn and Leaf Vacuum
Costco Great Oaks Gas Price
What Is Vioc On Credit Card Statement
Skip The Games Fairbanks Alaska
C&T Wok Menu - Morrisville, NC Restaurant
Riversweeps Admin Login
Crossword Help - Find Missing Letters & Solve Clues
Myql Loan Login
University Of Michigan Paging System
Local Collector Buying Old Motorcycles Z1 KZ900 KZ 900 KZ1000 Kawasaki - wanted - by dealer - sale - craigslist
Marokko houdt honderden mensen tegen die illegaal grens met Spaanse stad Ceuta wilden oversteken
Publix Near 12401 International Drive
Tinyzonehd
Downtown Dispensary Promo Code
Sinfuldeed Leaked
Redbox Walmart Near Me
South Florida residents must earn more than $100,000 to avoid being 'rent burdened'
Human Unitec International Inc (HMNU) Stock Price History Chart & Technical Analysis Graph - TipRanks.com
Pokemon Reborn Locations
Busch Gardens Wait Times
Section 212 at MetLife Stadium
Gun Mayhem Watchdocumentaries
R/Moissanite
Jasgotgass2
Casamba Mobile Login
10 Rarest and Most Valuable Milk Glass Pieces: Value Guide
Sound Of Freedom Showtimes Near Lewisburg Cinema 8
Three V Plymouth
Tableaux, mobilier et objets d'art
Craigslist Antique
Dineren en overnachten in Boutique Hotel The Church in Arnhem - Priya Loves Food & Travel
Who uses the Fandom Wiki anymore?
Craigslist Charles Town West Virginia
Ingersoll Greenwood Funeral Home Obituaries
Latest Posts
Article information

Author: Madonna Wisozk

Last Updated:

Views: 6437

Rating: 4.8 / 5 (68 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Madonna Wisozk

Birthday: 2001-02-23

Address: 656 Gerhold Summit, Sidneyberg, FL 78179-2512

Phone: +6742282696652

Job: Customer Banking Liaison

Hobby: Flower arranging, Yo-yoing, Tai chi, Rowing, Macrame, Urban exploration, Knife making

Introduction: My name is Madonna Wisozk, I am a attractive, healthy, thoughtful, faithful, open, vivacious, zany person who loves writing and wants to share my knowledge and understanding with you.