means.to.d | R Documentation |
Helper function to convert means and standard deviations to Cohen's d.
means.to.d(mu1, mu2 = 0,
sd1 = 1, sd2 = 1,
n2, n.ratio = 1,
paired = FALSE,
rho.paired = 0.50,
verbose = TRUE)
mu1 |
mean of the first group. |
mu2 |
mean of the second group. |
sd1 |
standard deviation of the first group. |
sd2 |
standard deviation of the second group. |
n.ratio |
|
paired |
if |
rho.paired |
correlation between repeated measures for paired samples (e.g., pretest and post-test). |
n2 |
integer; sample size in the second group (or for the single group in paired samples). |
verbose |
logical; whether the output should be printed on the console. |
d |
Cohen's d |
# means and standard deviations from independent samples
means.to.d(mu1 = 20, mu2 = 17.5,
sd1 = 5, sd2 = 15,
n2 = 30, n.ratio = 1)
# means and standard deviations from paired samples
means.to.d(mu1 = 20, mu2 = 17.5,
sd1 = 5, sd2 = 15,
n2 = 30, n.ratio = 1,
paired = TRUE,
rho.paired = 0.50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.