chapter: 8 効果量の変換
後で加筆。
8.1 統計量から効果量への変換
8.1.1 t -> d
set.seed(123)
<- rnorm(100, 60, 10)
A <- rnorm(100, 50, 10)
B # t to d
<- t.test(A, B)
res.st cohens_d(A, B)
## Cohen's d | 95% CI
## ------------------------
## 1.27 | [0.97, 1.58]
##
## - Estimated using pooled SD.
t_to_d(res.st$statistic[1], res.st$parameter) #近似値
## d | 95% CI
## -------------------
## 1.28 | [0.97, 1.59]
<- 2*res.st$statistic[1]/sqrt(res.st$parameter) dhat
8.2 効果量から効果量への変換
8.2.1 d <-> r
# Converting Between Indices of Effect Size -------------------------------
# d to r
<- rep(c(0, 1), each=100)
group set.seed(123)
<- rnorm(100, 50, 10)
A <- rnorm(100, 60, 10)
B <- data.frame(group=group, outcome=c(A, B))
dat
cor(dat) #点双列相関
## group outcome
## group 1.0000000 0.3939704
## outcome 0.3939704 1.0000000
<- cohens_d(dat$outcome[group==1], dat$outcome[group==0])$Cohens_d
d <- cor(dat$group, dat$outcome)
r <- r_to_d(r)
d_convert <- d_to_r(d) r_convert