Learn R Programming

pomp (version 0.30-1)

pomp: Partially-observed Markov process object.

Description

Create a new pomp object to hold a partially-observed Markov process model together with a uni- or multi-variate time series.

Usage

pomp(data, times, t0, ..., rprocess, dprocess, rmeasure, dmeasure,
       measurement.model, skeleton.map, skeleton.vectorfield,
       initializer, covar, tcovar,
       obsnames, statenames, paramnames, covarnames,
       PACKAGE)

Arguments

data
An array holding the data. This array is of dimensions nobs x ntimes, where nobs is the number of observed variables and ntimes is the number of times at which observations were made. One can als
times
vector of times corresponding to the observations: times must be a strictly increasing numeric vector. If data is a data-frame, times should be the name of the column of observation times.
t0
The zero-time. This must be no later than the time of the first observation, times[1]. The stochastic dynamical system is initialized at time t0.
rprocess
optional; a function of prototype rprocess(xstart,times,params,...) that simulates from the unobserved process. The easiest way to specify rprocess is to use one of the plugins
dprocess
optional; a function of prototype dprocess(x,times,params,log,...) that evaluates the likelihood of a sequence of consecutive state transitions. The easiest way to specify dprocess is to use one of the
rmeasure
optional; the measurement model simulator. This can be specified in one of three ways: (1) as a function of prototype rmeasure(x,t,params,...) that makes a draw from the observation process given states x, time t
dmeasure
optional; the measurement model probability density function. This can be specified in one of three ways: (1) as a function of prototype dmeasure(y,x,t,params,log,...) that computes the p.d.f. of y given x, <
measurement.model
optional formula; a formula or list of formulae, specifying the measurement model. These formulae are parsed internally and used to generate rmeasure and dmeasure functions. If measurement.model is given it o
skeleton.map, skeleton.vectorfield
optional functions. If we are dealing with a discrete-time Markov process, its deterministic skeleton is a map and can be specified using skeleton.map. If we are dealing with a continuous-time Markov process, its deterministic skeleto
initializer
optional function of prototype initializer(params,t0,...) that yields initial conditions for the state process when given a vector, params, of parameters. By default (i.e., if it is unspecified when pomp is calle
covar, tcovar
An optional table of covariates: covar is the table (with one column per variable) and tcovar the corresponding times (one entry per row of covar). covar can be specified as either a matrix or a data
obsnames, statenames, paramnames, covarnames
Optional character vectors specifying the names of observables, state variables, parameters, or covariates, respectively. These are only used in the event that one or more of the basic functions (rprocess, dprocess, rme
PACKAGE
An optional string giving the name of the dynamically loaded library in which any native routines are to be found.
...
Any additional arguments are passed as arguments to each of the functions rprocess, dprocess, rmeasure, dmeasure, and initializer whenever they are evaluated.

Value

  • An object of class pomp.

Warning

Some error checking is done, but complete error checking is impossible. If the user-specified functions do not conform to the above specifications (see Details), then the results may be invalid. Each algorithm that uses a pomp object uses some subset of the five basic components (rprocess, dprocess, rmeasure, dmeasure, skeleton).

Details

It is not typically necessary (or desirable, or even feasible) to define all of the functions rprocess, dprocess, rmeasure, dmeasure, and skeleton in any given problem. Each algorithm makes use of a different subset of these functions. In general, the specification of process-model codes rprocess and/or dprocess can be somewhat nontrivial: for this reason, plugins have been developed to streamline this process for the user. Currently, if one's process model evolves in discrete time or one is willing to make such an approximation (e.g., via an Euler approximation), then the euler.sim or onestep.sim plugin for rprocess and onestep.dens plugin for dprocess are available. For exact simulation of certain continuous-time Markov chains, an implementation of Gillespie's algorithm is available (see gillespie.sim). To use the plugins, consult the help documentation (?plugins) and the vignettes.

It is anticipated that in specific cases, it may be possible to obtain increased computational efficiency by writing custom versions of rprocess and/or dprocess. The following describes how each of these functions should be written in this case. [object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

See Also

pomp-methods, plugins

Examples

Run this code
## For examples, see the vignettes.

Run the code above in your browser using DataLab