generated from jamesmbaazam/QuartoPresentationTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_05_01_next_generation_matrix.qmd
305 lines (153 loc) · 7.91 KB
/
_05_01_next_generation_matrix.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
<!-- ------------------------------------------------------------------------ -->
<!-- #### The next-generation matrix approach -->
<!-- - The next-generation matrix (NGM) approach focuses on all the infected compartments. -->
<!-- - Let's outline the steps to derive $R0$ using the NGM approach [@diekmann2010construction]. -->
<!-- --- -->
<!-- - Step 1: Identify the compartments that produce new infections and describe how infections are changing over time. This subset of the system is called the "infected subsystem". -->
<!-- - Note the infected subsystem/compartments by a vector $x$ and the uninfected subsystem by $y$. -->
<!-- - For example, for the SEIR model, $x = (E, I)$ and $y = (S, R)$. -->
<!-- --- -->
<!-- - For each infected compartment, extract the following components: -->
<!-- - $F_i(x,y)$: the rate of new infections entering compartment $i$, and -->
<!-- - $V_i(x,y) = V_i^-(x,y) - V_i^+(x,y)$, that is, the rate of transfers out of compartment $i$ minus the rate of transfers into the compartment. -->
<!-- - Essentially, each infected compartment can be written as $\dfrac{d x_i}{dt} = F_i(x,y) - V_i(x,y)$. -->
<!-- --- -->
<!-- Step 2: Find $\mathcal{F}$ and $\mathcal{V}$, the matrix of partial derivatives for $F$ and $V$ respectively and evaluate at the disease-free equilibrium. This is called the Jacobian matrix (See @sec-jacobian). -->
<!-- ::: callout-note -->
<!-- The disease-free equilibrium is the state where no infections are present. For an SEIR model, this is denoted as $(S^*, E^*, I^*, R^*) = (N, 0, 0, 0)$, where $N$ is the total population size. -->
<!-- ::: -->
<!-- ------------------------------------------------------------------------ -->
<!-- ##### The Jacobian matrix {#sec-jacobian} -->
<!-- - The Jacobian matrix is a matrix of first-order partial derivatives of a function. -->
<!-- - What does it look like? -->
<!-- ------------------------------------------------------------------------ -->
<!-- ```{=tex} -->
<!-- \begin{equation*} -->
<!-- J = \begin{bmatrix} -->
<!-- \dfrac{\partial f_1}{\partial x_1} & \dfrac{\partial f_1}{\partial x_2} & \cdots & \dfrac{\partial f_1}{\partial x_n} \\ -->
<!-- \dfrac{\partial f_2}{\partial x_1} & \dfrac{\partial f_2}{\partial x_2} & \cdots & \dfrac{\partial f_2}{\partial x_n} \\ -->
<!-- \vdots & \vdots & \ddots & \vdots \\ -->
<!-- \dfrac{\partial f_n}{\partial x_1} & \dfrac{\partial f_n}{\partial x_2} & \cdots & \dfrac{\partial f_n}{\partial x_n} -->
<!-- \end{bmatrix} -->
<!-- \end{equation*} -->
<!-- ``` -->
<!-- where $f_i$ is the $i$-th function of the function and $x_i$ is the $i$-th variable. -->
<!-- ------------------------------------------------------------------------ -->
<!-- - Step 3: Solve $\mathcal{F}\mathcal{V}^{-1}$ to obtain the next-generation matrix, $\mathcal{G}$. -->
<!-- - Step 4: Determine the spectral radius, $\rho$, of $\mathcal{G}$, which is the [dominant (largest absolute) eigenvalue]{style="color:tomato;"} of the NGM. -->
<!-- --- -->
<!-- $R0$ is the dominant eigenvalue of the next generation matrix. -->
<!-- ::: {.callout-note} -->
<!-- - If you are wondering why $R0$ is taken to be the spectral radius of the NGM, see [@brouwer2022spectral]. -->
<!-- - [@brouwer2022spectral] also provides a detailed explanation of the the building blocks of $R0$ and the intuition behind it. -->
<!-- ::: -->
<!-- ------------------------------------------------------------------------ -->
<!-- ##### Steps to determine the Spectral Radius -->
<!-- - Find the Eigenvalues: -->
<!-- - Given a square matrix $A$, compute the eigenvalues $\lambda$ by solving the characteristic equation: -->
<!-- ```{=tex} -->
<!-- \begin{equation*} -->
<!-- \begin{aligned} -->
<!-- \text{det}(A - \lambda I) = 0 -->
<!-- \end{aligned} -->
<!-- \end{equation*} -->
<!-- ``` -->
<!-- where $I$ is the identity matrix of the same dimension as $A$, and $\text{det}$ denotes the determinant. -->
<!-- ------------------------------------------------------------------------ -->
<!-- - Compute the Spectral Radius, $\rho(A) = \max \{ |\lambda_1|, |\lambda_2|, \ldots, |\lambda_n|$ -->
<!-- where $\lambda_1, \lambda_2, \ldots, \lambda_n$ are the eigenvalues of $A$, and $|\lambda_i|$ denotes the absolute value of the eigenvalue $\lambda_i$. -->
<!-- Let's apply these ideas to derive the $R0$ of the SEIR model. -->
<!-- ------------------------------------------------------------------------ -->
<!-- #### Deriving the R0 of the SEIR model -->
<!-- Step 1: identify the infected compartments $E$ and $I$: -->
<!-- ```{=tex} -->
<!-- \begin{equation*} -->
<!-- \begin{aligned} -->
<!-- \frac{dE}{dt} &= \beta S I - \sigma E, \\ -->
<!-- \frac{dI}{dt} &= \sigma E - \gamma I. -->
<!-- \end{aligned} -->
<!-- \end{equation*} -->
<!-- ``` -->
<!-- ------------------------------------------------------------------------ -->
<!-- Step 2: Decompose the system into $\mathcal{F}$, and $\mathcal{V}$: -->
<!-- Define: -->
<!-- - $\mathcal{F}$: new infection terms -->
<!-- - $\mathcal{V}$: transition terms -->
<!-- \begin{equation*} -->
<!-- \mathbf{F} = \begin{pmatrix} -->
<!-- \beta S I \\ -->
<!-- 0 -->
<!-- \end{pmatrix}, -->
<!-- \quad -->
<!-- \mathbf{V} = \begin{pmatrix} -->
<!-- \sigma E \\ -->
<!-- \gamma I - \sigma E -->
<!-- \end{pmatrix} -->
<!-- \end{equation*} -->
<!-- ------------------------------------------------------------------------ -->
<!-- Calculate the matrix of partial derivatives of $\mathcal{F}$ and $\mathcal{V}$ with respect to $E$ and $I$ and evaluate at the disease-free equilibrium (DFE) $(S^*, E^*, I^*, R^*) = (N, 0, 0, 0)$: -->
<!-- \begin{equation*} -->
<!-- \mathcal{F} = \begin{bmatrix} -->
<!-- \dfrac{\partial{(\beta S I)}}{\partial{E}} & \dfrac{\partial{(\beta S I)}}{\partial{I}} \\ -->
<!-- \dfrac{\partial{(0)}}{\partial{E}} & \dfrac{\partial{(0)}}{\partial{I}} -->
<!-- \end{bmatrix}_{\substack{S = N, E = I = R = 0}}, -->
<!-- \quad -->
<!-- \mathcal{V} = \begin{bmatrix} -->
<!-- \dfrac{\partial{(\sigma E)}}{\partial{E}} & \dfrac{\partial{(\sigma E)}}{\partial{I}} \\ -->
<!-- \dfrac{\partial{(\gamma I - \sigma E)}}{\partial{E}} & \dfrac{\partial{(\gamma I - \sigma E)}}{\partial{I}} -->
<!-- \end{bmatrix}_{\substack{S = N, E = I = R = 0}} -->
<!-- \end{equation*} -->
<!-- --- -->
<!-- ```{=tex} -->
<!-- \begin{equation*} -->
<!-- \mathcal{F} = \begin{pmatrix} -->
<!-- 0 & \beta N \\ -->
<!-- 0 & 0 -->
<!-- \end{pmatrix}, -->
<!-- \quad -->
<!-- \mathcal{V} = \begin{pmatrix} -->
<!-- -\sigma & 0 \\ -->
<!-- \sigma & -\gamma -->
<!-- \end{pmatrix} -->
<!-- \end{equation*} -->
<!-- ``` -->
<!-- ------------------------------------------------------------------------ -->
<!-- We aim to solve -->
<!-- ```{=tex} -->
<!-- \begin{equation*} -->
<!-- \mathcal{G} = \mathcal{F} \mathcal{V}^{-1} -->
<!-- \end{equation*} -->
<!-- ``` -->
<!-- Let's compute $\mathcal{V}^{-1}$: -->
<!-- ```{=tex} -->
<!-- \begin{equation*} -->
<!-- \mathcal{V}^{-1} = \begin{pmatrix} -->
<!-- \frac{1}{\sigma} & 0 \\ -->
<!-- \frac{1}{\gamma} & \frac{1}{\sigma} -->
<!-- \end{pmatrix} -->
<!-- \end{equation*} -->
<!-- ``` -->
<!-- ------------------------------------------------------------------------ -->
<!-- ```{=tex} -->
<!-- \begin{equation*} -->
<!-- \mathcal{G} = \begin{pmatrix} -->
<!-- 0 & \beta S_0 \\ -->
<!-- 0 & 0 -->
<!-- \end{pmatrix} -->
<!-- \begin{pmatrix} -->
<!-- \frac{1}{\sigma} & 0 \\ -->
<!-- \frac{1}{\gamma} & \frac{1}{\sigma} -->
<!-- \end{pmatrix} -->
<!-- = \begin{pmatrix} -->
<!-- \frac{\beta S_0}{\gamma} & \frac{\beta S_0}{\sigma} \\ -->
<!-- 0 & 0 -->
<!-- \end{pmatrix} -->
<!-- \end{equation*} -->
<!-- ``` -->
<!-- ------------------------------------------------------------------------ -->
<!-- $R_0$ is the spectral radius (dominant eigenvalue) of $\mathcal{G}$: -->
<!-- ```{=tex} -->
<!-- \begin{equation*} -->
<!-- R_0 = \rho(\mathcal{G}) = \frac{\beta S_0}{\gamma} -->
<!-- \end{equation*} -->
<!-- ``` -->