es_from_2x2_prop function

Convert the proportion of occurrence of a binary event in two independent groups into several effect size measures

Convert the proportion of occurrence of a binary event in two independent groups into several effect size measures

es_from_2x2_prop( prop_cases_exp, prop_cases_nexp, n_exp, n_nexp, table_2x2_to_cor = "tetrachoric", reverse_prop )

Arguments

  • prop_cases_exp: proportion of cases/events in the exposed group (ranging from 0 to 1)
  • prop_cases_nexp: proportion of cases/events in the non-exposed group (ranging from 0 to 1)
  • n_exp: total number of participants in the exposed group
  • n_nexp: total number of participants in the non exposed group
  • table_2x2_to_cor: formula used to obtain a correlation coefficient from the contigency table (see details).
  • reverse_prop: a logical value indicating whether the direction of generated effect sizes should be flipped.

Returns

This function estimates and converts between several effect size measures.

natural effect size measureOR + RR + NNT
converted effect size measureD + G + R + Z
required input dataSee 'Section 7. Contingency (2x2) table or proportions'
https://metaconvert.org/input.html

Details

This function uses the proportions and sample size to recreate the 2x2 table, and then relies on the calculations of the es_from_2x2_sum() function.

The formulas used is to obtain the 2x2 table are

n_cases_exp=prop_cases_expn_exp n\_cases\_exp = prop\_cases\_exp * n\_exp n_cases_nexp=prop_cases_nexpn_nexp n\_cases\_nexp = prop\_cases\_nexp * n\_nexp n_controls_exp=(1prop_cases_exp)n_exp n\_controls\_exp = (1 - prop\_cases\_exp) * n\_exp n_controls_nexp=(1prop_cases_nexp)n_nexp n\_controls\_nexp = (1 - prop\_cases\_nexp) * n\_nexp

Examples

es_from_2x2_prop(prop_cases_exp = 0.80, prop_cases_nexp = 0.60, n_exp = 10, n_nexp = 20)
  • Maintainer: Corentin J. Gosling
  • License: GPL (>= 3)
  • Last published: 2025-04-11

Useful links