Compute trajectories of the deterministic skeleton of a Markov process.
# S4 method for pomp
trajectory(
object,
params,
times,
t0,
format = c("array", "data.frame"),
...,
verbose = getOption("verbose", FALSE)
)# S4 method for traj_match_objfun
trajectory(object, ..., verbose = getOption("verbose", FALSE))
an object of class ‘pomp’, or of a class that extends ‘pomp’.
This will typically be the output of pomp
, simulate
, or one of the pomp inference algorithms.
a npar
x nrep
matrix of parameters.
Each column is treated as an independent parameter set, in correspondence with the corresponding column of x
.
a numeric vector (length ntimes
) containing times at which the itineraries are desired.
These must be in non-decreasing order with times[1]>t0
.
By default, this is the full set of observation times (see time
).
the time at which the initial conditions are assumed to hold.
By default, this is the zero-time (see timezero
).
the format in which to return the results.
format = "array"
causes the trajectories to be returned
in a rank-3 array with dimensions
nvar
x ncol(params)
x ntimes
.
Here, nvar
is the number of state variables and ntimes
the length of the argument times
.
format = "data.frame"
causes the results to be returned as a single data frame containing
the time and states.
An ordered factor variable, ‘.id’, distinguishes the trajectories from one another.
logical; if TRUE
, diagnostic messages will be printed to the console.
trajectory
returns an array of dimensions nvar
x nrep
x ntimes
.
If x
is the returned matrix, x[i,j,k]
is the i-th component of the state vector at time times[k]
given parameters params[,j]
.
In the case of a discrete-time system, the deterministic skeleton is a map and a trajectory is obtained by iterating the map.
In the case of a continuous-time system, the deterministic skeleton is a vector-field;
trajectory
uses the numerical solvers in deSolve to integrate the vectorfield.
Note that the handling of …
in trajectory
differs from that of most other functions in pomp.
In particular, it is not possible to modify the model structure in a call to trajectory
.
More on pomp elementary algorithms:
elementary algorithms
,
kalman
,
pfilter()
,
pomp-package
,
probe()
,
simulate()
,
spect()
,
wpfilter()
More on methods for deterministic process models:
flow()
,
skeleton specification
,
skeleton()
,
trajectory matching