state: Constructor for state class

View source: R/state.R

stateR Documentation

Constructor for state class

Description

Build a state, which is a collection of patches where each patch has SEIR compartments and patch-specific birth and death rates.

Usage

state(s_patches, e_patches, i_patches, r_patches, birth_rates, death_rates,
  transmission_rates, infection_rates, recovery_rates, movement_rate)

Arguments

s_patches

Vector of number of susceptibles in each patch,

e_patches

Vector of number of exposed in each patch

i_patches

Vector of number of infected in each patch

r_patches

Vector of number of recovered in each patch

birth_rates

patch-specific birth rates

death_rates

patch-specific death rates

transmission_rates

Vector of patch-specific transmission rate

infection_rates

Vector of patch-specific infection rate

recovery_rates

Vector of patch-specific recovery rate

movement_rate

M rate of movement between patches is defined the rate matrix M where m[i, j] is the rate of movement from i to j conditional on moving out of i per unit time. Must be n X n matrix where is the number of patches i.e, max of lengths of all input vectors s_patches, e_patches, i_patches, r_patches, birth_rates, and death_rates.

Value

List with class 'state'. Each element of 'state' is a list of class 'patch'. In addition, 'state' contains a 'movement_rate' which is a non-negative matrix of rates of movement between patches.

Author(s)

Sangeeta Bhatia

See Also

[patch()]


sangeetabhatia03/multipatchr documentation built on Aug. 13, 2024, 4:05 p.m.