]> nmode's Git Repositories - Rnaught/blob - man/id.Rd
Add HTML and CSS extensions to .gitattributes
[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{Incidence Decay (ID)}
6 \usage{
7 id(cases, mu)
8 }
9 \arguments{
10 \item{cases}{Vector of case counts. The vector must be non-empty and only
11 contain positive integers.}
12
13 \item{mu}{Mean of the serial distribution. This must be a positive number.
14 The value should match the case counts in time units. For example, if case
15 counts are weekly and the serial distribution has a mean of seven days,
16 then \code{mu} should be set to \code{1}. If case counts are daily and the serial
17 distribution has a mean of seven days, then \code{mu} should be set to \code{7}.}
18 }
19 \value{
20 An estimate of the basic reproduction number (R0).
21 }
22 \description{
23 This function implements a least squares estimation method of R0 due to
24 Fisman et al. (PloS One, 2013). See details for implementation notes.
25 }
26 \details{
27 The method is based on a straightforward incidence decay model. The estimate
28 of R0 is the value which minimizes the sum of squares between observed case
29 counts and cases counts expected under the model.
30
31 This method is based on an approximation of the SIR model, which is most
32 valid at the beginning of an epidemic. The method assumes that the mean of
33 the serial distribution (sometimes called the serial interval) is known. The
34 final estimate can be quite sensitive to this value, so sensitivity testing
35 is strongly recommended. Users should be careful about units of time (e.g.,
36 are counts observed daily or weekly?) when implementing.
37 }
38 \examples{
39 # Weekly data.
40 cases <- c(1, 4, 10, 5, 3, 4, 19, 3, 3, 14, 4)
41
42 # Obtain R0 when the serial distribution has a mean of five days.
43 id(cases, mu = 5 / 7)
44
45 # Obtain R0 when the serial distribution has a mean of three days.
46 id(cases, mu = 3 / 7)
47 }
48 \references{
49 \href{https://doi.org/10.1371/journal.pone.0083622}{Fisman et al. (PloS One, 2013)}
50 }
51 \seealso{
52 \code{\link[=idea]{idea()}} for a similar method.
53 }