easystats / effectsize

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

variance ratio #619

Open mattansb opened 1 year ago

codecov[bot] commented 1 year ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (8fdbfad) 90.74% compared to head (2b8c634) 90.90%. Report is 1 commits behind head on main.

Files Patch % Lines
R/vars_ratio.R 96.22% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #619 +/- ## ========================================== + Coverage 90.74% 90.90% +0.16% ========================================== Files 57 58 +1 Lines 3564 3617 +53 ========================================== + Hits 3234 3288 +54 + Misses 330 329 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bwiernik commented 1 year ago

Let's a few options here for CI methods and computing SD ratio instead, pulling them from the metafor::escalc() code.

(SD ratios are often called variation/variance ratios in biology and ecology work.)

Maybe let's call the function variation_ratio()?

mattansb commented 1 year ago

For independents samples, metafor uses these (with the +1/(2 * (n1i - 1)) -1/(2 * (n2i - 1)) small sample bias correction):

yi <- log(sd1i/sd2i) + 1/(2 * (n1i - 1)) - 1/(2 * (n2i - 1))
vi <- 1/(2 * (n1i - 1)) + 1/(2 * (n2i - 1))

What should vi be here if the correction is not applied? 🤔

Maybe let's call the function variation_ratio()?

Sure.

bwiernik commented 1 year ago

vi is the same -- the adjustment is an additive constant so it doesn't affect the variance because of the calculus

mattansb commented 1 year ago

Oh right, duh 🤦‍♂️