seir_equations: Differential equations for the SEIR model

Description Usage Arguments Details Value

View source: R/sim.R

Description

Computes the derivatives of the susceptible (S), exposed (E), infected (I), symptomatic (Is), and recovered (R) populations. This version of the model omits the population birth and death rates.

Usage

1

Arguments

t

Simulation time value

variables

Vector of current variable values (see details)

parameters

List or vector of parameter values (see details)

Details

The variables for this model are S, E, I, Is, and R, the susceptible, infected asymptomatic, infected symptomatic, and recovered populations. They should be passed as a named vector, in that order. (The order is important because the ODE solver ignores names.)

The parameters for the model are:

alpha

Progression rate parameter (i.e., the rate at which people move from exposed to infected)

beta

Infection rate parameter: relative rate at which infected people infect susceptible people.

gamma

Recovery rate parameter: relative rate at which infected people recover (whether symptomatic or not)

epsilon

Symptom rate parameter: relative rate at which asymptomatic people develop symptoms.

These should be passed in as a named vector; the order doesn't matter. Also, note that previous versions absorbed the 1/N factor into beta, but this one does not.

Optionally, instead of a number, alpha, beta and/or gamma may be data frames with two columns, 'time' and 'value'. The time column must start at zero and be strictly increasing, while the beta column may hold any positive values. In this case, the parameter is considered to be piecewise constant; each time t reaches the the next value of 'time', the value of the parameter changes to the corresponding value from the value column. (Time varying epsilon is not currently supported.)

Value

A list, as described in ode. In this case we provide only the first element of the list, which is a vector of derivative values.


rplzzz/CovMitigation documentation built on June 7, 2021, 8:48 a.m.