Skip to contents

The summary method for class "epidata" gives an overview of the epidemic. Its print method shows the type of the epidemic, the time range, the total number of individuals, the initially and never infected individuals and the size of the epidemic. An excerpt of the returned counters data frame is also printed (see the Value section below).

Usage

# S3 method for class 'epidata'
summary(object, ...)

# S3 method for class 'summary.epidata'
print(x, ...)

Arguments

object

an object inheriting from class "epidata".

x

an object inheriting from class "summary.epidata", i.e. an object returned by the function summary.epidata.

...

unused (argument of the generic).

Value

A list with the following components:

type

character string. Compartmental type of the epidemic, i.e. one of "SIR", "SI", "SIS" or "SIRS".

size

integer. Size of the epidemic, i.e. the number of initially susceptible individuals, which became infected during the course of the epidemic.

initiallyInfected

factor (with the same levels as the id column in the "epidata" object). Set of initially infected individuals.

neverInfected

factor (with the same levels as the id column in the "epidata" object). Set of never infected individuals, i.e. individuals, which were neither initially infected nor infected during the course of the epidemic.

coordinates

numeric matrix of individual coordinates with as many rows as there are individuals and one column for each spatial dimension. The row names of the matrix are the ids of the individuals.

byID

data frame with time points of infection and optionally removal and re-susceptibility (depending on the type of the epidemic) ordered by id. If an event was not observed, the corresponding entry is missing.

counters

data frame containing all events (S, I and R) ordered by time. The columns are time, type (of event), corresponding id and the three counters nSusceptible, nInfectious and nRemoved. The first row additionally shows the counters at the beginning of the epidemic, where the type and id column contain missing values.

Author

Sebastian Meyer

See also

as.epidata for generating objects of class "epidata".

Examples

data("hagelloch")
s <- summary(hagelloch)
s          # uses the print method for summary.epidata
names(s)   # components of the list 's'

# positions of the individuals
plot(s$coordinates)

# events by id
head(s$byID)