CohensD.unpairedT: Cohen's d from an unpaired (indepednet samples) t-test

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/CohensD.unpairedT.R

Description

Calculate's Cohen's d using results from an unpaired (indepednet samples) t-test

Usage

1
CohensD.unpairedT(t.val, n1, n2)

Arguments

t.val

t statistic from unpaired/indepednet samples t-test

n1

Sample size for group 1

n2

Sample size for group 2

Value

Cohen's d effect size

Author(s)

A. Alexander Beaujean

References

Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Mahwah, NJ: Erlbaum.

See Also

t.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#Simulate data
set.seed(4565)
Treat<-rnorm(100,.5,1)
set.seed(45651)
Control<-rnorm(100,0,1)
t<-t.test(Treat,Control, var.equal = TRUE)$statistic
nt<-length(Treat)
nc<-length(Control)

CohensD.unpairedT(t, nt, nc)

Example output

        d 
0.6128044 

BaylorEdPsych documentation built on May 1, 2019, 8:21 p.m.