estimate.R | R Documentation |

Estimate `R_{0}`

or `R(t)`

for an incidence dataset using
the methods implemented in the `R0`

package.

```
estimate.R(
epid = NULL,
GT = NULL,
t = NULL,
begin = NULL,
end = NULL,
date.first.obs = NULL,
time.step = 1,
AR = NULL,
pop.size = NULL,
S0 = 1,
methods = NULL,
checked = TRUE,
...
)
```

`epid` |
Object containing epidemic curve data. |

`GT` |
Generation time distribution from |

`t` |
Vector of dates at which incidence was observed. |

`begin` |
Begin date for estimation. Can be an integer or a date (YYYY-mm-dd or YYYY/mm/dd). |

`end` |
End date for estimation. Can be an integer or a date (YYYY-mm-dd or YYYY/mm/dd). |

`date.first.obs` |
Optional date of first observation, if |

`time.step` |
Optional. If date of first observation is specified, number of day between each incidence observation. |

`AR` |
Attack rate as a percentage from total population. |

`pop.size` |
Population size in which the incident cases were observed. See more details in |

`S0` |
Initial proportion of the population considered susceptible. |

`methods` |
Vector of methods to be used for R/R0/Rt estimation. Must be provided as |

`checked` |
Internal flag used to check whether integrity checks were ran or not. |

`...` |
Parameters passed to inner functions. |

Currently, supported methods are Exponential Growth (EG), Maximum Likelihood (ML), Attack Rate (AR), Time-Dependant (TD), and Sequential Bayesian (SB). The corresponding references from the literature are available below.

This function acts as a front-end and will prepare relevant inputs to pass them
to internal estimation routines. In particular, all inputs will undergo
validation through `integrity.checks()`

and the `checked`

flag (defaulting as
`TRUE`

here) will be passed to internal estimation routines.
Any warning raised by `integrity.checks()`

should warrant careful thinking
and investigation.

A list with components:

`estimates` |
List containing all results from called methods. |

`epid` |
Epidemic curve. |

`GT` |
Generation Time distribution function. |

`t` |
Date vector. |

`begin` |
Begin date for estimation. |

`end` |
End date for estimation. |

Pierre-Yves Boelle, Thomas Obadia

`est.R0.AR()`

: Dietz, K. "The Estimation of the Basic Reproduction Number for Infectious Diseases." Statistical Methods in Medical Research 2, no. 1 (March 1, 1993): 23-41.

`est.R0.EG()`

: Wallinga, J., and M. Lipsitch. "How Generation Intervals Shape the Relationship Between Growth Rates and Reproductive Numbers." Proceedings of the Royal Society B: Biological Sciences 274, no. 1609 (2007): 599.

`est.R0.ML()`

: White, L.F., J. Wallinga, L. Finelli, C. Reed, S. Riley, M. Lipsitch, and M. Pagano. "Estimation of the Reproductive Number and the Serial Interval in Early Phase of the 2009 Influenza A/H1N1 Pandemic in the USA." Influenza and Other Respiratory Viruses 3, no. 6 (2009): 267-276.

`est.R0.SB()`

: Bettencourt, L.M.A., and R.M. Ribeiro. "Real Time Bayesian Estimation of the Epidemic Potential of Emerging Infectious Diseases." PLoS One 3, no. 5 (2008): e2185.

`est.R0.TD()`

: Wallinga, J., and P. Teunis. "Different Epidemic Curves for Severe Acute Respiratory Syndrome Reveal Similar Impacts of Control Measures." American Journal of Epidemiology 160, no. 6 (2004): 509; Cauchemez S., and Valleron AJ. "Estimating in Real Time the Efficacy of Measures to Control Emerging Communicable Diseases" American Journal of Epidemiology 164, no. 6 (2006): 591.

```
#Loading package
library(R0)
## Outbreak during 1918 influenza pandemic in Germany)
data(Germany.1918)
mGT <- generation.time("gamma", c(3, 1.5))
estR0 <- estimate.R(Germany.1918, mGT, begin=1, end=27, methods=c("EG", "ML", "TD", "AR", "SB"),
pop.size=100000, nsim=100)
attributes(estR0)
## $names
## [1] "epid" "GT" "begin" "end" "estimates"
##
## $class
## [1] "R0.sR"
## Estimates results are stored in the $estimates object
estR0
## Reproduction number estimate using Exponential Growth method.
## R : 1.525895[ 1.494984 , 1.557779 ]
##
## Reproduction number estimate using Maximum Likelihood method.
## R : 1.383996[ 1.309545 , 1.461203 ]
##
## Reproduction number estimate using Attack Rate method.
## R : 1.047392[ 1.046394 , 1.048393 ]
##
## Reproduction number estimate using Time-Dependent method.
## 2.322239 2.272013 1.998474 1.843703 2.019297 1.867488 1.644993 1.553265 1.553317 1.601317 ...
##
## Reproduction number estimate using Sequential Bayesian method.
## 0 0 2.22 0.66 1.2 1.84 1.43 1.63 1.34 1.52 ...
## If no date vector nor date of first observation are provided, results are the same
## except time values in $t are replaced by index
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.