-
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
Add equilibrium solution to P.v model #322
Conversation
ec751e9
to
4b38d43
Compare
b807634
to
16cc8c4
Compare
4b38d43
to
1916fa1
Compare
16cc8c4
to
a75a671
Compare
1916fa1
to
b481153
Compare
a75a671
to
2e0e3f3
Compare
b481153
to
42083f2
Compare
2e0e3f3
to
6309897
Compare
42083f2
to
e2adee2
Compare
7166cba
to
da381b9
Compare
6309897
to
921c84f
Compare
…e's equilibrium solution. This is accessed during the initial equilibrium calculation in compatability and during the variable creation. The equilibrium solution is found in malariaEquilibriumVivax. Note that we draw individuals from a joint probability distribution over age and het group to generate human state, immunities and number of hypnozoite batches. tests included to check correct equilibrium is generated and maintained. I have also added the An. koliensis parameters as found in Michael White's repo in order to compare equilibrium solutions. Lagged infectivity needs to be saved before the current infectivity is extracted during the biting_process.R. Also, when immunity is boosted through infection, this should incorporate the decrease in immunity from decay (there may be better ways of achieving this).
921c84f
to
16666ba
Compare
/benchmark |
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 16666ba is merged into dev:
Further explanation regarding interpretation and methodology can be found in the documentation. |
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.
Very nice! Just making sure the right tests run on CI, comments in line.
expect_equal(counts, expected, tolerance=1e-3) | ||
}) | ||
|
||
test_that('vivax ODE stays at equilibrium with low total_M', { |
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 perhaps redundant? Is there any change in the vector model for vivax?
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.
I think there was a while when I wasn't sure, but I think you're right: I can take them out.
}) | ||
|
||
|
||
test_that('vivax changing total_M stabilises', { |
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.
Same as above
@@ -0,0 +1,86 @@ | |||
test_that('Initial states are consistent with equilibrium', { | |||
skip_on_ci() |
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.
We could run this on the CI? It seems valuable and quick to run. If we're not doing this for falciparum, maybe we should be.
tests/testthat/test-vivax-eq.R
Outdated
}) | ||
|
||
test_that('Initial immunities are consistent with equilibrium', { | ||
skip_on_ci() |
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.
Same as above
tests/testthat/test-vivax-eq.R
Outdated
}) | ||
|
||
test_that('vivax equilibrium works with multiple species', { | ||
skip_on_ci() |
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.
Redundant?
Added in functionality to start at equilibrium, based on Michael White's equilibrium solution. This is accessed in initial equilibrium calculation in compatability and in variable creation. The equilibrium solution is found in malariaEquilibriumVivax.
Note that we draw individuals from a joint probability distribution over age and het group to generate human state and number of hypnozoite batches.
tests included to check correct equilibrium is generated and maintained.
I have also added the An. koliensis parameters as found in Michael White's repo in order to compare equilibrium solutions.
A few errors were identified. Total infection rates were not being calculated correctly in human_infection.R. Lagged infectivity needs to be saved before the current infectivity is extracted during the biting_process.R. Also, when immunity is boosted through infection, this should incorporate the decrease in immunity from decay (there may be better ways of achieving this).