Description Usage Arguments Details Value Examples
Calculates Cohen's d for two sample comparisons.
1 2 3 4 5 6 7 8 |
data |
A |
response |
The response variable (dependent). |
group |
The group variable, usually a |
absolute |
If set to |
paired |
Whether the effect should be calculated for a paired
t-test, default is |
na.rm |
If |
The effect size here is Cohen's d as calculated by d = \frac{m_{diff}}{S_p}, where m_{diff} = \bar{x}_1 - \bar{x}_2 and S_p = √{ \frac{n_1 - 1 \cdot {s_{x_1}}^2 + n_2 - 1 \cdot {s_{x_2}}^2} {n_1 + n_2 - 2} } .
For paired = TRUE
, S_p is substituted by S_D = S_{x_1 - x_2}
via sd(x1 - x2)
.
numeric
of length 1.
1 2 3 | set.seed(42)
df <- data.frame(x = runif(100), group = sample(c("A", "B"), 100, TRUE))
effect_size_t(df, "x", "group")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.