View source: R/SEIR.simulator.R
summary.epidemic | R Documentation |
Prints a summary of an epidemic simulated by the
SEIR.simulator
simulation routine.
## S3 method for class 'epidemic'
summary(object, ...)
object |
an object of class epidemic, produced from the |
... |
other arguments to be passed to the summary routine. |
Prints a summary of the simulated epidemic, including the number of individuals infected over the course of the epidemic, the number remaining susceptible throughout the epidemic, the total size of the population, and length of the epidemic.
Strictly invoked for side effect.
Chris Groendyke cgroendyke@gmail.com, David Welch david.welch@auckland.ac.nz
SEIR.simulator
for simulating an epidemic, and
plot.epidemic
for plotting the simulated epidemic.
# Simulate an epidemic through a network of 30
set.seed(3)
N <- 30
# Build dyadic covariate matrix (X)
# Have a single covariate for overall edge density; this is the Erdos-Renyi model
nodecov <- matrix(1:N, nrow = N)
dcm <- BuildX(nodecov)
# Simulate network and then simulate epidemic over network
examplenet <- SimulateDyadicLinearERGM(N, dyadiccovmat = dcm, eta = -1.8)
exampleepidemic <- SEIR.simulator(examplenet, N = 30,
beta = 0.3, ki = 2, thetai = 5, latencydist = "gamma")
summary(exampleepidemic)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.