]> nmode's Git Repositories - Rnaught/blob - man/ID.Rd
1d32c50b67dcefa7a295cbf2d9ac394856963eaf
[Rnaught] / man / ID.Rd
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/ID.R
3 \name{ID}
4 \alias{ID}
5 \title{ID method}
6 \usage{
7 ID(NT, mu)
8 }
9 \arguments{
10 \item{NT}{Vector of case counts.}
11
12 \item{mu}{Mean of the serial distribution. This needs to match case counts
13 in time units. For example, if case counts are weekly and the
14 serial distribution has a mean of seven days, then \code{mu} should
15 be set to one. If case counts are daily and the serial distribution
16 has a mean of seven days, then \code{mu} should be set to seven.}
17 }
18 \value{
19 \code{ID} returns a single value, the estimate of R0.
20 }
21 \description{
22 This function implements a least squares estimation method of R0 due to
23 Fisman et al. (PloS One, 2013). See details for implementation notes.
24 }
25 \details{
26 The method is based on a straightforward incidence decay model. The estimate
27 of R0 is the value which minimizes the sum of squares between observed case
28 counts and cases counts 'expected' under the model.
29
30 This method is based on an approximation of the SIR model, which is most
31 valid at the beginning of an epidemic. The method assumes that the mean of
32 the serial distribution (sometimes called the serial interval) is known. The
33 final estimate can be quite sensitive to this value, so sensitivity testing
34 is strongly recommended. Users should be careful about units of time (e.g.,
35 are counts observed daily or weekly?) when implementing.
36 }
37 \examples{
38 # Weekly data:
39 NT <- c(1, 4, 10, 5, 3, 4, 19, 3, 3, 14, 4)
40
41 # Obtain R0 when the serial distribution has a mean of five days.
42 ID(NT, mu = 5 / 7)
43
44 # Obtain R0 when the serial distribution has a mean of three days.
45 ID(NT, mu = 3 / 7)
46
47 }