trajectory-pomp {pomp} | R Documentation |
The method trajectory
computes a trajectory of the deterministic skeleton of a Markov process.
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
integrates the vectorfield to obtain a trajectory.
trajectory(object, params, times, ...) ## S4 method for signature 'pomp': trajectory(object, params, times, ...)
object |
an object of class pomp . |
times |
a numeric vector containing the times at which a trajectory is desired.
The first of these will be the initial time.
By default, times=time(object,t0=TRUE) .
|
params |
a rank-2 array of parameters.
Each column of params is a distinct parameter vector.
|
... |
at present, these are ignored. |
This function makes repeated calls to the user-supplied skeleton
of the pomp
object.
For specifications on supplying this, see pomp
.
When the skeleton is a vectorfield, trajectory
integrates it using lsoda
.
Unresolved issue: What is the behavior if type="map"
and times
are non-integral?
Returns an array of dimensions nvar
x nreps
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]
.
Aaron A. King kingaa at umich dot edu
data(euler.sir) x <- trajectory(euler.sir) plot(time(euler.sir,t0=TRUE),x["I",1,],type='l',xlab='time',ylab='I') lines(time(euler.sir,t0=FALSE),diff(x["cases",1,]),col='red') coef(euler.sir,c("gamma")) <- log(12) x <- trajectory(euler.sir) plot(time(euler.sir,t0=TRUE),x["I",1,],type='l',xlab='time',ylab='I') lines(time(euler.sir,t0=FALSE),diff(x["cases",1,]),col='red')