dCohen: Cohen's d

View source: R/dCohen.R

dCohenR Documentation

Cohen's d

Description

Calculate Cohen's d for one-sample t tests or two-sample independent tests or two-sample paired t-tests

Usage

dCohen(x, y = NULL, mu0 = 0, paired = FALSE)

Arguments

x

vector with (numeric) data

y

for two-sample tests, a vector with (numeric) data for group 2

mu0

for one-sample tests, the number to test against

paired

TRUE for a paired two-sample t-test, FALSE for an independent sample t-test

Value

value of Cohen's d

Examples

#one-sample
x=c(1:10,5,6,3:8)
dCohen(x,mu0=7)

#two-sample independent
y=1:15
dCohen(x,y)

#two-sample paired
dCohen(x,1:18,paired=TRUE)

smallstuff documentation built on May 29, 2024, 2:19 a.m.