Open htopazian opened 4 months ago
Could this be caused by mortality? An individual's state gets reset when they die (in the reset_target
function), including their intervention state.
n_net
(or equivalent) output.n_smc_treated
.n_combined_smc_bednets
That final output excludes any individuals that died at step 2.
Actually net might have been a bad example here since I later realised it gets reset when the net is thrown away rather than at death. The general idea still applies though.
Digging around a bit more, a few more factors that may be relevant:
The n_smc
and n_combined_smc_xxx
outputs have a slight discrepancy. The n_smc
includes everyone who received the drug, whereas n_combined_smc_xxx
is based on the smc_time
variable, which only includes those for whom the drug worked. Setting the drug efficacy to 1 makes that discrepancy go away. Presumably a separate variable for smc_received_time
would be better. See the create_mda_listeners
function.
The net_time
variable gets reset when the net is thrown away rather than at death. This will affect the correlation outputs that depend on it. See throw_away_nets
The process of averaging the combined variables over the given month feels a bit unreliable. Might be best to changed the combined variables to only report whether someone received the intervention in the last ~30 days (instead of 365) and use the last value for each month. There's probably a lot of corner cases to watch out for, especially not all months are 30 days.
As far as I can tell the actual simulation behaviour and correlation works, it is the reporting that is a inconsistent and/or ambiguous.
Thanks very much for the input, Paul! You make some very good points 😄 I'll have to reconfigure the combined output variables and the time window in which they are calculated.
When setting the inter_round_rho to 1 between two interventions, the model does not assign the same individuals to get interventions. For example, with 50% ITNs across the whole population and 50% SMC among children and perfect correlation, I would expect all of those children receiving SMC to also get a bednet. But the level is <100%, the model seems to prioritize more nets to the children with SMC, but not at the level set by the correlation.
This test-case uses the feat/correlation_outputs branch, which has added in model output variables for the number of individuals receiving combined interventions.