pomp
object to hold a partially-observed Markov process model together with a uni- or multi-variate time series.## S3 method for class 'data.frame':
pomp(data, times, t0, \dots, rprocess, dprocess, rmeasure, dmeasure,
measurement.model, skeleton = NULL, skeleton.type = c("map","vectorfield"),
skeleton.map = NULL, skeleton.vectorfield = NULL,
initializer, covar, tcovar,
obsnames, statenames, paramnames, covarnames,
PACKAGE)
## S3 method for class 'numeric':
pomp(data, times, t0, \dots, rprocess, dprocess, rmeasure, dmeasure,
measurement.model, skeleton = NULL, skeleton.type = c("map","vectorfield"),
skeleton.map = NULL, skeleton.vectorfield = NULL,
initializer, covar, tcovar,
obsnames, statenames, paramnames, covarnames,
PACKAGE)
## S3 method for class 'matrix':
pomp(data, times, t0, \dots, rprocess, dprocess, rmeasure, dmeasure,
measurement.model, skeleton = NULL, skeleton.type = c("map","vectorfield"),
skeleton.map = NULL, skeleton.vectorfield = NULL,
initializer, covar, tcovar,
obsnames, statenames, paramnames, covarnames,
PACKAGE)
## S3 method for class 'pomp':
pomp(data, times, t0, \dots, rprocess, dprocess, rmeasure, dmeasure,
measurement.model, skeleton, skeleton.type,
initializer, covar, tcovar,
obsnames, statenames, paramnames, covarnames,
PACKAGE)
data
can be specified as a vector, a matrix, a data-frame, or a pomp
object..
If data
is a numeric vector, times
must be a numeric vtimes[1]
.
The stochastic dynamical system is initialized at time t0
.rprocess(xstart,times,params,...)
that simulates from the unobserved process.
The easiest way to specify rprocess
is to use one of the plugins
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(x,t,params,...)
that makes a draw from the observation process given states x
, time t
dmeasure(y,x,t,params,log,...)
that computes the p.d.f. of y
given x
, <rmeasure
and dmeasure
functions.
If measurement.model
is given it overridesskeleton
specifies the deterministic skeleton of the unobserved Markov process.
If we are dealing with a discrete-time Markov process, its deterministic skeleton is a map: indicate this by specifying skeleton.type="map"
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 callecovar
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 datarprocess
, dprocess
, rme
rprocess
, dprocess
, rmeasure
, dmeasure
, and initializer
whenever they are evaluated.pomp
.
If data
is an object of class pomp
, then by default the returned pomp
object is identical to data
.
If additional arguments are given, these override the defaults.pomp
object uses some subset of the five basic components (rprocess
, dprocess
, rmeasure
, dmeasure
, skeleton
).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]
time
,
time<-
,
timezero
,
timezero<-
,
coef
,
coef<-
,
obs
,
states
,
window
,
as.data.frame.pomp
## For examples, see the vignettes.
Run the code above in your browser using DataLab