es_from_rr_pval function

Convert a risk ratio value and its p-value to various effect size measures

Convert a risk ratio value and its p-value to various effect size measures

es_from_rr_pval( rr, logrr, rr_pval, baseline_risk, n_exp, n_nexp, n_cases, n_controls, rr_to_or = "metaumbrella", smd_to_cor = "viechtbauer", reverse_rr_pval )

Arguments

  • rr: risk ratio value
  • logrr: log risk ratio value
  • rr_pval: p-value of the risk ratio
  • baseline_risk: proportion of cases in the non-exposed group (only required for the rr_to_or = "grant_CI" and rr_to_or = "grant_2x2" arguments).
  • n_exp: number of participants in the exposed group (only required for the rr_to_or = "grant_CI", rr_to_or = "grant_2x2" arguments).
  • n_nexp: number of participants in the non-exposed group (only required for the rr_to_or = "grant_CI", rr_to_or = "grant_2x2" arguments).
  • n_cases: number of cases/events
  • n_controls: number of controls/no-event
  • rr_to_or: formula used to convert the rr value into an odds ratio (see details).
  • smd_to_cor: formula used to convert the SMD value (converted from RR) into a coefficient correlation (see es_from_cohen_d).
  • reverse_rr_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 measureRR
converted effect size measureOR + NNT
required input dataSee 'Section 3. Risk Ratio'
https://metaconvert.org/input.html

Details

This function uses the p-value of the (log) risk ratio to obtain the standard error (Section 6.3.2 in the Cochrane Handbook).

logrr_z=qnorm(rrpval/2,lower.tail=FALSE) logrr\_z = qnorm(rr_pval/2, lower.tail=FALSE) logrr_se=log(rr)logrr_z logrr\_se = |\frac{\log(rr)}{logrr\_z}|

Then, calculations of es_from_rr_se are applied.

Examples

es_rr <- es_from_rr_pval( rr = 3.51, rr_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