Specification of skeleton.
vectorfield(f)map(f, delta.t = 1)
procedure for evaluating the deterministic skeleton This can be a C snippet, an R function, or the name of a native routine in a dynamically linked library.
positive numerical value; the size of the discrete time step corresponding to an application of the map
The default skeleton
is undefined.
It will yield missing values (NA
) for all state variables.
Some Windows users report problems when using C snippets in parallel computations.
These appear to arise when the temporary files created during the C snippet compilation process are not handled properly by the operating system.
To circumvent this problem, use the cdir
and cfile
options (described here) to cause the C snippets to be written to a file of your choice, thus avoiding the use of temporary files altogether.
The skeleton is a dynamical system that expresses the central tendency of the unobserved Markov state process.
As such, it is not uniquely defined, but can be both interesting in itself and useful in practice.
In pomp, the skeleton is used by trajectory
and traj.match
.
If the state process is a discrete-time stochastic process, then the skeleton is a discrete-time map. To specify it, provide
skeleton = map(f, delta.t)
to pomp
, where f
implements the map and delta.t
is the size of the timestep covered at one map iteration.
If the state process is a continuous-time stochastic process, then the skeleton is a vectorfield (i.e., a system of ordinary differential equations). To specify it, supply
skeleton = vectorfield(f)
to pomp
, where f
implements the vectorfield, i.e., the right-hand-size of the differential equations.
In either case, f
can be furnished either as a C snippet (the preferred choice), or an R function.
General rules for writing C snippets can be found here.
In writing a skeleton
C snippet, be aware that:
For each state variable, there is a corresponding component of the deterministic skeleton. The goal of such a snippet is to compute all the components.
When the skeleton is a map, the component corresponding to state variable x
is named Dx
and is the new value of x
after one iteration of the map.
When the skeleton is a vectorfield, the component corresponding to state variable x
is named Dx
and is the value of \(dx/dt\).
As with the other C snippets, all states, parameters and covariates, as well as the current time, t
, will be defined in the context within which the snippet is executed.
The tutorials on the package website give some examples.
If f
is an R function, its arguments should be taken from among the state variables, parameters, covariates, and time.
It must also take the argument ‘...
’.
As with the other basic components, f
may take additional arguments, provided these are passed along with it in the call to pomp
.
The function f
must return a numeric vector of the same length as the number of state variables, which contains the value of the map or vectorfield at the required point and time.
More on implementing POMP models:
Csnippet
,
accumulators
,
basic_components
,
covariate_table()
,
distributions
,
dmeasure_spec
,
dprocess_spec
,
parameter_trans()
,
pomp-package
,
prior_spec
,
rinit_spec
,
rmeasure_spec
,
rprocess_spec
,
transformations
,
userdata