es_from_or_pval function

Convert an odds ratio value and its standard error to several effect size measures

Convert an odds ratio value and its standard error to several effect size measures

es_from_or_pval( or, logor, or_pval, baseline_risk, small_margin_prop, n_exp, n_nexp, n_cases, n_controls, n_sample, or_to_rr = "metaumbrella_cases", or_to_cor = "bonett", reverse_or_pval )

Arguments

  • or: odds ratio value
  • logor: log odds ratio value
  • or_pval: p-value of the (log) odds ratio
  • 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
  • or_to_rr: formula used to convert the or value into a risk ratio (see details).
  • or_to_cor: formula used to convert the or value into a correlation coefficient (see details).
  • reverse_or_pval: 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 from a p-value (Section 6.3.2 in the Cochrane Handbook).

logor_z=qnorm(orpval/2,lower.tail=FALSE) logor\_z = qnorm(or_pval/2, lower.tail=FALSE) logor_se=log(or)logor_z logor\_se = |\frac{\log(or)}{logor\_z}|

Then, calculations of es_from_or_se() are applied.

Examples

es_or <- es_from_or_pval( or = 3.51, or_pval = 0.001, n_cases = 12, n_controls = 68 )

References

Higgins, J. P., Thomas, J., Chandler, J., Cumpston, M., Li, T., Page, M. J., & Welch, V. A. (Eds.). (2019). Cochrane handbook for systematic reviews of interventions. John Wiley & Sons.

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

Useful links