Skip to content

Commit 3dd465b

Browse files
committed
Address Ali's comments
1 parent e90ed67 commit 3dd465b

1 file changed

Lines changed: 56 additions & 25 deletions

File tree

docs/source/onboarding_resources/tutorial/index.ipynb

Lines changed: 56 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
"Often, this starts from a proposal on their side.\n",
143143
"The client may come to us with a question like this:\n",
144144
"\n",
145-
"> How much impact could it have if we scaled up SQ-LNS in Ethiopia?\n",
145+
"> What would the impact be of scaling up SQ-LNS in Ethiopia?\n",
146146
"\n",
147147
"However, this question is **not** precise enough to be our research question.\n",
148148
"We need to ask clarifying questions to understand what options decision-makers\n",
@@ -589,8 +589,14 @@
589589
"\n",
590590
"This is a complex topic, but for now what you need to know is:\n",
591591
"\n",
592-
"* GBD causes and risks are both hierarchical; that is, there are higher-level causes and risks that are made up of lower-level causes and risks.\n",
593-
"* We can't easily model higher-level entities, so we are usually only interested in the most-detailed entities in the cause and risk hierarchies.\n",
592+
"* GBD causes and risks are both hierarchical.\n",
593+
" There are higher-level causes such as sexually transmitted infection that are made up of more detailed lower-level causes such as syphilis.\n",
594+
" Likewise, there are higher-level risks such as \"metabolic risks\" that are made up of more detailed risks such as high blood pressure.\n",
595+
"* We typically only model most-detailed causes and risks.\n",
596+
" GBD doesn't estimate all the quantities we need for modeling about higher-level entities.\n",
597+
" With extra work, it may be possible for us to derive these quantities from GBD results, but that is not common practice on our team and is\n",
598+
" outside the scope of this tutorial. \n",
599+
" This is an area our team is interested in exploring more in the future.\n",
594600
"\n",
595601
"</div>"
596602
]
@@ -619,7 +625,7 @@
619625
"* Internally to IHME, there is the [Shared Hierarchy Editor](https://she.ihme.washington.edu/explore/cause/version/655)\n",
620626
" -- don't worry, you won't edit anything by accident.\n",
621627
"* Entities can be accessed programmatically with the `gbd_mapping` package, which is part of our Vivarium microsimulation suite.\n",
622-
" Internally to IHME, shared functions can also be used.\n",
628+
" Internally to IHME, [shared functions](https://hub.ihme.washington.edu/spaces/SF/pages/140542419/Shared+Functions+Home) can also be used.\n",
623629
"\n",
624630
"Here, we'll use `gbd_mapping`."
625631
]
@@ -1493,7 +1499,7 @@
14931499
"tags": []
14941500
},
14951501
"source": [
1496-
"Now seems like a good time to dissect what is happening with iron deficiency and anemia,\n",
1502+
"Now seems like a good time to dive a bit deeper into what is happening with iron deficiency and anemia,\n",
14971503
"and in the process learn how to dig into the GBD methods.\n",
14981504
"\n",
14991505
"Remember, in our original causal diagram (from the FAQ) we had \"iron deficiency\" and \"anemia.\"\n",
@@ -1529,21 +1535,27 @@
15291535
"> See the methodological description of “Anaemia (impairment)” for detailed description of\n",
15301536
"> the analytic approach and inputs.\n",
15311537
"\n",
1532-
"It sounds like the GBD \"iron deficiency\" risk factor is the same thing as anemia.\n",
1533-
"We can confirm this by some background research, which turns up (for example) [this page](https://www.hematology.org/education/patients/anemia)\n",
1538+
"It sounds like the GBD \"iron deficiency\" risk factor is closely related to the concept of anemia.\n",
1539+
"Its exposure is quantified in terms of hemoglobin.\n",
1540+
"Some background research turns up (for example) [this page](https://www.hematology.org/education/patients/anemia)\n",
15341541
"from the American Society of Hematology which states that anemia is defined by hemoglobin:\n",
15351542
"\n",
15361543
"> [Anemia] is diagnosed when a blood test shows a hemoglobin value of less than 13.5 gm/dl\n",
15371544
"> in a man or less than 12.0 gm/dl in a woman. Normal values for children vary with age.\n",
15381545
"\n",
1539-
"In that case, what was meant by \"iron deficiency\" in the SQ-LNS FAQ, if that was distinct\n",
1546+
"However, there's additional complexity to the iron deficiency risk factor, which is explored in subsequent pages\n",
1547+
"of the risk factor methods appendix.\n",
1548+
"For the purposes of drawing this causal diagram, we can assume the iron deficiency risk factor is the same\n",
1549+
"as \"anemia\" from the SQ-LNS FAQ, but we'd need to understand some of these additional intricacies before actually modeling it.\n",
1550+
"\n",
1551+
"Given what we've learned so far, you might wonder: what was meant by \"iron deficiency\" in the SQ-LNS FAQ, if that was distinct\n",
15401552
"from anemia?\n",
15411553
"To find this out, we'll scan [the paper cited in the FAQ](https://pmc.ncbi.nlm.nih.gov/articles/PMC8560313/),\n",
15421554
"which is available for free on PubMed Central.\n",
15431555
"There, iron deficiency was defined using \"plasma ferritin,\" which we can confirm is _not_\n",
15441556
"the same thing as hemoglobin and doesn't appear anywhere in the risk factors methods appendix.\n",
15451557
"\n",
1546-
"So, to summarize: GBD \"iron deficiency\" risk = SQ-LNS FAQ \"anemia.\"\n",
1558+
"So, to summarize: GBD \"iron deficiency\" risk is approximately the same thing as SQ-LNS FAQ \"anemia.\"\n",
15471559
"Good thing we checked!\n",
15481560
"\n",
15491561
"<!-- https://nbsphinx.readthedocs.io/en/latest/markdown-cells.html#Info/Warning-Boxes -->\n",
@@ -1695,8 +1707,8 @@
16951707
"Don't be afraid of making a very complex diagram at this stage!\n",
16961708
"This is the time to go maximalist before we start editing down to what we will actually model.\n",
16971709
"\n",
1698-
"As an example, we think it is quite likely that SQ-LNS' effects are muted by unsafe sanitation,\n",
1699-
"which is a GBD risk:"
1710+
"As an example, based on having read studies like [Wessells et al. 2021](https://pubmed.ncbi.nlm.nih.gov/34590114/),\n",
1711+
"we think it is quite likely that SQ-LNS is less effective in areas with unsafe sanitation infrastructure (a risk factor available in GBD):"
17001712
]
17011713
},
17021714
{
@@ -2035,18 +2047,28 @@
20352047
"For a cause, such as diarrheal diseases, the Vivarium suite can pull GBD results about:\n",
20362048
"\n",
20372049
"* Prevalence: proportion of people who have the disease\n",
2038-
"* Incidence rate: the rate at which people without the disease acquire it\n",
2039-
"* Excess mortality rate: the rate at which people who currently have the disease die of the disease\n",
2050+
"* Incidence rate: the rate at which people acquire the disease\n",
2051+
"* Mortality rate: the rate at which people die of the disease\n",
20402052
"\n",
20412053
"*Sometimes*, GBD will also save results about **remission**, which is the rate at which people with the disease get better and stop having the disease.\n",
20422054
"However, this is not uniformly available for all most-detailed causes.\n",
20432055
"Frequently, when this isn't saved, we can find information about duration of the condition in the nonfatal methods appendix.\n",
20442056
"For diarrheal diseases, it *is* saved, so we don't have to look for this.\n",
20452057
"\n",
2046-
"One thing to be careful of is COVID shocks. Since we want to simulate 2025-2030, we may be more\n",
2058+
"<div class=\"alert alert-info\">\n",
2059+
"\n",
2060+
"Note\n",
2061+
"\n",
2062+
"Sometimes, we *prefer* to use a duration from the methods appendix (or another source) over the GBD remission estimate,\n",
2063+
"so even if it exists, we don't *always* use it.\n",
2064+
"For the purposes of this tutorial, we will use the GBD remission estimate, since that makes our process a bit simpler.\n",
2065+
"\n",
2066+
"</div>\n",
2067+
"\n",
2068+
"One thing to be careful of is COVID effects. Since we want to simulate 2025-2030, we may be more\n",
20472069
"comfortable assuming that infectious disease burden is like 2019 (pre-pandemic) than 2021 (during pandemic).\n",
20482070
"Because diarrheal disease is mostly spread through contaminated water, and\n",
2049-
"[doesn't exhibit a strong COVID shock in GBD](http://ihmeuw.org/6syo), we will use 2021.\n",
2071+
"[doesn't exhibit a strong COVID \"shock\" (a sudden change coinciding with the pandemic) in GBD](http://ihmeuw.org/6syo), we will use 2021.\n",
20502072
"\n",
20512073
"For a risk factor, such as child wasting, our standard tools pull GBD results about **exposure**\n",
20522074
"(what proportion of the population is exposed to what levels of the risk factor)\n",
@@ -2078,7 +2100,7 @@
20782100
"\n",
20792101
"We could do a whole literature review to inform the impact of the intervention on child wasting.\n",
20802102
"But for simplicity here, we'll use the meta-analysis by Dewey et al. that was linked from the SQ-LNS FAQ.\n",
2081-
"Digging into that paper, Table 3 reports a 14% decrease in wasting with a CI of 7-20%.\n",
2103+
"Digging into that paper, Table 3 reports a 14% decrease in wasting with a confidence interval of 7-20%.\n",
20822104
"Wasting was defined as a weight-for-length Z score (WLZ -- which is equivalent to WHZ) of less than -2.\n",
20832105
"\n",
20842106
"<div class=\"alert alert-info\">\n",
@@ -2146,6 +2168,8 @@
21462168
"The simulants eligible to receive SQ-LNS in 2029 won't have even been *born*\n",
21472169
"yet in 2025. For that reason, we'll start with a population of simulants ranging from 24 months old all the way down to newborns,\n",
21482170
"and we'll need to model fertility to have new births during the simulation.\n",
2171+
"This is easier, with our current tools, than creating 6-month-old simulants out of thin air\n",
2172+
"during the simulation.\n",
21492173
"\n",
21502174
"There are several standard ways we model fertility. In this case, because we won't be\n",
21512175
"simulating the adults who would be giving birth, using age-specific fertility rates doesn't\n",
@@ -2170,7 +2194,7 @@
21702194
"#### Burden\n",
21712195
"\n",
21722196
"Burden is typically modeled the same in every simulation we make.\n",
2173-
"Death/mortality is modeled as a **state machines** where people move (\"transition\") dynamically\n",
2197+
"Death/mortality is modeled as a **state machine** where people move (\"transition\") dynamically\n",
21742198
"between states depending on their current state.\n",
21752199
"\n",
21762200
"Here is a diagram of our standard mortality state machine, where a circle\n",
@@ -2220,10 +2244,13 @@
22202244
"source": [
22212245
"\n",
22222246
"The transition in this diagram is informed by GBD mortality rates.\n",
2223-
"Our standard approach is to start from GBD's all-cause mortality and delete mortality due to any modeled causes to determine the \"background\" mortality rate (mortality rate due to everything we're not modeling explicitly).\n",
2224-
"We apply that background mortality rate to all simulants.\n",
2225-
"Then, for each modeled disease/cause, we additionally apply the GBD-derived *excess* mortality rate of that disease *only to simulants who currently have the disease*.\n",
2226-
"The excess mortality rate, as mentioned previously, is the term for the rate of death due to a disease among people who have that disease (which will of course be higher than the rate of death due to that disease among all people, since people without the disease cannot die of it).\n",
2247+
"Our standard approach is to start from GBD's all-cause mortality rate, which is the rate at which people in the population die (of any cause).\n",
2248+
"Then, we delete cause-specific mortality rates due to modeled causes to determine the \"background\" mortality rate (mortality rate due to everything we're not modeling explicitly),\n",
2249+
"which we apply to all simulants.\n",
2250+
"A \"cause-specific mortality rate\" is the rate at which people in the overall population die of a specific cause; it is directly comparable with the\n",
2251+
"all-cause mortality rate because both have the full population as the denominator.\n",
2252+
"On top of the background mortality, for each modeled disease/cause, we apply the GBD-derived *excess* mortality rate of that disease *only to simulants who currently have the disease*.\n",
2253+
"The excess mortality rate is the term for the rate of death due to a disease among people who have that disease (which will always be higher than the cause-specific mortality rate, since people without the disease cannot die of it).\n",
22272254
"\n",
22282255
"Nonfatal burden is estimated by applying GBD disability weights to those in\n",
22292256
"infected states."
@@ -2266,8 +2293,10 @@
22662293
"For our example, diarrheal diseases are typically of very short duration, so we definitely want to capture\n",
22672294
"that people can have go in and out of episodes.\n",
22682295
"However, unlike some infectious diseases,\n",
2269-
"having an episode of diarrheal disease does not make you immune from future episodes,\n",
2270-
"and there is no vaccinated or otherwise immune population, so everyone who doesn't have\n",
2296+
"having an episode of diarrheal disease does not generally make you immune from future episodes,\n",
2297+
"and while there are vaccines for some specific pathogens such as rotavirus,\n",
2298+
"there isn't a population totally immune to diarrhea.\n",
2299+
"Therefore we'll assume that everyone who doesn't have\n",
22712300
"diarrheal diseases can be called \"susceptible\" to them.\n",
22722301
"This makes diarrheal diseases best represented by this state machine:"
22732302
]
@@ -2488,7 +2517,7 @@
24882517
},
24892518
"source": [
24902519
"These components all *do* things: create newborn simulants, make simulants get sick and recover, or make simulants die, for example.\n",
2491-
"We also typically need a type of component called an **observer**, which doesn't do anything but just records what happens.\n",
2520+
"We also typically need a type of component called an **observer**, which which does not act on the simulated population but just records what happens.\n",
24922521
"This is how, for example, we can record the disease burden our simulants experience.\n",
24932522
"There are standard observers in `vivarium_public_health` -- we'll use some that record the fatal and nonfatal burden."
24942523
]
@@ -2532,8 +2561,10 @@
25322561
"tags": []
25332562
},
25342563
"source": [
2535-
"The last thing that is missing is our intervention. Unfortunately, we can't get this from `vivarium_public_health` -- we need to make this\n",
2564+
"The last thing that is missing is our intervention. Unfortunately, we can't currently get this from `vivarium_public_health` -- for now, we need to make this\n",
25362565
"component from scratch.\n",
2566+
"There is work underway to add a cookie-cutter intervention component to `vivarium_public_health`,\n",
2567+
"which will make this easier!\n",
25372568
"\n",
25382569
"A component is a Python *class* with special methods and properties. We won't get into all the details here,\n",
25392570
"but at a high level:\n",

0 commit comments

Comments
 (0)