Skip to content

Commit b5acd1d

Browse files
committed
add steps to third
1 parent ac0a29a commit b5acd1d

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

instructors/data/04-practical-activity-3.R

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ room_number <- #<COMPLETE> replace with 1/2/3/4
88

99
# Combine interventions --------------------------------------------------
1010

11+
#step: complete the intervention or vaccination arguments
1112
simulate_twointerventions <- epidemics::model_default(
1213
population = population_object,
1314
transmission_rate = transmission_rate,
@@ -19,19 +20,28 @@ simulate_twointerventions <- epidemics::model_default(
1920
increment = 1.0
2021
)
2122

23+
# step: paste table output in report
2224
epidemics::epidemic_peak(simulate_twointerventions)
2325

2426
# Visualize effect --------------------------------------------------------
2527
# Plot new infections
2628

29+
# step:
30+
# add intervention name
31+
# if your intervention is vaccination, then
32+
# activate the argument compartments_from_susceptible
33+
# run and paste plot output in report
34+
2735
infections_baseline <- epidemics::new_infections(
2836
data = simulate_baseline,
29-
by_group = FALSE
37+
# compartments_from_susceptible = "vaccinated", # if vaccination
38+
by_group = FALSE # if TRUE, then age-stratified output
3039
)
3140

3241
infections_twointerventions <- epidemics::new_infections(
3342
data = simulate_twointerventions,
34-
by_group = FALSE
43+
# compartments_from_susceptible = "vaccinated", # if vaccination
44+
by_group = FALSE # if TRUE, then age-stratified output
3545
)
3646

3747
# Assign scenario names

instructors/fig/04-practical-instructor-3.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ room_number <- 1
88

99
# Combine interventions --------------------------------------------------
1010

11+
#step: complete the intervention or vaccination arguments
1112
simulate_twointerventions <- epidemics::model_default(
1213
population = population_object,
1314
transmission_rate = transmission_rate,
@@ -23,11 +24,18 @@ simulate_twointerventions <- epidemics::model_default(
2324
increment = 1.0
2425
)
2526

27+
# step: paste table output in report
2628
epidemics::epidemic_peak(simulate_twointerventions)
2729

2830
# Visualize effect --------------------------------------------------------
2931
# Plot new infections
3032

33+
# step:
34+
# add intervention name
35+
# if your intervention is vaccination, then
36+
# activate the argument compartments_from_susceptible
37+
# run and paste plot output in report
38+
3139
infections_baseline <- epidemics::new_infections(
3240
data = simulate_baseline,
3341
compartments_from_susceptible = "vaccinated", # if vaccination

0 commit comments

Comments
 (0)