shift_matrix: Extract the shift matrix from a 'SimInf_model' object

Description Usage Arguments Value Examples

View source: R/SimInf_events.R

Description

Utility function to extract the shift matrix events@N from a SimInf_model object, see SimInf_events

Usage

1
shift_matrix(model)

Arguments

model

The model to extract the shift matrix events@N from.

Value

A mtrix.

Examples

1
2
3
4
5
6
## Create an SIR model
model <- SIR(u0 = data.frame(S = 99, I = 1, R = 0),
             tspan = 1:5, beta = 0.16, gamma = 0.077)

## Extract the shift matrix from the model
shift_matrix(model)

SimInf documentation built on Dec. 6, 2020, 5:07 p.m.