@@ -20,10 +20,10 @@ This practical is based in the following tutorial episodes:
2020
2121This practical has three activities.
2222
23- ## Activity 1: Generate disease trajectories of new infections
23+ ## Activity 1: Generate disease trajectories
2424
25- Generate disease trajectories of infectious subjects and new infections
26- using the following available inputs:
25+ Generate disease trajectories of ** infectious individuals ** and ** new
26+ infections ** using the following available inputs:
2727
2828- Social contact matrix
2929- Age group of the infectious population
@@ -32,16 +32,16 @@ using the following available inputs:
3232
3333Within your room, Write your answers to these questions:
3434
35- - What is the location ( time) and size of epidemic peak for infectious
36- subjects in each age group?
37- - What is the number of new infections at the epidemic peak?
38- - Change the basic reproduction number to 1.1 and 3. Are the changes in
39- location (time) and size of the peak of new infections as expected?
40- (based on the concept definition of reproduction number)
41- - Interpret: How would you communicate these results to a
42- decision-maker ?
43- - Compare: What differences do you identify from other room outputs? (if
44- available)
35+ - What are the time and size of the epidemic peak for * infectious
36+ individuals * in each age group?
37+ - Compare and describe the similarities and differences between these
38+ two outputs: the epidemic peak of * infectious individuals * and the
39+ plot of * new infections* .
40+ - Modify the basic reproduction number (R₀) from 1.46 to 1.1 or 3. What
41+ changes do you observe in the time and size of the peak of * new
42+ infections * ?
43+ - Compare: What differences do you notice compared to the outputs from
44+ other rooms (if available)?
4545
4646### Inputs
4747
@@ -54,7 +54,7 @@ Within your room, Write your answers to these questions:
5454| Parameter | Value | Notes |
5555| ----| ----| ----|
5656| Age Limits | 0, 20, 40 | Age group cutoffs |
57- | Infectious Population | 1 / 1,000,000 | 1 infectious individual per million people |
57+ | Infectious Population | 1 / 1,000,000 | 1 infectious individual per million people in Age group 20-40 |
5858| Basic Reproduction Number | 1.46 | R₀ value for influenza |
5959| Pre-infectious Period | 3 days | Incubation before becoming infectious |
6060| Infectious Period | 7 days | Duration of infectiousness |
@@ -84,18 +84,36 @@ Within your room, Write your answers to these questions:
8484Interpretation template:
8585
8686- In the population, the demographic group of ` age from [0,20] ` has a
87- peak of infectious subjects at day 320 with a size of ` 513,986 ` .
88-
89- Interpretation Helpers:
87+ peak of infectious individuals at day 320 with a size of ` 513,986 ` .
88+
89+ Compare output types:
90+
91+ - ` epidemics::epidemic_peak(data = simulate_baseline) `
92+ - The table output gives exact values for time and size of peak for
93+ * infectious individuals* .
94+ - ` epidemics::new_infections(data = simulate_baseline) `
95+ - We can not get exact value for time and size of peak of * new
96+ infections* .
97+ - We can make qualitative comparisons.
98+ - Comparing plots:
99+ - The peak size of * new infections* is lower than the peak size of
100+ * infectious individuals* .
101+ - Both plot trajectories seem to share the time of peak.
102+ - Other packages that can estimate trend of new infections are
103+ ` {EpiNow2} ` and ` {epichains} ` .
104+
105+ Modify the basic reproduction number (R₀):
90106
91107| R = 1.1 | R = 3 |
92108| ----| ----|
93109| ![ image] ( https://hackmd.io/_uploads/H1UupFOAyl.png ) | ![ image] ( https://hackmd.io/_uploads/ryVoat_R1l.png ) |
94110
95- - An epidemic with R=1.1 has a days delayed and smaller outbreak based
96- on number of infections (day 1200, 9000 new infections), compared with
97- R=3 with a earlier and higher peak than R = 1.5 (day 100, 1,000,000
98- new infections).
111+ - An epidemic with ` R₀ = 1.1 ` has a days delayed and smaller outbreak
112+ based on number of infections (day 1200, 9000 new infections),
113+ compared with ` R₀ = 3 ` with an earlier and higher peak than
114+ ` R₀ = 1.46 ` (day 100, 1,000,000 new infections).
115+
116+ Comparison between rooms:
99117
100118| Vietnam | Zimbabwe |
101119| ----| ----|
@@ -104,9 +122,35 @@ Interpretation Helpers:
104122- Population structure from Italy, Vietnam, and Zimbabwe influences the
105123 progression of the transmission in each population.
106124
125+ <!-- -->
126+
127+ # Italy
128+ contact_data$demography
129+ #> age.group population proportion year
130+ #> <char> <num> <num> <int>
131+ #> 1: [0,20) 11204261 0.1905212 2005
132+ #> 2: [20,40) 16305622 0.2772665 2005
133+ #> 3: 40+ 31298598 0.5322123 2005
134+
135+ # Vietnam
136+ contact_data$demography
137+ #> age.group population proportion year
138+ #> <char> <num> <num> <int>
139+ #> 1: [0,20) 31847968 0.3777536 2005
140+ #> 2: [20,40) 28759380 0.3411194 2005
141+ #> 3: 40+ 23701489 0.2811270 2005
142+
143+ # Zimbabwe
144+ contact_data$demography
145+ #> age.group population proportion year
146+ #> <char> <num> <num> <int>
147+ #> 1: [0,20) 8235388 0.5219721 2015
148+ #> 2: [20,40) 5179150 0.3282628 2015
149+ #> 3: 40+ 2362911 0.1497651 2015
150+
107151## Activity 2: Compare interventions
108152
109- Compare the disease trajectories of new infections against an
153+ Compare the disease trajectories of ** new infections** against an
110154intervention using the following available inputs:
111155
112156- Time to start the intervention
@@ -116,33 +160,38 @@ intervention using the following available inputs:
116160
117161Within your room, write your answers to these questions:
118162
119- - How does the time to start of the intervention (early/late) impact the
120- timing and size of the peak of new infectious individuals?
121- - Is the observed impact of the intervention in these results expected?
122- - Interpret: How would you communicate these results to a
163+ - How can the start of interventions (early vs. late) affect the timing
164+ and size of the peak of new infections?
165+ - Is the impact of the intervention, as shown in these results, what you
166+ would expect? Why or why not?
167+ - Interpret the results: How would you explain these findings to a
123168 decision-maker?
124- - Compare: What differences do you identify from other room outputs? (if
125- available)
169+ - Compare: What differences do you observe compared to the outputs from
170+ other rooms (if available)?
126171
127172### Inputs
128173
129- | Room | Intervention | Early Start | Late Start | Duration (days) | Effect (Reduction or Rate) |
174+ | Room | Country | Survey Link |
175+ | -------| ----------| ------------------------------------------|
176+ | 1,2,3 | Zimbabwe | < https://doi.org/10.5281/zenodo.3886638 > |
177+
178+ | Room | Intervention | Reduction/Vaccination rate | Early start (day) | Late start (day) | Duration (days) |
130179| ----| ----| ----| ----| ----| ----|
131- | 1 | School | 100 | 200 | 100 | Age 0–19: 0.5; Age 20+: 0.01 |
132- | 2 | Mask | 100 | 200 | 200 | All ages: 0.163 |
133- | 3 | Vaccine | 100 | 200 | 150 | All ages: 0.001 |
180+ | 1 | School | Age 0–19: 0.5; Age 20+: 0.01 | 100 | 200 | 250 |
181+ | 2 | Mask | All ages: 0.163 | 100 | 200 | 250 |
182+ | 3 | Vaccination | All ages: 0.001 | 100 | 200 | 250 |
134183
135184### Solution
136185
137186<!-- visible for instructors and learners after practical (solutions) -->
138187
139188#### Outputs
140189
141- | Intervention | Early start | Late start |
190+ | Intervention | Early start (day 100) | Late start (day 200) |
142191| ----| ----| ----|
143- | ** School Closure** | ![ image] ( https://hackmd.io/_uploads/H1IKxq_A1e .png ) | ![ image] ( https://hackmd.io/_uploads/rJt8ttdA1e .png ) |
144- | ** Mask Mandate** | ![ image] ( https://hackmd.io/_uploads/rkV2ttO0yx .png ) | ![ image] ( https://hackmd.io/_uploads/Bk8wKYOR1l .png ) |
145- | ** Vaccination** | ![ image] ( https://hackmd.io/_uploads/rycdKYOA1e .png ) | ![ image] ( https://hackmd.io/_uploads/B1ff-9_Ckl .png ) |
192+ | ** School Closure** | ![ image] ( https://hackmd.io/_uploads/HyxrKNWDee .png ) | ![ image] ( https://hackmd.io/_uploads/B18MFNWPll .png ) |
193+ | ** Mask Mandate** | ![ image] ( https://hackmd.io/_uploads/Hym4FEbDxl .png ) | ![ image] ( https://hackmd.io/_uploads/HknbYEbPlg .png ) |
194+ | ** Vaccination** | ![ image] ( https://hackmd.io/_uploads/r12Xt4-Dll .png ) | ![ image] ( https://hackmd.io/_uploads/Hy6xKN-vex .png ) |
146195
147196#### Interpretation
148197
@@ -157,7 +206,7 @@ Interpretation Helpers:
157206 effectiveness of vaccination can depend on various factors, including
158207 vaccine efficacy and timing relative to the outbreak.
159208
160- ## Activity 3: Combine interventions
209+ ## Activity 3: Combine interventions (Optional)
161210
162211Combine two intervention in the same simulation and compare the disease
163212trajectories of new infections against the baseline or only one
@@ -197,7 +246,9 @@ Interpretation Helpers:
197246- Vaccination can sustain a reduced epidemic peak compared with mask
198247 mandate alone.
199248
200- #### Code
249+ ## Code
250+
251+ ### Actiivty 1
201252
202253``` r
203254# nolint start
@@ -345,7 +396,6 @@ simulate_baseline %>%
345396 )
346397
347398epidemics :: epidemic_peak(data = simulate_baseline )
348- epidemics :: epidemic_size(data = simulate_baseline )
349399
350400
351401# Plot new infections ----------------------------------------------------
@@ -365,6 +415,8 @@ newinfections_bygroup %>%
365415# nolint end
366416```
367417
418+ ### Actiivty 2
419+
368420``` r
369421# nolint start
370422
@@ -376,13 +428,8 @@ room_number <- 1 #valid for all
376428# Group parameters -------------------------------------------------------
377429
378430# activity 2/3
379- # school_begin_early <- 100
380- school_begin_late <- 200
381- # mask_begin_early <- 100
382- mask_begin_late <- 200
383- vaccine_begin_early <- 100
384- # vaccine_begin_late <- 200
385-
431+ intervention_begin <- 200 # change
432+ intervention_duration <- 250 # change
386433
387434# Intervention 1 ---------------------------------------------------------
388435
@@ -395,8 +442,8 @@ rownames(socialcontact_matrix)
395442test_intervention <- epidemics :: intervention(
396443 name = " School closure" ,
397444 type = " contacts" ,
398- time_begin = school_begin_late ,
399- time_end = school_begin_late + 100 ,
445+ time_begin = intervention_begin ,
446+ time_end = intervention_begin + intervention_duration ,
400447 reduction = matrix (c(0.5 , 0.01 , 0.01 ))
401448)
402449
@@ -433,7 +480,7 @@ infections_intervention <- epidemics::new_infections(
433480
434481# Assign scenario names
435482infections_baseline $ scenario <- " Baseline"
436- infections_intervention $ scenario <- " School closure" # <COMPLETE>
483+ infections_intervention $ scenario <- " School closure"
437484
438485# Combine the data from both scenarios
439486infections_baseline_intervention <- bind_rows(infections_baseline , infections_intervention )
@@ -442,7 +489,7 @@ infections_baseline_intervention %>%
442489 ggplot(aes(x = time , y = new_infections , colour = scenario )) +
443490 geom_line() +
444491 geom_vline(
445- xintercept = c(simulate_intervention $ time_begin , simulate_intervention $ time_end ),
492+ xintercept = c(test_intervention $ time_begin , test_intervention $ time_end ),
446493 linetype = " dashed" ,
447494 linewidth = 0.2
448495 ) +
@@ -464,8 +511,8 @@ rownames(socialcontact_matrix)
464511test_intervention <- epidemics :: intervention(
465512 name = " mask mandate" ,
466513 type = " rate" ,
467- time_begin = mask_begin_late ,
468- time_end = mask_begin_late + 200 ,
514+ time_begin = intervention_begin ,
515+ time_end = intervention_begin + intervention_duration ,
469516 reduction = 0.163
470517)
471518
@@ -502,7 +549,7 @@ infections_intervention <- epidemics::new_infections(
502549
503550# Assign scenario names
504551infections_baseline $ scenario <- " Baseline"
505- infections_intervention $ scenario <- " Mask mandate" # <COMPLETE>
552+ infections_intervention $ scenario <- " Mask mandate"
506553
507554# Combine the data from both scenarios
508555infections_baseline_intervention <- bind_rows(infections_baseline , infections_intervention )
@@ -511,7 +558,7 @@ infections_baseline_intervention %>%
511558 ggplot(aes(x = time , y = new_infections , colour = scenario )) +
512559 geom_line() +
513560 geom_vline(
514- xintercept = c(simulate_intervention $ time_begin , simulate_intervention $ time_end ),
561+ xintercept = c(test_intervention $ time_begin , test_intervention $ time_end ),
515562 linetype = " dashed" ,
516563 linewidth = 0.2
517564 ) +
@@ -531,8 +578,8 @@ rownames(socialcontact_matrix)
531578
532579test_intervention <- epidemics :: vaccination(
533580 name = " vaccinate all" ,
534- time_begin = matrix (vaccine_begin_early , nrow(socialcontact_matrix )),
535- time_end = matrix (vaccine_begin_early + 150 , nrow(socialcontact_matrix )),
581+ time_begin = matrix (intervention_begin , nrow(socialcontact_matrix )),
582+ time_end = matrix (intervention_begin + intervention_duration , nrow(socialcontact_matrix )),
536583 nu = matrix (c(0.001 , 0.001 , 0.001 ))
537584)
538585
@@ -569,7 +616,7 @@ infections_intervention <- epidemics::new_infections(
569616
570617# Assign scenario names
571618infections_baseline $ scenario <- " Baseline"
572- infections_intervention $ scenario <- " Mask mandate " # <COMPLETE>
619+ infections_intervention $ scenario <- " Vaccination "
573620
574621# Combine the data from both scenarios
575622infections_baseline_intervention <- bind_rows(infections_baseline , infections_intervention )
@@ -578,7 +625,7 @@ infections_baseline_intervention %>%
578625 ggplot(aes(x = time , y = new_infections , colour = scenario )) +
579626 geom_line() +
580627 geom_vline(
581- xintercept = c(simulate_intervention $ time_begin , simulate_intervention $ time_end ),
628+ xintercept = c(test_intervention $ time_begin , test_intervention $ time_end ),
582629 linetype = " dashed" ,
583630 linewidth = 0.2
584631 ) +
@@ -590,6 +637,8 @@ intervention_vaccinate <- test_intervention
590637# nolint end
591638```
592639
640+ ### Actiivty 3
641+
593642``` r
594643# nolint start
595644
@@ -629,7 +678,7 @@ infections_twointerventions <- epidemics::new_infections(
629678
630679# Assign scenario names
631680infections_baseline $ scenario <- " Baseline"
632- infections_twointerventions $ scenario <- " Mask mandate + School closure" # <COMPLETE>
681+ infections_twointerventions $ scenario <- " Mask mandate + School closure"
633682
634683# Combine the data from both scenarios
635684infections_baseline_twointerventions <- bind_rows(
@@ -647,7 +696,7 @@ infections_baseline_twointerventions %>%
647696
648697compare_interventions <- bind_rows(
649698 infections_baseline ,
650- infections_baseline_intervention ,
699+ infections_baseline_intervention , # varies depending on last one runned
651700 infections_baseline_twointerventions
652701)
653702
0 commit comments