Open tbhallett opened 5 days ago
Whereas, the test script and the initial scenario run showed that the HTM scale-up was working as expected, it appears that the in practice they do not (see here).
The test script and the scenario both examine scale-up occurring instantly in year 2012, whereas the scale-up scenarios we want for the final analysis is for scale-up instantly in 2019.
Looking at this, I can see a few reasons why this might be occurring:
- We write to a parameter that does not exist: https://github.com/UCL/TLOmodel/blob/e9263803787825168955b0e24ed15c383a2ba0dd/src/tlo/methods/hiv.py#L1131-L1132
- Updating of the rates of testing does not work as expected, as the values for years after 2020 are set to nan, and note that future years are never read due to this logic. https://github.com/UCL/TLOmodel/blob/e9263803787825168955b0e24ed15c383a2ba0dd/src/tlo/methods/hiv.py#L1124-L1125
(I don't think this section suffers from the same issue - but it looks a bit fragile, for similar reasons).
- We write new values for parameter values, but we do not rebuild the
LinearModels
that use them (the linear model stores the value of parameter when it is built, and does not update when those parameters are updated later) https://github.com/UCL/TLOmodel/blob/e9263803787825168955b0e24ed15c383a2ba0dd/src/tlo/methods/hiv.py#L1113C13-L1113C52 https://github.com/UCL/TLOmodel/blob/e9263803787825168955b0e24ed15c383a2ba0dd/src/tlo/methods/hiv.py#L1121There may be other issues in the Tb and malaria codes of a similar nature.
I would propose doing the following:
- [ ] Update the scenario file so that it reflects a scale-up in 2019, running at scale, and confirming that this also shows there being no epidemiological impact. (If this doesn't confirm it, then I have had some mistakes in my Scenario file and in these observations)
- [ ] Searching for possible issues in hiv.py, tb.py and malaria.py and fixing
- [ ] Re-running the scenario
- [ ] Raising PR with fixes
Thanks for digging into this @tbhallett, I'll work on it this afternoon. Just confirming branch [hallett/analysis_for_vertical_and_horizontal_progs] is the most up-to-date one?
@tbhallett I'm wondering if there is an issue here with constraints on consumables and personnel. From my scale-up paper, there was only a small impact of HIV program scale-up for 2 reasons: 1. the program is already very close to hitting targets and the proposed scale-up is small, 2. the consumables availability limits the amount of scale-up that can occur.
I've tested this quickly on a small population and found that running the scenarios with consumables availability set to 'all' did lead to a reduction in AIDS deaths with HIV program scale-up (around 30% fall in a pop of 5,000).
So when we scale-up programs only (no HSS), the effects will be limited by cons availability. Both the baseline and the scale-up scenario will likely be affected by mode 2, I think in mode 2 even in the baseline scenarios many appts will not be able to run due to personnel shortages.
Could this be explaining why we see no difference between the baseline and scale-up scenarios? I'll set off a larger run with cons availability to 'all' and keep mode 1 throughout just to see. Hopefully will update you Thurs am.
@tbhallett I'm wondering if there is an issue here with constraints on consumables and personnel. From my scale-up paper, there was only a small impact of HIV program scale-up for 2 reasons: 1. the program is already very close to hitting targets and the proposed scale-up is small, 2. the consumables availability limits the amount of scale-up that can occur.
I've tested this quickly on a small population and found that running the scenarios with consumables availability set to 'all' did lead to a reduction in AIDS deaths with HIV program scale-up (around 30% fall in a pop of 5,000).
So when we scale-up programs only (no HSS), the effects will be limited by cons availability. Both the baseline and the scale-up scenario will likely be affected by mode 2, I think in mode 2 even in the baseline scenarios many appts will not be able to run due to personnel shortages.
Could this be explaining why we see no difference between the baseline and scale-up scenarios? I'll set off a larger run with cons availability to 'all' and keep mode 1 throughout just to see. Hopefully will update you Thurs am.
That might be a part of it, but not all (I think), because;
beta
.We made the change whereby the linear models are rebuild following updating the parameters in #1413
The graphs produced were almost the same as the originals above.
Whereas, the test script and the initial scenario run showed that the HTM scale-up was working as expected, it appears that the in practice they do not (see here).
The test script and the scenario both examine scale-up occurring instantly in year 2012, whereas the scale-up scenarios we want for the final analysis is for scale-up instantly in 2019.
Looking at this, I can see a few reasons why this might be occurring:
We write to a parameter that does not exist: https://github.com/UCL/TLOmodel/blob/e9263803787825168955b0e24ed15c383a2ba0dd/src/tlo/methods/hiv.py#L1131-L1132
Updating of the rates of testing does not work as expected, as the values for years after 2020 are set to nan, and note that future years are never read due to this logic. https://github.com/UCL/TLOmodel/blob/e9263803787825168955b0e24ed15c383a2ba0dd/src/tlo/methods/hiv.py#L1124-L1125
(I don't think this section suffers from the same issue - but it looks a bit fragile, for similar reasons).
LinearModels
that use them (the linear model stores the value of parameter when it is built, and does not update when those parameters are updated later) https://github.com/UCL/TLOmodel/blob/e9263803787825168955b0e24ed15c383a2ba0dd/src/tlo/methods/hiv.py#L1113C13-L1113C52 https://github.com/UCL/TLOmodel/blob/e9263803787825168955b0e24ed15c383a2ba0dd/src/tlo/methods/hiv.py#L1121There may be other issues in the Tb and malaria codes of a similar nature.
I would propose doing the following: