Objective To estimate the reproductive 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 - Estimate Ro using contact rate, transmission probability and infectious period

contact_rate = 10
transmission_probability = 0.06
infectious_period = 4
R0 = contact_rate * transmission_probability * infectious_period
c ("R0 = ", R0)
## [1] "R0 = " "2.4"
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 - Estimate Ro using attack rate

attack_rate = 0.3
est.R0.AR (AR = attack_rate)
## Reproduction number estimate using  Attack Rate  method.
## R :  1.188916
attack_rate = 0.4
est.R0.AR (AR = attack_rate)
## Reproduction number estimate using  Attack Rate  method.
## R :  1.277064
attack_rate = 0.55
est.R0.AR (AR = attack_rate)
## Reproduction number estimate using  Attack Rate  method.
## R :  1.451832
attack_rate = 0.8
est.R0.AR (AR = attack_rate)
## Reproduction number estimate using  Attack Rate  method.
## R :  2.011797

Method 3 - Estimate Ro using average of infection (and life expectancy)

average_age = 10
life_expectancy = 65
R0 = life_expectancy / average_age
c ("R0 = ", R0)
## [1] "R0 = " "6.5"
average_age = 5
life_expectancy = 70
R0 = life_expectancy / average_age
c ("R0 = ", R0)
## [1] "R0 = " "14"

Method 4 - Estimate Ro using exponential growth rate

Estimate Ro using exponential growth rate for the 1918 influenza pandemic in Germany (Nishiura).

data (Germany.1918)

# plot epidemic
plot (Germany.1918, xlab = "Time")

# plot log of epidemic curve
plot (log (Germany.1918), xlab='Time' )

# generation timem distribution
mGT = generation.time ("gamma", c(3, 1.5))

# estimate R0 using exponential growth method using start date of first day and end date of 30 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 - Estimate R0 using maximum likelihood method

# estimate R0 using maximum likelihood method
mGT = generation.time("gamma", c(2.45, 1.38))
est.R0.ML (Germany.1918, mGT)
## Reproduction number estimate using  Maximum Likelihood  method.
## R :  1.205348[ 1.152364 , 1.259946 ]