Description Usage Arguments Value See Also Examples
This function allows the user to generate objects of class "epidata"
. The output of this function provides information required to be used in the other functions in the package.
1 |
type |
Type of compartment framework, with the choice of "SI" for Susceptible-Infectious diseases and "SIR" for Susceptible-Infectious-Removed. |
n |
Population size |
x |
X coordinates of individuals. |
y |
Y coordinates of individuals. |
inftime |
Times at which individuals are infected to initialize epidemic simulation. |
infperiod |
Length of infectious period for each individual. |
contact |
A contact network matrix or an array of contact network matrices. |
An object of class epidata
is returned containing the following:
Type of compartment framework, with the choice of "SI" for Susceptible-Infectious diseases and "SIR" for Susceptible-Infectious-Removed.
The XY-coordinates of individuals if distance-based ILM is used, otherwise is NULL.
Contact network matrix if network-based ILM is used, otherwise is NULL.
The infection times of individuals.
The removal times of individuals when type
= “SIR”.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # generate 100 X-Y coordinates for a distance-based ILM
x <- runif(100, 0, 10)
y <- runif(100, 0, 10)
# suppose we know the infection times for a spatial SI model based on above X-Y coordinates
inftime <- rpois(100, 8)
# Now we can convert above information to an epidata object with
out <- as.epidata(type = "SI", n = 100, x = x, y = y, inftime = inftime )
out
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.