You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following `Briggs et al. <https://www.sciencedirect.com/science/article/pii/S1098301512016592>`__ we classify uncertainty
35
+
into the following types:
36
36
37
-
`See this resource for an overview of Monte Carlo Uncertainty Propagation <https://pubs.acs.org/doi/10.1021/acs.jchemed.0c00096#:~:text=Monte%20Carlo%20simulations%20for%20uncertainty,distributions%20of%20the%20input%20variables>`_
37
+
- **Parameter uncertainty**: uncertainty about simulation inputs (parameters)
38
+
- **Stochastic uncertainty**: uncertainty due to limited size of the simulation
39
+
- **Structural or model uncertainty**: uncertainty about the model structure itself
38
40
39
-
Uncertainty Parameterization in Vivarium
40
-
-----------------------------------------
41
+
Parameter uncertainty
42
+
---------------------
41
43
42
-
What is a draw?
43
-
++++++++++++++++
44
+
We use `Monte Carlo methods <https://en.wikipedia.org/wiki/Monte_Carlo_method>`__ for quantifying parameter uncertainty.
45
+
Monte Carlo methods use repeated random sampling.
46
+
In our case, that means repeatedly running the simulation with different input parameters.
44
47
45
-
A draw is a sample from a probability distribution. We use the 1,000 draws/samples (or some other :math:`n` number of draws) to represent the distribution, instead of using a continuous density function from which each individual draw was sampled.
48
+
The GBD also uses Monte Carlo methods, calling the resulting samples "draws" -- you can learn more about draws `here <https://hub.ihme.washington.edu/pages/viewpage.action?pageId=406389120&spaceKey=ICKB&title=Draws>`__.
49
+
We use these directly for GBD parameters.
50
+
For example, draw 0 of our simulation will utilize the draw 0 value for all GBD parameters used in the simulation.
46
51
47
-
Draws in GBD
48
-
~~~~~~~~~~~~~
52
+
For non-GBD parameters from literature sources or for GBD covariate estimates, it is unlikely that draw-level estimates will be available and that results are reported as mean estimates with 95% confidence intervals instead. In these cases, we must specify *how* to sample from within a distribution of uncertainty about the parameter values. To do this, we must define some distribution of uncertainty (:ref:`discussed on this page <vivarium_best_practices_statistical_distributions>`) including the type of distribution (such as normal, uniform, lognormal, etc.) and distribution parameters (such as mean/standard deviation, min/max, etc.). Then, for each draw of the Vivarium simulation, a single value will be randomly sampled from this distribution of uncertainty.
49
53
50
-
With the exception of covariate and population size estimates, the GBD calculates 1,000 draw-level estimates for each outcome value and then reports the mean, 2.5th percentile, and 97.5th percentile across those draw-level values as the final estimate and 95% uncertainty interval for each outcome. The 1,000 draw-level estimates for each outcome are estimated by performing the calculation required to produce that estimate 1,000 times using 1,000 draws of each parameter used in that calculation.
54
+
We calculate simulation results at the draw-specific level.
55
+
We only summarize final results across all draws as the *last* step before visualization/reporting (see also the :ref:`results processing tips page <vivarium_best_practices_results_processing>`).
51
56
52
-
.. todo::
57
+
Stochastic uncertainty
58
+
----------------------
53
59
54
-
Provide some documentation on if there is any draw-level continuity in the GBD. I've never known but always wondered how this works! Are there any good GBD resources here?
60
+
Stochastic uncertainty is created by the limited sample size of random events in the simulation.
61
+
Unlike parameter uncertainty which we want to propagate, stochastic uncertainty is something we generally want to minimize.
62
+
We can do this by increasing the number of simulants in our simulation, **per draw** (remember, we need to run a simulation for each draw).
63
+
The only downside of more simulants is more computational cost.
64
+
Vivarium also utilizes a technique called :ref:`common random numbers <vivarium:crn_concept>` to reduce stochastic uncertainty (for a given population size).
55
65
56
-
Also, I believe that future GBD rounds may use 500 draws instead of 1,000. Need to confirm this.
57
-
58
-
Draws for non-GBD parameters
59
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60
-
61
-
For non-GBD parameters from literature sources or for GBD covariate estimates, it is unlikely that draw-level estimates will be available and that results are reported as mean estimates with 95% confidence intervals instead. In these cases, we must specify *how* to sample a given point value from within a distribution of uncertainty about the parameter values. To do this, we must define some distribution of uncertainty (:ref:`discussed on this page <vivarium_best_practices_statistical_distributions>`) including the type of distribution (such as normal, uniform, lognormal, etc.) and distribution parameters (such as mean/standard deviation, min/max, etc.). Then, for each draw of the Vivarium simulation, a single value will be randomly sampled from this distribution of uncertainty.
62
-
63
-
.. todo::
64
-
65
-
Link to some description of (and discuss) the difference between parameter uncertainty and individual-level uncertainty in Vivarium (need to create this page)
66
-
67
-
Draws in Vivarium
68
-
~~~~~~~~~~~~~~~~~
69
-
70
-
Vivarium models utilize Monte Carlo uncertainty propagation and are run for some specified number of draws, selecting a different value from within each parameter uncertainty interval for each draw. Notably, input draws for Vivarium simulations will generally be numbered 0-999 such that Vivarium simulation draw 0 will utilize the draw 0 value for all GBD parameters used in the simulation. Then, we calculate simulation results at the draw-specific level and then summarize final results across all draws (see the :ref:`results processing tips page <vivarium_best_practices_results_processing>`).
66
+
Because we *also* use different randomness between draws in addition to different parameter values,
67
+
we can use the variability in simulation outputs across draws to capture both parameter and stochastic uncertainty.
68
+
However, this overstates our stochastic uncertainty because each draw has a smaller population size
69
+
than the total population size across all draws.
70
+
A simulation that splits its population across more draws will appear to have more stochastic uncertainty
71
+
than a simulation that splits the same total population across fewer draws,
72
+
even though the total number of random events informing our estimate is the same.
71
73
72
74
What is a random seed?
73
75
++++++++++++++++++++++
74
76
75
-
Vivarium utilizes random numbers to determine whether probabilistic events occur or not within a simulation. To read more about how and why Vivarium utilizes random numbers, see the `Vivarium documentation on common random numbers <https://vivarium.readthedocs.io/en/latest/concepts/crn.html>`_. Generally, random seeds serve two practical purposes for us:
77
+
A `random seed <https://en.wikipedia.org/wiki/Random_seed>`__ is a number used to initialize a (pseudo-)random number generator.
78
+
Given the same seed, the same sequence of random numbers will be generated.
79
+
Random seeds serve two practical purposes for us:
76
80
77
81
1. Ensure that we can reproduce random events (multiple times for the same scenario as well as across scenarios, as discussed in the Vivarium documentation)
78
82
79
83
2. Act as a tool that enables us to run subsets of a simulated Vivarium population in parallel on the cluster
80
84
81
-
For details on the first point, please read the Vivarium documentation on common random numbers. With respect to the second point, imagine we have a simulated population of 100,000 individuals. It may take a lot of time to calculate and record what happens to all 100,000 simulants at each timestep of the simulation in a single cluster job. Therefore, it may be preferable to split this population into 10 groups of 10,000 individuals and run each group in its own cluster job *in parallel.* This could allow us to finish calculating and recording what happens to all 100,000 simulants in approximately 1/10th of the time! As we split our simulated population size into subgroups, each subgroup will utilize a different random seed (we would functionally be simulating the *same* simulants if all subgroups shared the same random seed!).
85
+
With respect to the second point, imagine we have a simulated population of 100,000 individuals.
86
+
It may take a lot of time to calculate and record what happens to all 100,000 simulants at each timestep of the simulation in a single cluster job.
87
+
Therefore, *as long as individuals don't interact*, it may be preferable to split this population into 10 groups of 10,000 individuals and run each group in its own cluster job *in parallel.*
88
+
This could allow us to finish calculating and recording what happens to all 100,000 simulants in approximately 1/10th of the time!
89
+
As we split our simulated population size into subgroups, each subgroup will utilize a different random seed
90
+
(we would functionally be simulating the *same* simulants if all subgroups shared the same random seed!).
82
91
83
92
Therefore, you may hear software engineers or researchers discussing "how many seeds" to include in a given simulation run *per draw*. While this is useful shorthand from a simulation implementation standpoint, researchers should always consider it in tandem with **simulated population size per draw**.
84
93
@@ -97,8 +106,23 @@ Generally, as the number of random seeds increases and the associated population
97
106
98
107
Decisions on the degree of parallelization will depend on cluster availability, intensity of resource requirements to run the simulation, and project timelines. For example, if there is not much space on the cluster and a simulation is launched at the end of the day and will be run over night and not checked until morning, it may be preferable to run over fewer random seeds for a longer duration of time. However, if there is a lot of available space on the cluster and the model will be launched in the morning, it may be preferable to run over more random seeds so that it will be ready to view in a shorter amount of time.
99
108
109
+
Structural or model uncertainty
110
+
-------------------------------
111
+
112
+
This source of uncertainty is the hardest to quantify.
113
+
It refers to the uncertainty in the model structure itself, including the assumptions and simplifications made during model development.
114
+
This can include the choice of model parameters, the functional forms of relationships between variables, and the inclusion or exclusion of certain attributes or causal effects.
115
+
116
+
Strategies we use to address structural uncertainty include:
117
+
118
+
* Listing our assumptions and limitations in the model documentation and in any publications describing the model
119
+
* Conducting sensitivity analyses to explore how changes in model structure or assumptions affect simulation results
120
+
* Comparing our results to those of other models in the literature to qualitatively assess how differences in model structure may be impacting results
121
+
122
+
We typically do not include this category of uncertainty in our uncertainty intervals.
123
+
100
124
Specifying Vivarium Uncertainty Parameters
101
-
+++++++++++++++++++++++++++++++++++++++++++
125
+
------------------------------------------
102
126
103
127
The appropriate population size and number of draws may vary between simulations based on:
104
128
@@ -120,6 +144,6 @@ Signs that the simulation has too few draws:
120
144
Some potentially reasonable starting points:
121
145
122
146
- 50 input draws
123
-
- 100,000 population size
147
+
- 100,000 population size per draw
124
148
125
149
To reduce computational intensity throughout model development, it may be desirable to run with a smaller population size and/or smaller number of draws (say 25) throughout the iterative V&V process and then increase these parameters for final production runs.
Copy file name to clipboardExpand all lines: docs/source/model_design/vivarium_overview/vivarium_versus_other_model_types/index.rst
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -168,6 +168,18 @@ regard to relationship type. Fortunately, this limitation has since been resolve
168
168
individual-level data, but because this information is aggregated, the limitation won't be surfaced and improved upon.
169
169
Read more about this project `here <https://vivarium-research.readthedocs.io/en/latest/models/concept_models/vivarium_census_synthdata/concept_model.html>`__.
170
170
171
+
A third example of this occurs with residual confounding. Unlike compartmental or multiplication models, which
172
+
typically assume a homogeneous population within a "state,"
173
+
microsimulations explicitly model individual-level heterogeneity. This shift in granularity does not introduce
174
+
new confounding; rather, it surfaces existing data limitations that are often obscured by aggregation in other
175
+
model types. Whether a model is individual-level or population-level, the data required to fully eliminate residual
176
+
confounding remains the same: a complete map of the correlations between all risk exposures and outcomes.
177
+
178
+
While our team strives to account for the relationships between all risk exposures, no dataset can capture every
179
+
variable. Consequently, there will always be a degree of residual confounding in any model structure, and Vivarium
180
+
is no exception to this. You can read more about how our team conceptualizes and accounts for limitations related to
@@ -194,14 +206,6 @@ records, medication histories, and other highly personal information.
194
206
If we're not interested in the complexities described in the section above, then it is likely a less data- and resource-intensive alternative, such as a multiplication model, is a suitable modeling
195
207
strategy.
196
208
197
-
Residual confounding
198
-
~~~~~~~~~~~~~~~~~~~~
199
-
200
-
Another limitation or disadvantage of microsimulations is that getting realistic, individual-level characteristics from population-level data is difficult, and
201
-
creates opportunity for residual confounding.
202
-
203
-
You can read more about residual confounding and how our team accounts for it `here <https://vivarium-research.readthedocs.io/en/latest/model_design/vivarium_model_components/risk_factors/residual_confounding/index.html>`__.
204
-
205
209
.. todo::
206
210
207
211
Cite [Allen-et-al-2019]_ and [Sorensen-et-al-2017]_ somewhere.
0 commit comments