-
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
Changing create_progression_process() rates to probs #295
Conversation
…create_processes() function. Changed the input for $sample() in the create_progression_process() and create_asymptomatic_progression_process() functions from 1/rate to rate as they now receive the rate rather than the mean residence time in create_processes.
I've now fixed (hopefully) the conflicts, so ready for the changes to be reviewed now @giovannic @pwinskill ! |
The CMD checks are failing because the new I think the easiest solution here it so change the lines assigning
where dt_input is a
Within
This then allows the sampling of individuals
|
…to align with the slow parasite clearance updates
Have implemented the changes suggested above - seems to have solved the CMD check failures. |
|
||
# Assign the dt input to a separate object with the default single parameter value: | ||
dt_input <- parameters$dt | ||
|
||
# If antimalarial resistance is switched on, assign dt variable values to the | ||
if(parameters$antimalarial_resistance) { | ||
dt_input <- variables$dt | ||
dt_input <- variables$dt$get_values() |
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.
Doesn't dt vary over time?
It appears to me like we have to pass the DoubleVariable so that the disease progression process can calculate probabilities based on dt for that timestep.
obsolete |
As raised in the PR #289, the
create_progression_process()
function (disease_progression.R
), which governs the way individuals move between some pairs of states, has an argumentrate
which is currently passed mean state duration time (e.g.parameters$dd
. Within the function, the inverse of thisrate
argument is used to sample individuals to move between states.While a fix has been suggested for naming the
Bitset$sample()
function in the individual package, in the meantime the malariasimulation code has been made clearer by:rate
argument toprob
in thecreate_progression_process()
andcreate_asymptomatic_progression_process()
functions.create_progression_process()
andcreate_asymptomatic_progression_process()
function calls increate_processes()
from the former average residence time (parameters$dd
) to the probability1 - exp(-1/parameters$dd)