es_cohens_d | R Documentation |
Cohen's d
es_cohens_d(m_0, m_1, s_0, s_1)
m_0 |
mean of group 0 |
m_1 |
mean of group 1 |
s_0 |
standard deviation of group 0 |
s_1 |
standard deviation of group 1 |
Cohen's d
Cohen, J. (1988). Statistical power analysis for the behavioral sciences. Routledge.
if (requireNamespace('tidyr', quietly = TRUE)) {
library('tidyr')
mtcars %>%
group_by(vs) %>%
summarize(m = mean(mpg), s = sd(mpg)) %>%
pivot_wider(names_from = vs, values_from = c(m, s)) %>%
rowwise() %>%
mutate(cohens_d = es_cohens_d(m_0, m_1, s_0, s_1))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.