Learn R Programming

R0 (version 1.2-4)

sa.GT: Sensitivity analysis of reproduction ratio with varying GT distribution

Description

Sensitivity analysis of reproduction ratio with varying GT distribution.

Usage

sa.GT(incid, GT.type, GT.mean.range, GT.sd.range, begin = NULL, 
    end = NULL, est.method, t = NULL, date.first.obs = NULL, 
    time.step = 1, ...)

Arguments

incid
incident cases
GT.type
Type of distribution for GT (see GT.R for details)
GT.mean.range
mean used for all GT distributions throughout the simulation
GT.sd.range
Range of standard deviation used for GT distributions. Must be provided as a vector.
begin
begin date of the estimation of epidemic
end
end date of estimation of the epidemic
est.method
Estimation method used for sensitivity analysis. Requires a method computing a proper R0 value (and not an instantaneous R(t))
t
Dates vector to be passed to estimation function
date.first.obs
Optional date of first observation, if t not specified
time.step
Optional. If date of first observation is specified, number of day between each incidence observation
...
parameters passed to inner functions

Value

  • A data frame s.a with following components :
  • $GT.typeDistribution law for GT.
  • $GT.meanRange of means used for tested GTs.
  • $GT.sdRange of standard deviations used for tested GTs.
  • $RComputed value for Reproduction Number given GT.type, GT.mean and GT.sd.
  • $conf.int[1]The lower limit of 95% CI for R.
  • $conf.int[2]The upper limit of 95% CI for R.

Details

By using different Generation Time (GT) distribution, different estimates of reproduction ratio can be analyzed.

Examples

Run this code
#Loading package
library(R0)

## Data is taken from the paper by Nishiura for key transmission parameters of an institutional
## outbreak during 1918 influenza pandemic in Germany)
## Here we will test GT with means of 1 to 5, each time with SD constant (1)
## GT and SD can be either fixed value or vectors of values
## Actual value in simulations may differ, as they are adapted according to the distribution type
data(Germany.1918)
tmp<-sa.GT(incid=Germany.1918, GT.type="gamma", GT.mean=seq(1,5,1), GT.sd.range=1, begin=1, end=27,
           est.method="EG")

## Results are stored in a matrix, each line dedicated to a (mean,sd) couple
plot(x=tmp[,"GT.Mean"], xlab="mean GT (days)", y=tmp[,"R"], ylim=c(1.2, 2.1), ylab="R0 (95% CI)",
     type="p", pch=19, col="black", main="Sensitivity of R0 to mean GT")
arrows(x0=as.numeric(tmp[,"GT.Mean"]), y0=as.numeric(tmp[,"CI[lower]"]), 
       y1=as.numeric(tmp[,"CI[upper]"]), angle=90, code=3, col="black", length=0.05)

## One could tweak this example to change sorting of values (per mean, or per standard deviation)
## eg: 'x=tmp[,c('GT.Mean')]' could become 'x=tmp[,c('GT.SD')]'

Run the code above in your browser using DataLab