-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add intervention & restructure simulate_tree_from_pop()
#97
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
a0c2e7b
to
036aa88
Compare
Codecov Report
@@ Coverage Diff @@
## main #97 +/- ##
==========================================
+ Coverage 98.80% 98.91% +0.10%
==========================================
Files 8 9 +1
Lines 419 459 +40
==========================================
+ Hits 414 454 +40
Misses 5 5
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Just taking a look at this after hearing about it in the developer meeting now, would be good to see where there are commonalities with {epidemics} interventions. If the intervention here is primarily affecting a single value, then it's pretty similar to a |
This PR introduces two key changes:
It partly addresses Implement interventions in models #3 by adding a feature to scale R0 through the mean of$R_0$ . An error is thrown when
offspring_dist
. The PR introduces theintvn_scale_r0()
function for achieving this. The function only works for poison and negative binomial offspring distributions because their mean representsr0_reduction > 0
butoffspring_dist
is neitherpois
nornbinom
.In the process of including this feature, it became necessary to restructure the
simulate_tree_from_pop()
function. It now uses...
to pass extra arguments topois
andnbinom
. Theoffspring_disp
andoffspring_mean
arguments have been removed. This was not an issue previously but became necessary to streamline howintvn_scale_r0()
works.