Skip to content
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

Wasting Outputs #1295

Open
1 of 2 tasks
thewati opened this issue Mar 7, 2024 · 36 comments · May be fixed by #543
Open
1 of 2 tasks

Wasting Outputs #1295

thewati opened this issue Mar 7, 2024 · 36 comments · May be fixed by #543
Assignees
Labels

Comments

@thewati
Copy link
Collaborator

thewati commented Mar 7, 2024

After fixing a bug in the code, the calibration has slightly changed (see attached). We need to add some new plots but also re-work on the existing calibration

To do:

@thewati thewati added the epi label Mar 7, 2024
@thewati thewati linked a pull request Mar 7, 2024 that will close this issue
@mnjowe
Copy link
Collaborator

mnjowe commented Mar 17, 2024

Hi @timcolbourn and @andrew-phillips-1. Kindly find attached for wasting plots following our discussion on adding two plots on wasting prevalence. Thanks

population : 20,000
simulation period : 2010 - 2030

wasting-plots-em.docx

@andrew-phillips-1
Copy link
Collaborator

Good morning @mnjowe This is good to see and exactly what I had in mind. I will let Tim comment on how closely he thinks it reflects the data.

@timcolbourn
Copy link
Collaborator

Thanks @mnjowe the plot looks good - the prevalence should be around 3% so it is close enough, but we can work on it more as part of the paper - it's interesting to see that it goes up slightly to 2030 rather than staying the same - any ideas why this might be?

@mnjowe
Copy link
Collaborator

mnjowe commented Mar 18, 2024

@timcolbourn Hm, a good observation. I'm not sure as to why yet. Could it be caused by the risk factors of wasting? I will have to test different scenarios to be sure about this

@EvaJanouskova
Copy link
Collaborator

EvaJanouskova commented Oct 14, 2024

These are the output figures with current version of the code:
wasting_all_figures__2024-10-11T232204Z.pdf

@EvaJanouskova
Copy link
Collaborator

EvaJanouskova commented Oct 14, 2024

In previous versions, the incidence was recorded as follows:

  • Each month within Wasting incidence polling event, it was decided who among non-wasted will become moderately wasted, but then all who were non-wasted before the polling event are recorded as the incidence cases of moderate wasting or normal WHZ.
  • When a child progresses to severe wasting it is recorded as incidence of severe wasting.
  • Annual incidence counts are then logged, hence those who would not become wasted at all in the year, would be recorded as non-wasted incidence case each month.

In current version:

  • Each month within Wasting incidence polling event, it is decided who among non-wasted will become moderately wasted, but only those who became moderately wasted are recorded as the incidence cases of moderate wasting.
  • When a child progresses to severe wasting it is recorded as incidence of severe wasting.
  • Annual incidence counts are then logged.

Therefore, current version records only incidence cases of moderate and severe wasting - see figure on page 1 in wasting_all_figures__2024-10-11T232204Z.pdf. But we would like to know what proportion of the children becomes wasted (moderately, and severely). So we need to also know how many children were not included as an incidence case.

Also, I'm not sure how correct is this recording of the incidence. The natural progression/recovery from moderate wasting occurs in only 81 days, and possible recovery from severe wasting to MAM (which could lead to moderate wasting) due to treatment can occur in 3 or 4 weeks. Hence, theoretical example of wasting incidence recorded for one child within one year by months:

  1. moderate
  2. x
  3. x
  4. severe
  5. moderate
  6. x
  7. x
  8. severe
  9. moderate
  10. x
  11. x
  12. severe

But I think we only want one recording per child per year, so I would say the last information?
So we could have an attribute un_WHZ_category_last_year and at the end of the year compare it to un_WHZ_category_current, for which we could define:

  • incidence of moderate wasting as if worsen from non-wasted,
  • incidence of severe wasting as if worsen from non-wasted or moderate wasting,
  • no wasting incidence if none of the previous cases.

@timcolbourn, what do you think?

@EvaJanouskova
Copy link
Collaborator

EvaJanouskova commented Oct 14, 2024

@timcolbourn, The wasting prevalence per year is quite different from the previous version. I’m not sure which of the changes exactly led to this; see the figure on page 2 in the wasting_all_figures__2024-10-11T232204Z.pdf.

