Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variance ratio #619

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

variance ratio #619

wants to merge 4 commits into from

Conversation

mattansb
Copy link
Member

@mattansb mattansb commented Nov 9, 2023

No description provided.

Copy link

codecov bot commented Nov 9, 2023

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 ⚠️
Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bwiernik
Copy link
Contributor

bwiernik commented Nov 9, 2023

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
Copy link
Member Author

mattansb commented Nov 9, 2023

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
Copy link
Contributor

bwiernik commented Nov 9, 2023

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

@mattansb
Copy link
Member Author

mattansb commented Nov 9, 2023

Oh right, duh 🤦‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants