Skip to contents

This class represents the SEIRD model, showing how populations of susceptible, exposed, infectious and recovered individuals evolve over time.

Usage

# S4 method for SEIRD
initial_conditions(object)

# S4 method for SEIRD
transmission_parameters(object)

# S4 method for SEIRD
initial_conditions(object) <- value

# S4 method for SEIRD
transmission_parameters(object) <- value

# S4 method for SEIRD
run(object, times, solve_method = "lsoda")

# S4 method for SEIRD
R0(model)

# S4 method for SEIRD
ode_structure_diagram(model)

Arguments

object

an object of the class SEIRD

value

(list) list of values for beta, kappa, gamma, mu, respectively.

times

(double) a sequence of time points at which the solution to the system of ODEs should be returned. Must be of the form seq(t_start, t_end, by=t_step). Default time series is seq(0, 100, by = 1).

solve_method

(string) a string of chosen numerical integration method for solving the ode system. Default is lsoda which is also the default for the ode function in the deSolve package used in this function.

model

an SEIRD model

Value

object of class SEIRD with initial conditions assigned. object of class SEIRD with transmission parameter values assigned. two dataframes: one with the time steps, age range, time series of S, E, I and R population fractions, and one with the time steps, age range, time series of incidences and deaths population fraction. an R0 value An ODE-compartmental structure diagram object of class html

Methods (by generic)

  • initial_conditions: Retrieves initial conditions of SEIRD model.

  • transmission_parameters: Retrieves transmission parameters of SEIRD model.

  • initial_conditions<-: Setter method for initial conditions (S0, E0, I0 and R0) of the SEIRD model.

    All initial conditions must sum up to 1. If the initial conditions provided to do not sum to 1, an error is thrown.

  • transmission_parameters<-: Set transmission parameters (beta, kappa, gamma and mu) of the SEIRD model.

    If the transmission parameters provided to are not 1-dimensional an error is thrown.

  • run: Solves ODEs of the SEIRD specified in object for the time points specified in times and integration method specified in solve_method.

    $$\frac{dS(t)}{dt} = - beta S(t) I(t)$$ $$\frac{dE(t)}{dt} = beta S(t) I(t) - kappa E(t)$$ $$\frac{dI(t)}{dt} = kappa E(t) - (gamma + mu) I(t)$$ $$\frac{dR(t)}{dt} = gamma I(t)$$ $$\frac{dC(t)}{dt} = beta S(t) I(t)$$ $$\frac{dD(t)}{dt} = mu I(t)$$

    This function relies on the package deSolve.

  • R0: Calculates basic reproduction number for SEIRD model

    The R0 parameter is given by: $$R_0 = \beta/(\gamma + \mu)$$

  • ode_structure_diagram: Prints a compartmental diagram for the SEIRD model

Slots

output_names

list of compartments name which are used by the model and incidence.

initial_condition_names

list of names of initial conditions (characters). Default is list("S0", "E0", "I0", R0").

transmission_parameter_names

list of names of transmission parameters (characters). Default is list("beta", "kappa", "gamma", "mu").

initial_conditions

list of values for initial conditions (double).

transmission_parameters

list of values for transmission parameters (double).