This means, I need to update parameters as we want ~3% prevalence each year, is it?

@EvaJanouskova
Copy link
Collaborator

EvaJanouskova commented Oct 14, 2024

@timcolbourn, As we discussed earlier, the prevalence proportions within age groups were calculated as
number of wasted children in the age group / total number of children younger than the high bound of the age group,
which was corrected to
number of wasted children in the age group / total number of children in the age group

Hence, different outcome in figure on page 3 in the wasting_all_figures__2024-10-11T232204Z.pdf.

@EvaJanouskova
Copy link
Collaborator

On page 4 in the wasting_all_figures__2024-10-11T232204Z.pdf, Model output against Global Burden of Diseases (GDB) study data, all seems fine, except deaths for females between 2015 and 2019.

@EvaJanouskova
Copy link
Collaborator

@timcolbourn, However, all these outcomes are based only on one run. I think, the analysis script should be updated to be based on multiple runs, don't you think?

@timcolbourn
Copy link
Collaborator

Thanks @EvaJanouskova - please can you check that Figures 2 and 3 are actually prevalence (a cross sectional snapshot at one timepoint) rather than cumulative incidence (due to the theoretical example you give above).

If they are prevalence, then the recovery rate (and treatment rate) need to be increased so the prevalence is roughly constant over time from 2010 to 2029.

For Figure 3, if it is prevalence, we might expect it to go up a bit as children get older, but not to 25% - maybe to something like 5% so the average prevalence across the all ages 6-59 months is ~3%. Though would also be good to check the data on that (In Stata you can ssc install zanthro to caculate z-scores etc).

@EvaJanouskova
Copy link
Collaborator

@timcolbourn, Yes, both Fig 2 and 3 are prevalence. It could be because the children with MAM are not detected for a treatment at all, so only SAM is treated. On the other, from SAM, there is no natural recovery, hence if not treated they remain SAM. Do we want to keep it like this and only change the parameters for now? Or would you prefer, to add the HSI events to detect MAM for treatment and eventually also natural recovery from SAM?

@timcolbourn
Copy link
Collaborator

timcolbourn commented Oct 15, 2024

Ok - please add an HSI event to detect and treat MAM.

I'm not sure about natural recovery from SAM, I think that is unlikely (though I guess could happen with better food at home if the family circumstances improve) so would need treatment. But we have SAM treatment as highly likely in the model?

How long are children staying SAM? I think if they are SAM for a long time they would die without treatment (and I think there is a parameter for that?) but they shouldn't stay SAM that long as should be nearly all treated?

@EvaJanouskova
Copy link
Collaborator

