convert_es: Convert effect sizes

View source: R/convert_es.R

convert_esR Documentation

Convert effect sizes

Description

This function converts a variety of effect sizes to correlations, Cohen's d values, or common language effect sizes, and calculates sampling error variances and effective sample sizes.

Usage

convert_es(
  es,
  input_es = c("r", "d", "delta", "g", "t", "p.t", "F", "p.F", "chisq", "p.chisq", "or",
    "lor", "Fisherz", "A", "auc", "cles"),
  output_es = c("r", "d", "A", "auc", "cles"),
  n1 = NULL,
  n2 = NULL,
  df1 = NULL,
  df2 = NULL,
  sd1 = NULL,
  sd2 = NULL,
  tails = 2
)

Arguments

es

Vector of effect sizes to convert.

input_es

Scalar. Metric of input effect sizes. Currently supports correlations, Cohen's d, independent samples t values (or their p values), two-group one-way ANOVA F values (or their p values), 1-df \chi^{2} values (or their p values), odds ratios, log odds ratios, Fisher z, and the common language effect size (CLES, A, AUC).

output_es

Scalar. Metric of output effect sizes. Currently supports correlations, Cohen's d values, and common language effect sizes (CLES, A, AUC).

n1

Vector of total sample sizes or sample sizes of group 1 of the two groups being contrasted.

n2

Vector of sample sizes of group 2 of the two groups being contrasted.

df1

Vector of input test statistic degrees of freedom (for t and \chi^{2}) or between-groups degree of freedom (for F).

df2

Vector of input test statistic within-group degrees of freedom (for F).

sd1

Vector of pooled (within-group) standard deviations or standard deviations of group 1 of the two groups being contrasted.

sd2

Vector of standard deviations of group 2 of the two groups being contrasted.

tails

Vector of the tails for p values when input_es = "p.t". Can be 2 (default) or 1.

Value

A data frame of class es with variables:

r, d, A

The converted effect sizes

n_effective

The effective total sample size

n

The total number of cases (original sample size)

n1, n2

If applicable, subgroup sample sizes

var_e

The estimated sampling error variance

References

Chinn, S. (2000). A simple method for converting an odds ratio to effect size for use in meta-analysis. Statistics in Medicine, 19(22), 3127–3131. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/1097-0258(20001130)19:22<3127::AID-SIM784>3.0.CO;2-M")}

Lipsey, M. W., & Wilson, D. B. (2001). Practical meta-analysis. Sage.

Ruscio, J. (2008). A probability-based measure of effect size: Robustness to base rates and other factors. Psychological Methods, 13(1), 19–30. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1037/1082-989X.13.1.19")}

Schmidt, F. L., & Hunter, J. E. (2015). Methods of meta-analysis: Correcting error and bias in research findings (3rd ed.). Sage. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.4135/9781483398105")}

Examples

convert_es(es = 1,  input_es="d", output_es="r", n1=100)
convert_es(es = 1, input_es="d", output_es="r", n1=50, n2 = 50)
convert_es(es = .2, input_es="r", output_es="d",  n1=100, n2=150)
convert_es(es = -1.3, input_es="t", output_es="r", n1 = 100, n2 = 140)
convert_es(es = 10.3, input_es="F", output_es="d", n1 = 100, n2 = 150)
convert_es(es = 1.3, input_es="chisq", output_es="r", n1 = 100, n2 = 100)
convert_es(es = .021, input_es="p.chisq", output_es="d", n1 = 100, n2 = 100)
convert_es(es = 4.37, input_es="or", output_es="r", n1=100, n2=100)
convert_es(es = 4.37, input_es="or", output_es="d", n1=100, n2=100)
convert_es(es = 1.47, input_es="lor", output_es="r", n1=100, n2=100)
convert_es(es = 1.47, input_es="lor", output_es="d", n1=100, n2=100)

psychmeta documentation built on June 22, 2024, 6:52 p.m.