forked from epiforecasts/ringbp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutbreak_model.Rd
115 lines (100 loc) · 3.73 KB
/
outbreak_model.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/outbreak_model.R
\name{outbreak_model}
\alias{outbreak_model}
\title{Run a single instance of the branching process model}
\usage{
outbreak_model(
num.initial.cases = NULL,
prop.ascertain = NULL,
cap_max_days = NULL,
cap_cases = NULL,
r0isolated = NULL,
r0community = NULL,
r0subclin = NULL,
disp.iso = NULL,
disp.com = NULL,
disp.subclin = NULL,
k,
delay_shape = NULL,
delay_scale = NULL,
prop.asym = NULL,
quarantine = NULL
)
}
\arguments{
\item{num.initial.cases}{a nonnegative \code{integer} scalar: number of initial
or starting cases which are all assumed to be missed.}
\item{prop.ascertain}{a nonnegative \code{numeric} scalar: proportion of
infectious contacts ascertained by contact tracing (must be 0<=x<=1)}
\item{cap_max_days}{a positive \code{integer} scalar: stop the simulation when
this many days is reached.}
\item{cap_cases}{a positive \code{integer} scalar: number of cumulative cases at
which the branching process (simulation) was terminated}
\item{r0isolated}{a positive \code{numeric} scalar: reproduction number for
isolated cases (must be >0)}
\item{r0community}{a positive \code{numeric} scalar: reproduction number for
non-isolated cases (must be >0)}
\item{r0subclin}{a positive \code{numeric} scalar: reproduction number for
sub-clinical non-isolated cases (must be >0)}
\item{disp.iso}{a positive \code{numeric} scalar: dispersion parameter for
isolated cases (must be >0)}
\item{disp.com}{a positive \code{numeric} scalar: dispersion parameter for
non-isolated cases (must be >0)}
\item{disp.subclin}{a positive \code{numeric} scalar: dispersion parameter for
sub-clincial non-isolated cases (must be >0)}
\item{k}{a \code{numeric} scalar: skew parameter for sampling the serial
interval from the incubation period}
\item{delay_shape}{a positive \code{numeric} scalar: shape parameter of delay
distribution}
\item{delay_scale}{a positive \code{numeric} scalar: scale parameter of delay
distribution}
\item{prop.asym}{a nonnegative \code{numeric} scalar: proportion of cases that
are completely asymptomatic (sublinical) (between 0 and 1)}
\item{quarantine}{a \code{logical} scalar: whether quarantine is in effect, if
\code{TRUE} then traced contacts are isolated before symptom onset}
}
\value{
\code{data.table} of cases by week, cumulative cases, and the effective
reproduction number of the outbreak. \code{data.table} columns are:
\itemize{
\item \verb{$week}: \code{numeric}
\item \verb{$weekly_cases}: \code{numeric}
\item \verb{$cumulative}: \code{numeric}
\item \verb{$effective_r0}: \code{numeric}
\item \verb{$cases_per_gen}: \code{list}
}
}
\description{
Run a single instance of the branching process model
}
\examples{
\dontrun{
incfn <- dist_setup(dist_shape = 2.322737,dist_scale = 6.492272)
# delay distribution sampling function
delayfn <- dist_setup(2, 4)
# generate initial cases
case_data <- outbreak_setup(num.initial.cases = 5,
incfn=incfn,
delayfn = delayfn,
k=1.95,
prop.asym=0)
# generate next generation of cases
case_data <- outbreak_step(case_data = case_data,
disp.iso = 1,
disp.com = 0.16,
disp.subclin = 0.16,
r0isolated = 0,
r0community = 2.5,
r0subclin = 1.25,
prop.asym = 0,
incfn = incfn,
delayfn = delayfn,
prop.ascertain = 0,
k = 1.95,
quarantine = FALSE)
}
}
\author{
Joel Hellewell
}