easystats / effectsize

:dragon: Compute and work with indices of effect size and standardized parameters
https://easystats.github.io/effectsize/
Other
337 stars 23 forks source link

Typo in .get_rd_h? #571

Closed LukasWallrich closed 1 year ago

LukasWallrich commented 1 year ago

Describe the bug According to the documentation, when calculating d_to_r etc, one should be able to omit one group size (n1 or n2) if the groups are of equal size. However, .get_rd_h ignores the provided input if either (II) argument is missing.

https://github.com/easystats/effectsize/blob/7067d877a425bab29268f746939cf5be9f73411a/R/convert_between_d_to_r.R#L174

Expected behavior These two calls should return the same

library(effectsize)

d_to_r(.5, 10, 10)
#> [1] 0.2548236
d_to_r(.5, 10)
#> [1] 0.2425356

Created on 2023-03-08 with reprex v2.0.2

mattansb commented 1 year ago

Thanks for pointing this out! Fixed on #572

library(effectsize)
d_to_r(.5, 10, 10)
#> [1] 0.2548236
d_to_r(.5, 10)
#> [1] 0.2548236

Created on 2023-03-08 with reprex v2.0.2