cohens_d_: Cohen's d

View source: R/cohens_d.R

cohens_d_R Documentation

Cohen's d

Description

Calculate Cohens'd from different statistics (see Details).

Usage

cohens_d_(
  m1 = NULL,
  m2 = NULL,
  sd1 = NULL,
  sd2 = NULL,
  n1 = NULL,
  n2 = NULL,
  t = NULL,
  n = NULL,
  paired = FALSE,
  corr = c("none", "hedges_g", "glass_delta")
)

Arguments

m1

Numeric, mean of the first group

m2

Numeric, mean of the second group

sd1

Numeric, standard deviation of the first group

sd2

Numeric, standard deviation of the second group

n1

Numeric, size of the first group

n2

Numeric, size of the second group

t

Numeric, t-test statistic

n

Numeric, total sample size

paired

Logical indicating whether to calculate Cohen's for independent samples or one sample (FALSE, default) or for dependent samples (TRUE).

corr

Character specifying the correction applied to calculation of the effect size: "none" (default) returns Cohen's d, "hedges_g" applies Hedges correction and "glass_delta" calculates Glass' \Delta (uses the standard deviation of the second group).

Details

The following combinations of statistics are possible:

  • m1, m2, sd1, sd2, n1 and n2

  • t, n1 and n2

  • t and n

References

Lakens, D. (2013). Calculating and reporting effect sizes to facilitate cumulative science: a practical primer for t-tests and ANOVAs. Frontiers in Psychology, 4, 863. doi:10.3389/fpsyg.2013.00863


dgromer/apa documentation built on Oct. 14, 2023, 7:45 p.m.