the death from untreated SAM is not currently in the model, we could also add that (it is one of future TODOs: #1481)

there is only death after care, so only if treated

if treated, they will die/recovery to MAM/fully recover in 3 or 4 weeks, see figure 4 in the wasting write-up, depending on presence of complications (with complications 4 weeks of treatment, without 3 weeks)

I'm not sure what is the care-seeking rate, but once they seek the care due to SAM symptoms, the coverage for outpatient care is 0.82, and for inpatient care (if complications present) is 0.98.

@timcolbourn
Copy link
Collaborator

ok, so maybe the care seeking is too low? as most should be treated

@EvaJanouskova
Copy link
Collaborator

EvaJanouskova commented Oct 15, 2024

Seems that care_seeking_odds_ratios of 'weight_loss', the SAM symptom, is always 1.0. If I understand it correctly, it means that it has no influence on care_seeking rate, and it is then given by other characteristics (age, urban/rural, region of residence, and wealth quintile) or other symptoms.

I have printed some probabilities of seeking care for the children under 5 with SAM:
743 0.639365
1696 0.482696
dtype: float64
prob_seek_care=person
939 0.511020
1798 0.697783
dtype: float64
prob_seek_care=person
1798 0.941607
dtype: float64
prob_seek_care=person
894 0.821993
1099 0.704299
1283 0.620194
1537 0.639365
dtype: float64
prob_seek_care=person
73 0.697783
804 0.646503
1465 0.576455
1795 0.639365
1849 0.639365
dtype: float64
prob_seek_care=person
1093 0.482696
2006 0.697783
dtype: float64
prob_seek_care=person
587 0.511020
1520 0.665063
dtype: float64
prob_seek_care=person
319 0.482696
dtype: float64
prob_seek_care=person
232 0.819018
720 0.639365
dtype: float64
prob_seek_care=person
1911 0.791558
dtype: float64
prob_seek_care=person
453 0.511020
527 0.639365
1262 0.665063
dtype: float64

@timcolbourn
Copy link
Collaborator

ok - I think maybe what was intended was that ~100% with SAM seek care
so if the parameter is an odds ratio that should be set really high at like 20 or 50 or something?

@EvaJanouskova
Copy link
Collaborator

In previous versions, the incidence was recorded as follows:

  • Each month within Wasting incidence polling event, it was decided who among non-wasted will become moderately wasted, but then all who were non-wasted before the polling event are recorded as the incidence cases of moderate wasting or normal WHZ.
  • When a child progresses to severe wasting it is recorded as incidence of severe wasting.
  • Annual incidence counts are then logged, hence those who would not become wasted at all in the year, would be recorded as non-wasted incidence case each month.

In current version:

  • Each month within Wasting incidence polling event, it is decided who among non-wasted will become moderately wasted, but only those who became moderately wasted are recorded as the incidence cases of moderate wasting.
  • When a child progresses to severe wasting it is recorded as incidence of severe wasting.
  • Annual incidence counts are then logged.

Therefore, current version records only incidence cases of moderate and severe wasting - see figure on page 1 in wasting_all_figures__2024-10-11T232204Z.pdf. But we would like to know what proportion of the children becomes wasted (moderately, and severely). So we need to also know how many children were not included as an incidence case.

Also, I'm not sure how correct is this recording of the incidence. The natural progression/recovery from moderate wasting occurs in only 81 days, and possible recovery from severe wasting to MAM (which could lead to moderate wasting) due to treatment can occur in 3 or 4 weeks. Hence, theoretical example of wasting incidence recorded for one child within one year by months:

  1. moderate
  2. x
  3. x
  4. severe
  5. moderate
  6. x
  7. x
  8. severe
  9. moderate
  10. x
  11. x
  12. severe

But I think we only want one recording per child per year, so I would say the last information? So we could have an attribute un_WHZ_category_last_year and at the end of the year compare it to un_WHZ_category_current, for which we could define:

  • incidence of moderate wasting as if worsen from non-wasted,
  • incidence of severe wasting as if worsen from non-wasted or moderate wasting,
  • no wasting incidence if none of the previous cases.

@timcolbourn, what do you think?

This is actually not true. We actually only log incidence if it is incidence of moderate wasting from non-wasted, or if it is progression to severe wasting scheduled during incidence of moderate wasting. So, if the child's wasting status improves from severe to moderate after treatment it won't be logged as incidence. On the other hand, such a child is not send for MAM treatment, and no natural recovery or progression back to severe wasting is scheduled, so the example above would actually look as follows:

  1. moderate (incidence)
  2. x
  3. x
  4. severe (incidence)
  5. moderate after treatment, stays like that for good
  6. x
  7. x
  8. x
  9. x
  10. x
  11. x
  12. x

@EvaJanouskova
Copy link
Collaborator

I think we could start there. Send children recovered from SAM to MAM following the treatment for MAM treatment, or schedule natural recovery or progression back to severe wasting. Without logging as incidence, or?

@EvaJanouskova
Copy link
Collaborator

EvaJanouskova commented Oct 16, 2024

After a discussion with @timcolbourn, we decided to make more changes within #543:

  • Increase care_seeking_odds_ratio for SAM symptom, so almost everyone with SAM will get the treatment.
  • Add follow-up MAM treatment after SAM treatment if not fully recovered.
  • Add growth monitoring regular event to capture MAM/SAM cases for treatment, diagnostic accuracy may depend on equipment used (MUAC tape, Height Pole (Stadiometer), Weighing scale); MUAC will be more often used, especially at level 1a, but should also have weighing scales (and at Level 1b and 2, the height pole and length board). (Should` we distinguish between Height and Length Pole or could we keep it as one item? - Decided to be kept as one item for now.)
  • Adjust wasting incidence calculation by assuming children were moderately wasted before they progressed to severe wasting. Due to the short time of 81 days between the incidence of moderate wasting and progression to severe wasting, we will extract severe wasting cases from moderate wasting in the year. To calculate the proportion in the year, we will divide both incidences by the number of children under 5 at the time of logging the incidence.

@EvaJanouskova EvaJanouskova linked a pull request Oct 16, 2024 that will close this issue
@EvaJanouskova
Copy link
Collaborator

EvaJanouskova commented Oct 16, 2024

Hi @timcolbourn, What data/information do we have on prevalence/incidence to calibrate the module? Do we know the prevalence by severity and/or by age group? Do we know anything about incidence per year, or any other relevant data/information? And what is the source for the prevalence being approximately constant around 3%?

@EvaJanouskova
Copy link
Collaborator

@thewati, In the figure of direct deaths compared with GBD study data, which year’s study data is it compared to? Is it GBD 2021 or GBD 2019?

@thewati
Copy link
Collaborator Author

thewati commented Oct 17, 2024

@thewati, In the figure of direct deaths compared with GBD study data, which year’s study data is it compared to? Is it GBD 2021 or GBD 2019?

@EvaJanouskova I am not sure. I tried looking around but I can't find anything on the actual year. Maybe @inesll or @mnjowe would know

@EvaJanouskova
Copy link
Collaborator

@thewati, In the figure of direct deaths compared with GBD study data, which year’s study data is it compared to? Is it GBD 2021 or GBD 2019?

@EvaJanouskova I am not sure. I tried looking around but I can't find anything on the actual year. Maybe @inesll or @mnjowe would know

As Emmanuel correctly pointed out at the meeting today, it shows deaths in 2010-2019, so likely from the GBD 2019 study. I'll need to check the new data then.

@timcolbourn
Copy link
Collaborator

timcolbourn commented Oct 17, 2024

Hi @timcolbourn, What data/information do we have on prevalence/incidence to calibrate the module? Do we know the prevalence by severity and/or by age group? Do we know anything about incidence per year, or any other relevant data/information? And what is the source for the prevalence being approximately constant around 3%?

The data is from the Malawi 2015-2016 DHS (the latest one): https://dhsprogram.com/publications/publication-fr319-dhs-final-reports.cfm
see Figure 11.1 on Page 161 (4% in 2010, 3% 2015-6). Table 11.1 on Page 170 does actually have a breakdown by age group and interestingly it goes up from 6-8 months old to 9-11 months, and then down through to 36-47 month but up again in 48-59 month olds. Table 11.1 also shows wasting as 3.3% (the figure just rounded it to 3%).

Actually also the Malawi MICS 2019-2020: https://microdata.worldbank.org/index.php/catalog/4286/related-materials
has data on Wasting: 2.6% prevalence, and also provides detail in Table TC.8.1 on page 233 of the report

So there seems to be a secular trend of wasting going down, slowly, perhaps by around 0.15-0.2% per year. So the DHS 2024-2025 which is happening now (and will be reported late next year) might show ~2% prevalence?

@EvaJanouskova
Copy link
Collaborator

ok - I think maybe what was intended was that ~100% with SAM seek care so if the parameter is an odds ratio that should be set really high at like 20 or 50 or something?

if the odds are set to 20, the probs of seeking care are as follows:
prob_seek_care=person
304 0.964565
359 0.954341
412 0.972571
1342 0.985815
1922 0.975438
1999 0.993118
dtype: float64
prob_seek_care=person
412 0.979081
dtype: float64
prob_seek_care=person
1999 0.990197
dtype: float64
prob_seek_care=person
1922 0.976376
dtype: float64
prob_seek_care=person
1999 0.987557
dtype: float64
prob_seek_care=person
359 0.9572
dtype: float64
prob_seek_care=person
304 0.965903
dtype: float64
prob_seek_care=person
304 0.951992
dtype: float64

@EvaJanouskova
Copy link
Collaborator

Hi @timcolbourn, With current version, the prevalence is lightly lower (maybe even too low in 2010), but then is growing up to 10% in 2030. :/
wasting_all_figures__2024-12-11T003745Z.pdf

@timcolbourn
Copy link
Collaborator

ok, so looks like there's still an issue with cases not recovering or dying? i.e. too many continue to be wasted?

are you able to quickly see how long children are wasted for on average in the output?

could it be as simple as ensuring wasting is turned off when kids reach their 5th birthday?

@EvaJanouskova
Copy link
Collaborator

are you able to quickly see how long children are wasted for on average in the output?

Unfortunately not.

could it be as simple as ensuring wasting is turned off when kids reach their 5th birthday?

We can test that.

@EvaJanouskova
Copy link
Collaborator

EvaJanouskova commented Dec 11, 2024

Hi @timcolbourn, With current version, the prevalence is lightly lower (maybe even too low in 2010), but then is growing up to 10% in 2030. :/ wasting_all_figures__2024-12-11T003745Z.pdf

Also the deaths here were too high. Therefore, I've updated the prob_death_after_SAMcare according to what I found in a paper (substantially lower), hence also increased prob_mam_after_SAMcare.

Also, I didn't find any use of gender as predisposition to wasting or any other gender-based assumption in wasting module. Hence I combined the deaths of both genders together and now it seems much closer to GBD data, I would say. (Of course, the growing prevalence still needs to be fixed.) wasting_all_figures__2024-12-11T114046Z.pdf

@EvaJanouskova
Copy link
Collaborator

could it be as simple as ensuring wasting is turned off when kids reach their 5th birthday?

We can test that.

Well, we calculate the proportions only in children under 5, so even if they stayed wasted after 5, they won't be counted in. These are all proportions of wasted children under 5 among all children under 5.

@EvaJanouskova
Copy link
Collaborator

EvaJanouskova commented Dec 11, 2024

@mnjowe, @thewati, I think the module even only works with children under 5, doesn't it? Would you know where/how it is done? (Where to find it in the code?) Thanks!

@thewati
Copy link
Collaborator Author

thewati commented Dec 12, 2024

@mnjowe, @thewati, I think the module even only works with children under 5, doesn't it? Would you know where/how it is done? (Where to find it in the code?) Thanks!

Hi Eva, So the code is polling then logging children under 5. All children above 5 are ignored/left out. This is done in the Wasting_IncidencePoll. At line 739 as seen below, we selected only those under 5.
not_wasted_or_treated = df.loc[df.is_alive & (df.age_exact_years < 5) & (df.un_WHZ_category == 'WHZ>=-2') & (df.un_am_tx_start_date != pd.NaT)]

I hope I haven't missed your question.

@mnjowe
Copy link
Collaborator

mnjowe commented Dec 12, 2024

Hi @EvaJanouskova . Perhaps you were running a test that's configured to work with under 5's only? I tried running it and I can see individuals alive and over five as well. What script were you running?

@EvaJanouskova
Copy link
Collaborator

EvaJanouskova commented Dec 12, 2024

@mnjowe, @thewati, I think the module even only works with children under 5, doesn't it? Would you know where/how it is done? (Where to find it in the code?) Thanks!

Hi Eva, So the code is polling then logging children under 5. All children above 5 are ignored/left out. This is done in the Wasting_IncidencePoll. At line 739 as seen below, we selected only those under 5. not_wasted_or_treated = df.loc[df.is_alive & (df.age_exact_years < 5) & (df.un_WHZ_category == 'WHZ>=-2') & (df.un_am_tx_start_date != pd.NaT)]

I hope I haven't missed your question.

You couldn't know what I meant because it is not true. There was just a bug in calculation of under5s in logging, and when I used the same to calculate above5s it always told me it is empty, hence I supposed there are no individuals over 5 used in the module, because it seemed there are no in the whole population df.

Thanks anyway, @thewati.

@EvaJanouskova
Copy link
Collaborator

Yes,

Hi @EvaJanouskova . Perhaps you were running a test that's configured to work with under 5's only? I tried running it and I can see individuals alive and over five as well. What script were you running?

No, I was running the src/scripts/wasting_analyses/scenarios/scenario_wasting_minimal_model.py, but the individuals above 5 years are in the df, the issue was, how the calculation of under5s was done (missing bracket), and when I used the same for above5s, the missing bracket caused to evaluate the condition as always true - hence whole population being counted as "under5s" and no one caunted as "above5s". Don't worry about it, missing bracket spotted and fixed :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Issues
Development

Successfully merging a pull request may close this issue.

5 participants