Compute effect size from a 2 by 2 frequency table.

esc_2x2(
  grp1yes,
  grp1no,
  grp2yes,
  grp2no,
  es.type = c("logit", "d", "g", "or", "r", "f", "eta", "cox.d"),
  study = NULL,
  ...
)

Arguments

grp1yes

Size of treatment group with successes (outcome = yes).

grp1no

Size of treatment group with non-successes (outcome = no).

grp2yes

Size of control group with successes (outcome = yes).

grp2no

Size of control group with non-successes (outcome = no).

es.type

Type of effect size that should be returned.

"d"

returns standardized mean difference effect size d

"f"

returns effect size Cohen's f

"g"

returns adjusted standardized mean difference effect size Hedges' g

"or"

returns effect size as odds ratio

"cox.or"

returns effect size as Cox-odds ratio (see convert_d2or for details)

"logit"

returns effect size as log odds

"cox.log"

returns effect size as Cox-log odds (see convert_d2logit for details)

"r"

returns correlation effect size r

"eta"

returns effect size eta squared

study

Optional string with the study name. Using combine_esc or as.data.frame on esc-objects will add this as column in the returned data frame.

...

Other parameters, passed down to further functions. For internal use only, can be ignored.

Value

The effect size es, the standard error se, the variance of the effect size var, the lower and upper confidence limits ci.lo and ci.hi, the weight factor w and the total sample size totaln.

Note

If es.type = "r", Fisher's transformation for the effect size r and their confidence intervals are also returned.

References

Lipsey MW, Wilson DB. 2001. Practical meta-analysis. Thousand Oaks, Calif: Sage Publications

Wilson DB. 2016. Formulas Used by the "Practical Meta-Analysis Effect Size Calculator". Unpublished manuscript: George Mason University

Examples

# effect size log odds esc_2x2(grp1yes = 30, grp1no = 50, grp2yes = 40, grp2no = 45)
#> #> Effect Size Calculation for Meta Analysis #> #> Conversion: 2x2 table (OR) to effect size logits #> Effect Size: -0.3930 #> Standard Error: 0.3171 #> Variance: 0.1006 #> Lower CI: -1.0146 #> Upper CI: 0.2285 #> Weight: 9.9448
# effect size odds ratio esc_2x2(grp1yes = 30, grp1no = 50, grp2yes = 40, grp2no = 45, es.type = "or")
#> #> Effect Size Calculation for Meta Analysis #> #> Conversion: 2x2 table (OR) coefficient to effect size odds ratio #> Effect Size: 0.6750 #> Standard Error: 0.3171 #> Variance: 0.1006 #> Lower CI: 0.3626 #> Upper CI: 1.2567 #> Weight: 9.9448