44# Activity 3
55
66# step: fill in your room number
7- room_number <- 2
7+ room_number <- 1
88
99# Combine interventions --------------------------------------------------
1010
@@ -15,9 +15,10 @@ simulate_twointerventions <- epidemics::model_default(
1515 recovery_rate = recovery_rate ,
1616 # Intervention
1717 intervention = list (
18- transmission_rate = intervention_mask_mandate ,
18+ # transmission_rate = intervention_mask_mandate# ,
1919 contacts = intervention_schoolclosure
2020 ),
21+ vaccination = intervention_vaccinate ,
2122 time_end = 1000 ,
2223 increment = 1.0
2324)
@@ -29,24 +30,30 @@ epidemics::epidemic_peak(simulate_twointerventions)
2930
3031infections_baseline <- epidemics :: new_infections(
3132 data = simulate_baseline ,
32- by_group = FALSE
33+ compartments_from_susceptible = " vaccinated" , # if vaccination
34+ by_group = FALSE # if TRUE, then age-stratified output
3335)
3436
3537infections_twointerventions <- epidemics :: new_infections(
3638 data = simulate_twointerventions ,
37- by_group = FALSE
39+ compartments_from_susceptible = " vaccinated" , # if vaccination
40+ by_group = FALSE # if TRUE, then age-stratified output
3841)
3942
4043# Assign scenario names
4144infections_baseline $ scenario <- " Baseline"
42- infections_twointerventions $ scenario <- " Mask mandate + School closure"
45+ infections_twointerventions $ scenario <- " School closure + Vaccination"
46+ # infections_twointerventions$scenario <- "Mask mandate + School closure"
47+ # infections_twointerventions$scenario <- "Mask mandate + Vaccination"
4348
4449# Compare interventions --------------------------------------------------
4550
4651# Combine the data from all scenarios
4752compare_interventions <- dplyr :: bind_rows(
4853 infections_baseline ,
49- infections_intervention , # varies depending on last one runned
54+ infections_schoolclosure ,
55+ # infections_mask_mandate,
56+ # infections_vaccinate,
5057 infections_twointerventions
5158)
5259
0 commit comments