Learn R Programming

selection (version 1.0)

d.computation: Compute Cohen's d

Description

Compute Cohen's d

Usage

d.computation(y, group, short = TRUE, target.group = NULL)

Arguments

y
The y variable (quantitative) on which group differences are to be assessed.
group
The grouping variable
short
Logical. If true, it will only output the value of d. Otherwise, it also outputs the mean differences, the pooled variance, and the pair of means.
target.group
The group to reference.

Value

  • If short=FALSE, the mean differences, the pooled variance, and the pair of means. Otherwise, just the d.

Details

Cohen's d is used to assess average group differences, regardless of sample size. It is consequently a measure of effect size.

Examples

Run this code
data(iris)
d.computation(iris$Petal.Width, iris$Species, short=FALSE)

Run the code above in your browser using DataLab