dCohen {smallstuff}R 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)

[Package smallstuff version 1.0.3 Index]