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
Another option is to use the effsize package.
library(effsize) set.seed(45) x <- rnorm(10, 10, 1) y <- rnorm(10, 5, 5) cohen.d(x,y) # Cohen's d # d estimate: 0.5199662 (medium) # 95 percent confidence interval: # inf sup # -0.4353393 1.4752717