Sometimes we we want to test if the difference is in population means is equal to a value(not necessarily 0). for instance when testing for population mean difference equal to 3: rstatix gives same answer for the effect size.
``
rstatix::cohens_d(data=sleep,extra~group)
A tibble: 1 × 7
.y. group1 group2 effsize n1 n2 magnitude
1 extra 1 2 -0.832 10 10 large
rstatix::cohens_d(data=sleep,extra~group,mu=3)
# A tibble: 1 × 7
.y. group1 group2 effsize n1 n2 magnitude
1 extra 1 2 -0.832 10 10 large
``
# using effectsize package
``
effectsize::cohens_d(data=sleep,extra~group)
Cohen's d | 95% CI
-0.83 | [-1.74, 0.10]
Estimated using pooled SD.
effectsize::cohens_d(data=sleep,extra~group,mu=2)
Cohen's d | 95% CI
-1.89 | [-2.94, -0.80]
Deviation from a difference of 2.
Estimated using pooled SD.
``
clearly rstatix is not taking care of the population mean difference
Sometimes we we want to test if the difference is in population means is equal to a value(not necessarily 0). for instance when testing for population mean difference equal to 3: rstatix gives same answer for the effect size. ``
``
Estimated using pooled SD.
Deviation from a difference of 2.
Estimated using pooled SD. ``
clearly rstatix is not taking care of the population mean difference