Calculate Cohen's d and Hedges' g introduced in Lakens (2013).
Usage
Cohen_d_s(
y1,
y2,
alternative = "two.sided",
alpha = 0.05,
mu = 0,
return_CI = FALSE
)
Hedges_g_s(
y1,
y2,
alternative = "two.sided",
alpha = 0.05,
mu = 0,
return_CI = FALSE
)Arguments
- y1
A numeric vector.
- y2
A numeric vector.
- alternative
Character (default:
"two.sided"). Specifies the alternative hypothesis. Available options arec("two.sided", "less", "greater").- alpha
Numeric (default: 0.05). Significance level (0 - 1) for hypothesis testing.
- mu
Numeric (default: 0).
- return_CI
Logical (default: FALSE). Whether to return the confidence interval of the effect size.
Details
Refer to Lakens (2013), the Cohen's d is the formula 1, the Hedges' g is the formula 4.
Their confidence interval (CI) were calculated based on formula 2, by transforming the d and g
back to t to fit the general confidence interval calculation.
For detailed and precise CI estimates, please use the effectsize package.