-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fix bug with pev min_wait #264
Conversation
86424e7
to
e2fd8ae
Compare
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.
This is great. Thanks for fixing this Giovanni!
I tested with multiple mass vaccination campaigns and with a combination of EPI and mass campaigns - all seemed to work as expected.
Thanks @giovannic! I'm being slow and stuggling to follow the logic through all the way. Can I check that this change still has efficacy starting at the third dose (whist changin min_wait to respect time since first dose)? I'm wondering if it would be clearer to implement with an additional variable(s) instead of the resetting of variables. Something like:
Is that overkill? |
Not resetting pev_profile is a good point. Not that anyone is modelling this now, but this change would lead to weird behaviour if there were two mass_pev campaigns in a simulation. Efficacy for the first campaign would be reset on enrollment to the second campaign. I'm not against your alternative. Would the events change too? If the events remain the same, there'd be a lot of redundancy between the variables and the events. Currently, pev events fire on every dose so Also, how would we deal with booster timesteps? Perhaps a clearer way would be to have:
Then we could set |
Thanks Giovanni - that sounds sensible to me. I can certaintly see the sitation with multiple mass pev campaigns arising so think we should be robust to that. |
* Update pev-epi min_wait test to directly check sample population * Update pe-epi min_wait test to check that pev_timestep is being updated on the first dose * Copy pev-epi min_wait test to mass pev * Update pev and epi processes to calculate targets based on time of first dose * Update infection immunity function to calculate pev immunity only after 3rd dose
e2fd8ae
to
e7b5c4d
Compare
@pwinskill I've updated this PR to have an explicit tracking of (non-)efficacious doses. I've updated the existing tests to check the new behaviour and that seems to be enough, but let me know if we should add some more! |
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.
Thanks very much @giovannic. I can follow the logic much more clearly now - much appreciated 🙏
This PR addresses an issue where min_wait is apparently ignored. It is easiest to see when you have two mass_pev campaigns close to each other (example below). But would likely affect other combinations of pev interventions (including those using EPI).
The problem was that we were sampling pev populations based on the 3rd dose instead of the 1st. This PR corrects that while maintaining the previous behaviour wrt vaccine efficacy.
-- Changes --
Fix bug with pev min_wait: