cohens.d: Calculate Cohen's d effect size measure

View source: R/cohens.d.R

cohens.dR Documentation

Calculate Cohen's d effect size measure

Description

This function computes the standard error of the values in x. If na.rm is TRUE then missing values are removed before computation proceeds.

Usage

cohens.d(x, y)

Arguments

x

a numeric vector or an R object which is coercible to one by as.vector(x, "numeric").

y

a numeric vector or an R object which is coercible to one by as.vector(x, "numeric").

Details

Equivalent to sd divided by square root of n.

The standard error of a zero-length vector (after removal of NAs if na.rm = TRUE) is not defined and gives an error. The standard error of a length-one vector is NA.

Value

A list of components

m1

Mean of first variable

m2

Mean of second variable

ss.variance

Pooled variance

d

Cohen's d score

Author(s)

Jason Grafmiller

See Also

mean, sd

Examples

x <- rnorm(100, mean = 10, sd = 5)
y <- rnorm(125, mean = 15, sd = 3)

t.test(x, y)

cohens.d(x, y)

jasongraf1/JGmisc documentation built on July 8, 2024, 6:50 a.m.