es_from_2x2_sum function

Convert a table with the number of cases and row marginal sums into several effect size measures

Convert a table with the number of cases and row marginal sums into several effect size measures

es_from_2x2_sum( n_cases_exp, n_exp, n_cases_nexp, n_nexp, table_2x2_to_cor = "tetrachoric", reverse_2x2 )

Arguments

  • n_cases_exp: number of cases/events in the exposed group
  • n_exp: total number of participants in the exposed group
  • n_cases_nexp: number of cases/events in the non 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_2x2: 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 number of cases in both the exposed and non-exposed groups and the total number of participants exposed and non-exposed to recreate a 2x2 table. Then relies on the calculations of the es_from_2x2 function.

n_controls_exp=n_expn_cases_exp n\_controls\_exp = n\_exp - n\_cases\_exp n_controls_nexp=n_nexpn_cases_nexp n\_controls\_nexp = n\_nexp - n\_cases\_nexp

Examples

es_from_2x2_sum(n_cases_exp = 10, n_exp = 40, n_cases_nexp = 25, n_nexp = 47)
  • Maintainer: Corentin J. Gosling
  • License: GPL (>= 3)
  • Last published: 2025-04-11

Useful links