You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is related to #27 but applies to paired data. In the paired=T case, effsize::cohen.d.formula expects the data to be arranged by group first. Although this is a standard convention in non-formula use-cases, it is usually not expected in the formula interface (i.e. t.test(..., paired=T) or other Cohens d implementation do not expect data to be ordered like this).
Code that made me discover this behaviour (see bottom of post for working example):
Neither lsr::cohensD nor rstatix::cohens_d are affected by sorting order in comparison, however lsr::cohensD gives a reasonable warning:
calculating paired samples Cohen's d using formula input. Results will be incorrect if cases do not appear in the same order for both levels of the grouping factor
They also report different effect sizes for paired tests altogether, please see #49.
This is related to #27 but applies to paired data. In the
paired=T
case,effsize::cohen.d.formula
expects the data to be arranged by group first. Although this is a standard convention in non-formula use-cases, it is usually not expected in the formula interface (i.e.t.test(..., paired=T)
or other Cohens d implementation do not expect data to be ordered like this).Code that made me discover this behaviour (see bottom of post for working example):
Relevant code section in
CohenD.R
is here:Working example showing the issue:
Example:
The text was updated successfully, but these errors were encountered: