es_from_or_ci function

Convert an odds ratio value and its 95% confidence interval to several effect size measures

Convert an odds ratio value and its 95% confidence interval to several effect size measures

es_from_or_ci( or, or_ci_lo, or_ci_up, logor, logor_ci_lo, logor_ci_up, baseline_risk, small_margin_prop, n_exp, n_nexp, n_cases, n_controls, n_sample, max_asymmetry = 10, or_to_cor = "bonett", or_to_rr = "metaumbrella_cases", reverse_or )

Arguments

  • or: odds ratio value
  • or_ci_lo: lower bound of the 95% CI around the odds ratio value
  • or_ci_up: upper bound of the 95% CI around the odds ratio value
  • logor: log odds ratio value
  • logor_ci_lo: lower bound of the 95% CI around the log odds ratio value
  • logor_ci_up: upper bound of the 95% CI around the log odds ratio value
  • baseline_risk: proportion of cases in the non-exposed group (only required for the or_to_rr = "grant" argument).
  • small_margin_prop: smallest margin proportion of the underlying 2x2 table
  • n_exp: number of participants in the exposed group (only required for the or_to_rr = "grant", and or_to_rr = "metaumbrella_exp" arguments)
  • n_nexp: number of participants in the non-exposed group (only required for the or_to_rr = "grant", and or_to_rr = "metaumbrella_exp" arguments)
  • n_cases: number of cases/events
  • n_controls: number of controls/no-event
  • n_sample: total number of participants in the sample
  • max_asymmetry: A percentage indicating the tolerance before detecting asymmetry in the 95% CI bounds.
  • or_to_cor: formula used to convert the or value into a correlation coefficient (see details).
  • or_to_rr: formula used to convert the or value into a risk ratio (see details).
  • reverse_or: a logical value indicating whether the direction of the generated effect sizes should be flipped.

Returns

This function estimates and converts between several effect size measures.

natural effect size measureOR
converted effect size measureRR + NNT
D + G + R + Z
required input dataSee 'Section 2. Odds Ratio'
https://metaconvert.org/input.html

Details

This function computes the standard error of the (log) odds ratio into a standard error (Section 6.5.2.2 in the Cochrane Handbook).

logor_se=logor_ci_uplogor_ci_lo2qnorm(.975) logor\_se = \frac{\log{or\_ci\_up} - \log{or\_ci\_lo}}{2 * qnorm(.975)}

Then, calculations of es_from_or_se are applied.

Examples

es_or <- es_from_or_ci( or = 1, or_ci_lo = 0.5, or_ci_up = 2, n_cases = 42, n_controls = 38, baseline_risk = 0.08, or_to_rr = "grant" )

References

Higgins JPT, Li T, Deeks JJ (editors). Chapter 6: Choosing effect size measures and computing estimates of effect. In: Higgins JPT, Thomas J, Chandler J, Cumpston M, Li T, Page MJ, Welch VA (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.3 (updated February 2022). Cochrane, 2022. Available from www.training.cochrane.org/handbook.

  • Maintainer: Corentin J. Gosling
  • License: GPL (>= 3)
  • Last published: 2025-04-11

Useful links