SEIRDVAge-class | R Documentation |
Defines an age-structured SEIRDV model and solves the set of ordinary differential equations of the model with a chosen method of numerical integration. Vaccinated individuals are considered in their own compartment.
## S4 method for signature 'SEIRDVAge' initial_conditions(object) ## S4 replacement method for signature 'SEIRDVAge' initial_conditions(object) <- value ## S4 method for signature 'SEIRDVAge' transmission_parameters(object) ## S4 replacement method for signature 'SEIRDVAge' transmission_parameters(object) <- value ## S4 method for signature 'SEIRDVAge' interventions(object) ## S4 replacement method for signature 'SEIRDVAge' interventions(object) <- value ## S4 method for signature 'SEIRDVAge' run(object, times, solve_method = "lsoda")
object |
An object of the class SEIRDVAge. |
value |
(list) list of interventions. Each intervention has the following parameters: starts, stops and coverages. |
times |
(vector) time sequence over which to solve the model. Must be of the form seq(t_start,t_end,by=t_step). Default time series is seq(0, 100, by = 1). |
solve_method |
A string indicating the chosen numerical integration
method for solving the ode system. Default is |
Initial conditions of SEIRDVAge model.
Updated version of the age-structured SEIRDV model.
Transmission parameters of SEIRDVAge model.
Updated version of the age-structured SEIRDV model.
object of class SEIRDVAge with intervention parameters assigned.
data frame containing the time vector and time series of S, E, I, R, V, VR and D population fractions for each age group outputs with incidence numbers for each age group.
initial_conditions
: Retrieves initial_conditions for an
age-structured SEIRDV model.
initial_conditions<-
: Sets initial_conditions of an age-structured
SEIRDV model.
If the initial conditions provided to do not sum to 1 or of different sizes compared to the number of age groups, an error is thrown.
transmission_parameters
: Retrieves transmission_parameters for an
age-structured SEIRDV model.
transmission_parameters<-
: Sets transmission_parameters of an
age-structured SEIRDV model.
If the transmission parameters provided to are not 1-dimensional an error is thrown.
interventions
: Retrieves interventions of age-structured SEIRDV model.
interventions<-
: Setter method for intervention of the
age-structured SEIRV model.
Intervention parameters have same size. A tanh function is used to smooth interventions during simulation. This class is designed for interventions which last several days at least and have several days between them; interventions involving rapid fluctuations may be distorted.
run
: Method to simulate output using from model.
Solves a system of ODEs which form an age-structured SEIRDV model. The system of equations for the time evolution of population fractions in Susceptible (S), Exposed (E), Infected (I), Recovered (R), Vaccinated (V) and Dead (D) groups in a given age group indexed by i is given by
\frac{dS_i(t)}{dt} = - β S_i(t) Σ_{j}C_{ij} I_j(t) - ν Inter(t) S_i(t) + δ_V V_i(t) + δ_R R_i(t) + δ_VR VR_i(t)
\frac{dE_i(t)}{dt} = β S_i(t) Σ_{j}C_{ij} I_j(t) - κ E_i(t)
\frac{dI_i(t)}{dt} = κ E_i(t) - γ I_i(t) - μ I_i(t)
\frac{dR_i(t)}{dt} = γ I_i(t) - δ_R R_i(t) - ν Inter(t) R_i(t)
\frac{dV(t)}{dt} = ν Inter(t) S_i(t) - δ_V V_i(t)
\frac{dVR(t)}{dt} = ν Inter(t) R_i(t) - δ_VR VR_i(t)
\frac{dC(t)}{dt} = β S_i(t) Σ_{j}C_{ij} I_j(t)
\frac{dD_i(t)}{dt} = μ I_i(t)
where C is a contact matrix whose elements represents the contact between different age groups (rows) with age groups of people they come in contact with (columns). This function relies on the package deSolve to numerically integrate the set of equations above.
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", "V0", "R0", "VR0", "D0").
transmission_parameter_names
list of names of transmission parameters (characters). Default is list("beta", "kappa", "gamma", "mu", "nu", "delta_V", "delta_R", "delta_VR").
intervention_parameter_names
list of names of parameters for each intervention (characters). Default is list ("starts", "stops", "coverages").
initial_conditions
list of values for initial conditions (double).
transmission_parameters
list of values for transmission parameters (double).
interventions
list interventions. Each intervention has the parameters in the same format (list of double).
contact_matrix
A square matrix with dimension equal to n_age_categories x n_age_categories. This matrix represents the contact between different age groups (rows) with age groups of people they come in contact with (columns).
n_age_categories
number of age categories.
age_ranges
list of string characters representing the range of ages of
people in each age category. This object must have length
n_age_categories
(otherwise an error is returned) and each element
must be formatted as 'age1-age2'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.