To estimate reproduction number (Ro) using different methods.
# Remove all objects from workspace.
remove (list = objects() )
# Load add-on packages - R0 - contains differnt methods to estimate reproduction number.
library (R0)
## Loading required package: MASS
Method 1 - Contact rate, transmission probability, infectious period
Estimate Ro using contact rate, transmission probability and infectious period.
1a
contact_rate = 10
transmission_probability = 0.06
infectious_period = 4
R0 = contact_rate * transmission_probability * infectious_period
c ("R0 = ", R0)
## [1] "R0 = " "2.4"
1b
contact_rate = 8
transmission_probability = 0.15
infectious_period = 6
R0 = contact_rate * transmission_probability * infectious_period
c ("R0 = ", R0)
## [1] "R0 = " "7.2"
Method 2 - Attack rate
Estimate Ro using attack rate.
attack_rate = 0.3
R0 = (- log (1 - attack_rate)) / attack_rate
c ("R0 = ", R0)
## [1] "R0 = " "1.18891647979577"
attack_rate = 0.4
R0 = (- log (1 - attack_rate)) / attack_rate
c ("R0 = ", R0)
## [1] "R0 = " "1.27706405941498"
attack_rate = 0.55
R0 = (- log (1 - attack_rate)) / attack_rate
c ("R0 = ", R0)
## [1] "R0 = " "1.4518321749414"
attack_rate = 0.8
R0 = (- log (1 - attack_rate)) / attack_rate
c ("R0 = ", R0)
## [1] "R0 = " "2.01179739054263"
Method 3 - Average age of infection (and life expectancy)
3a
average_age = 10
life_expectancy = 65
R0 = life_expectancy / average_age
c ("R0 = ", R0)
## [1] "R0 = " "6.5"
3b
average_age = 5
life_expectancy = 70
R0 = life_expectancy / average_age
c ("R0 = ", R0)
## [1] "R0 = " "14"
Method 4 - Exponential growth rate
Estimate Ro using exponential growth rate for the 1918 influenza pandemic in Germany, using the data from the paper by Nishiura for key transmission parameters of an institutional outbreak during the 1918 influenza pandemic in Germany.
data (Germany.1918)
# plot epidemic
plot (Germany.1918, xlab = "Time")
# plot log of epidemic curve
plot (log (Germany.1918), xlab='Time')
# generatiom time distribution
mGT = generation.time ("gamma", c(3, 1.5))
# estimate R0 using expoential growth method using start date of first day and end date of 20 days.
est.R0.EG (Germany.1918, mGT, begin=1, end=30)
## Waiting for profiling to be done...
## Reproduction number estimate using Exponential Growth method.
## R : 1.43944[ 1.416545 , 1.462916 ]
Method 5 - Maximum likelihood
# estimate R0 using maximum likelihood method
mGT = generation.time("gamma", c(3, 1.5))
est.R0.ML (Germany.1918, mGT)
## Reproduction number estimate using Maximum Likelihood method.
## R : 1.256298[ 1.201063 , 1.313194 ]
There were 5 different methods utilized to estimate R0. Using method 1, contact rate, transmission probability and infectious period were multiplied together to estimate R0. In method 2, we estimate R0 by using (- log (1 - attack_rate)) / attack_rate with a known attack rate. Life expectancy is divided by average age to estimate R0 in method 3. Mehtod 4 uses an exponential growth rate over time to estimate R0. Method 5 utilizes generation time and maximum likelihood to produce an R0 value.