given two vectors:
x <- rnorm(10, 10, 1) y <- rnorm(10, 5, 5)
How to calculate Cohen\'s d for effect size?
For example, I want to
There are several packages providing a function for computing Cohen's d. You can for example use the cohensD function form the lsr package :
cohensD
lsr
library(lsr) set.seed(45) x <- rnorm(10, 10, 1) y <- rnorm(10, 5, 5) cohensD(x,y) # [1] 0.5199662