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
journal = {Transactions of The Royal Society of Tropical Medicine and Hygiene},
76
+
author = {Hall, A.J.},
77
+
year = {1992},
78
+
pages = {461--461}
79
+
}
80
+
81
+
@article{Riou_covid_2020,
82
+
Author = {Riou, Julien and Hauser, Anthony and Counotte, Michel J and Margossian, Charles C
83
+
and Konstantinoudis, Garyfallos and Low, Nicola and Althaus, Christian L},
84
+
Title = {Estimation of SARS-CoV-2 mortality during the early stages of an epidemic:
85
+
a modeling study in Hubei, China and northern Italy},
86
+
journal = {medRxiv:2020.03.04.20031104},
87
+
year = {2020}}
88
+
89
+
@article{Betancourt_hmc_2018,
90
+
Author = {Betancourt, Michael},
91
+
Journal = {arXiv:1701.02434v1},
92
+
Month = {January},
93
+
Title = {A Conceptual Introduction to Hamiltonian Monte Carlo},
94
+
Year = {2018}}
95
+
96
+
@article{Hoffman_nuts_2014,
97
+
Author = {Hoffman, Matthew D. and Gelman, Andrew},
98
+
Date-Added = {2016-10-07 17:06:45 +0000},
99
+
Date-Modified = {2017-08-17 09:27:44 +0000},
100
+
Journal = {Journal of Machine Learning Research},
101
+
Month = {April},
102
+
Pages = {1593-1623},
103
+
Title = {The No-U-Turn Sampler: Adaptively Setting Path Lengths in Hamiltonian Monte Carlo},
104
+
Year = {2014}}
105
+
106
+
@techreport{Hindmarsh_ode_2020,
107
+
Author = {Hindmarsh, Alan and Serban, Radu},
108
+
Date-Modified = {2020-01-16 22:47:24 -0500},
109
+
Institution = {Lawrence Livermore National Laboratory},
110
+
Month = {January},
111
+
Title = {User Documentation for CVODES v5.1.0},
112
+
Year = {2020}}
113
+
114
+
@book{Griewank_ad_2008,
115
+
Author = {Griewank, Andreas and Walther, Andrea},
116
+
Edition = {Second},
117
+
Publisher = {Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA},
118
+
Title = {Evaluating derivatives},
119
+
Year = {2008}}
120
+
121
+
@article{Margossian_ad_2019,
122
+
Author = {Charles C. Margossian},
123
+
Month = {3},
124
+
Title = {A Review of automatic differentiation and its efficient implementation},
125
+
journal = {Wiley interdisciplinary reviews: data mining and knowledge discovery},
126
+
volume = {9},
127
+
issue = {4},
128
+
doi = {10.1002/WIDM.1305},
129
+
Year = {2019}}
130
+
131
+
@article{margossian_mixed_solver_2017,
132
+
Author = {Margossian, Charles C and Gillespie, William R},
133
+
Booktitle = {American },
134
+
Journal = {Journal of Pharmacokinetics and Pharmacodynamics},
135
+
Month = {October},
136
+
Title = {Gaining Efficiency by Combining Analytical and Numerical Methods to Solve ODEs: Implementation in Stan and Application to Bayesian PK/PD },
137
+
Volume = {44},
138
+
Year = {2017}}
139
+
140
+
@article{Flaxman_covid_2020,
141
+
Author = {Seth Flaxman and Swapnil Mishra and Axel Gandy and H Juliette T Unwin and Helen Coupland and ... and Samir Bhatt},
142
+
title = {Report 13 - Estimating the number of infections and the impact of non-pharmaceutical interventions on COVID-19 in 11 European countries},
143
+
journal = {arXiv:2004.11342},
144
+
year = {2020},
145
+
month = {April}}
146
+
147
+
@article{Carpenter_stan_2017,
148
+
Title = {Stan: A Probabilistic Programming Language},
149
+
Author = {Carpenter, Bob and Gelman, Andrew and Hoffman, Matt and Lee, Daniel and Goodrich, Ben and Betancourt, Michael and Brubaker, Marcus A. and Guo, Jiqiang and Li, Peter and Riddel, Allen},
150
+
Journal = {Journal of Statistical Software},
151
+
volume = {76},
152
+
issue = {1},
153
+
pages = {1 --32},
154
+
Year = {2017},
155
+
doi = {10.18637/jss.v076.i01}}
156
+
157
+
@article{Chatzilena_tutorial_2019,
158
+
author = {Chatzilena, Anastasia and van Leeuwen, Edwin and Ratmann, Olivier
159
+
and Baguelin, Olivier and Demiris, Nikolaos},
160
+
title = {Contemporary statistical inference for infectious disease models using Stan},
161
+
journal = {Epidemics},
162
+
volume = {29},
163
+
year = {2019},
164
+
doi = {https://doi.org/10.1016/j.epidem.2019.100367}}
165
+
166
+
@article{Mihaljevic_tutorial_2016,
167
+
title = {Estimating transmission by fitting mechanistic models in Stan},
We evaluate the solution numerically by using one of Stan's numerical integrators.
@@ -343,6 +347,13 @@ with
343
347
344
348
We now have all the ingredients to solve our ODE.
345
349
350
+
Note that in the given example, when we assume that the total population remains constant, the three derivatives $\frac{dS}{dt}$, $\frac{dI}{dt}$, $\frac{dR}{dt}$ sum up to $0$: We can use this fact to improve computational efficiency of the `sir` function by deriving the value of $\frac{dI}{dt}$ from $\frac{dS}{dt}$ and $\frac{dR}{dt}$:
351
+
```{stan, eval=F, output.var="md"}
352
+
real dS_dt = -beta * I * S / N;
353
+
real dR_dt = gamma * I;
354
+
real dI_dt = -(dS_dt + dR_dt);
355
+
```
356
+
346
357
### Building the model in Stan
347
358
348
359
We next code the model in Stan, working through the various coding blocks.
0 commit comments