Description Usage Arguments Details Value References Examples
This function converts means, standard deviations, and sample sizes to Cohen's d.
1 | d_from_means(m1, m2, sd1, sd2, n1, n2, bias_correct = FALSE)
|
m1, m2 |
A numerical vector with the means of the two groups formed by the dichotomous variable. |
sd1, sd2 |
A numerical vector with the standard deviations of the two
groups formed by the dichotomous variable. Note that the nth element of
these vectors must correspond to the nth elements of the |
n1, n2 |
A numerical vector with the sample sizes of the two groups
formed by the dichotomous variable. Note that the nth element of these
vectors must correspond to the nth elements of the |
bias_correct |
Logical to indicate if the d-values should be bias-corrected. Can also be a vector. |
The formula that is used is the following (see e.g. Lakens, 2013):
d= \frac{\bar{X}_1 - \bar{X}_1} {√{\frac{(n_1 - 1)SD_1^2 + (n_2 - 1)SD_2^2}{n_1 + n_2 - 2}}}
A data frame with in the first column, Cohen's d
values, and
in the second column, the corresponding variances.
Lakens, D. (2013) Calculating and reporting effect sizes to facilitate cumulative science: a practical primer for t-tests and ANOVAs. Frontiers in Psychology, 4, p. 863. doi: 10.3389/fpsyg.2013.00863
1 2 3 4 5 6 | escalc::d_from_means(m1 = 2.828427,
m2 = 2.123041,
sd1 = 0.230101,
sd2 = 0.259281,
n1 = 126,
n2 = 89);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.