trajectory-pomp             package:pomp             R Documentation

_C_o_m_p_u_t_e _t_r_a_j_e_c_t_o_r_i_e_s _o_f _t_h_e _d_e_t_e_r_m_i_n_s_t_i_c _s_k_e_l_e_t_o_n.

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_U_s_a_g_e:

     trajectory(object, params, times, ...)
     ## S4 method for signature 'pomp':
     trajectory(object, params, times, ...)

_A_r_g_u_m_e_n_t_s:

  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.

_D_e_t_a_i_l_s:

     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?

_V_a_l_u_e:

     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]'.

_A_u_t_h_o_r(_s):

     Aaron A. King kingaa at umich dot edu

_S_e_e _A_l_s_o:

     'pomp-class', 'pomp', 'lsoda'

_E_x_a_m_p_l_e_s:

     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')

