Learn R Programming

SimInf (version 11.1.0)

summary,SimInf_events-method: Detailed summary of a SimInf_events object

Description

Display a summary of the scheduled events in a SimInf_events object. The output includes the total number of events and summary statistics (count, minimum, maximum, and average number of individuals affected by each event).

Usage

# S4 method for SimInf_events
summary(object, ...)

Value

NULL, returned invisibly.

Arguments

object

The SimInf_events object to summarize.

...

Additional arguments affecting the summary produced. Currently ignored.

Details

Four event types are reported:

  • Exit: Events where individuals are removed from a node (e.g., deaths).

  • Enter: Events where individuals are added to a node (e.g., births).

  • Internal transfer: Events moving individuals between compartments within a node (e.g., vaccination, ageing).

  • External transfer: Events moving individuals between different nodes (e.g., livestock movements).

See Also

SimInf_events for creating event objects, SimInf_events for the class definition, SimInf_model for how events are attached to a model, events for extracting events from a model.

Examples

Run this code
## Create an 'SIR' model with 1600 cattle herds (nodes) and
## scheduled events for the population of nodes with births,
## deaths and between-node movements of individuals. Define
## 'tspan' to record the state of the system at daily time
## points over 4*365 days.
model <- SIR(
  u0     = u0_SIR(),
  tspan  = 1:(4 * 365),
  events = events_SIR(),
  beta   = 0.16,
  gamma  = 0.077
)

## Detailed summary of the events
summary(events(model))

Run the code above in your browser using DataLab