33# Practical 2
44# Activity 2
55
6+ # step: fill in your room number
67room_number <- # <COMPLETE> replace with 1/2/3/4
78
89# Load packages -----------------------------------------------------------
@@ -12,6 +13,7 @@ library(tidyverse)
1213
1314
1415# Read reported cases -----------------------------------------------------
16+ # step: Paste the URL links as a string to read input data.
1517disease_dat <- readr :: read_rds(
1618 # <COMPLETE>
1719)
@@ -20,6 +22,7 @@ disease_dat
2022
2123
2224# Create incidence object ------------------------------------------------
25+ # step: Fill in the argument to plot an incidence curve.
2326disease_incidence <- disease_dat %> %
2427 incidence2 :: incidence(
2528 # <COMPLETE>
@@ -30,10 +33,17 @@ plot(disease_incidence)
3033
3134# Confirm {cfr} data input format ----------------------------------------
3235
33- # Is the input data already adapted to {cfr} input?
36+ # step: Check if the column names in incidence data
37+ # match the {cfr} requirement of column names:
38+ # date, cases, deaths
39+
40+ disease_dat
41+
42+ # Is the input data already adapted to {cfr} input?
43+ # If yes, use:
3444disease_adapted <- disease_dat
3545# OR
36- # Does the input data need to be adapted to {cfr}?
46+ # If not, use cfr::prepare_data() to adapted it:
3747disease_adapted <- disease_incidence %> %
3848 cfr :: prepare_data(
3949 # <COMPLETE>
@@ -42,12 +52,14 @@ disease_adapted <- disease_incidence %>%
4252disease_adapted
4353
4454# Access delay distribution -----------------------------------------------
55+ # step: Access to the probability distribution for the delay from case onset to death.
4556
46- # What delay you need to use to adjust the CFR?
57+ # What delay you need to use to adjust the CFR? (based on the disease)
4758disease_delay <- epiparameter :: # <COMPLETE>
4859
4960
5061# Estimate naive and adjusted CFR ----------------------------------------
62+ # step: Estimate the naive and delay-adjusted CFR.
5163
5264# Estimate static CFR
5365disease_adapted %> %
@@ -59,4 +71,6 @@ disease_adapted %>%
5971 delay_density = # <COMPLETE>
6072 )
6173
74+ # step: Paste both outputs. Reply to questions.
75+
6276# nolint end
0 commit comments