measles: Measles in UK spatPomp generator

Description Usage Arguments Value Note References Examples

View source: R/measles.R

Description

Generate a spatPomp object for measles in the top-U most populous cities in England and Wales. The model is adapted from He et al. (2010) with gravity transport following Park and Ionides (2019). The data in the object is simulated using the process and measurement models of He et al. (2010).

Usage

1
2
3
4
5
6
7
8
9
measles(
  U = 6,
  dt = 2/365,
  fixed_ivps = TRUE,
  shared_ivps = TRUE,
  S_0 = 0.032,
  E_0 = 5e-05,
  I_0 = 4e-05
)

Arguments

U

A length-one numeric signifying the number of cities to be represented in the spatPomp object.

dt

a numeric (in unit of years) that is used as the Euler time-increment for simulating measles data.

fixed_ivps

a logical. If TRUE initial value parameters will be declared in the globals slot and will not be part of the parameter vector.

shared_ivps

a logical. If TRUE and fixed_ivps=TRUE the values of S_0, E_0 and I_0 in the call to measles will be used as initial value parameters for all spatial units.

S_0

a numeric. If shared_ivps=TRUE and fixed_ivps=TRUE this is the initial proportion of all of the spatial units that are susceptible.

E_0

a numeric. If shared_ivps=TRUE and fixed_ivps=TRUE this is the initial proportion of all of the spatial units that are exposed.

I_0

a numeric. If shared_ivps=TRUE and fixed_ivps=TRUE this is the initial proportion of all of the spatial units that are infected.

Value

An object of class ‘spatPomp’ representing a U-dimensional spatially coupled measles POMP model.

Note

This function goes through a typical workflow of constructing a typical spatPomp object (1-4 below). This allows the user to have a file that replicates the exercise of model building as well as function that creates a typical nonlinear model in epidemiology in case they want to test a new inference methodology. We purposely do not modularize this function because it is not an operational piece of the package and is instead useful as an example.
1. Getting a measurements data.frame with columns for times, spatial units and measurements.
2. Getting a covariates data.frame with columns for times, spatial units and covariate data.
3. Constructing model components (latent state initializer, latent state transition simulator and measurement model). Depending on the methods used, the user may have to supply a vectorfield to be integrated that represents the deterministic skeleton of the latent process.
4. Bringing all the data and model components together to form a spatPomp object via a call to spatPomp().

References

\geosphere

Examples

1
2
3
m <- measles(U = 5)
# See all the model specifications of the object
spy(m)

spatPomp documentation built on Sept. 5, 2021, 5:35 p.m.