pfilter                 package:pomp                 R Documentation

_P_a_r_t_i_c_l_e _f_i_l_t_e_r

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

     Run a plain vanilla particle filter. Resampling is performed after
     each observation.

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

     pfilter(object, ...)
     ## S4 method for signature 'pomp':
     pfilter(object, params, Np, tol = 1e-17,
         max.fail = 0, pred.mean = FALSE, pred.var = FALSE,
         filter.mean = FALSE, save.states = FALSE,
         verbose = getOption("verbose"), ...)
     ## S4 method for signature 'mif':
     pfilter(object, params, Np, tol = 1e-17,
         max.fail = 0, pred.mean = FALSE, pred.var = FALSE,
         filter.mean = FALSE, ...)

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

  object: An object of class 'pomp' or inheriting class 'pomp'. 

  params: A 'npars' x 'Np' matrix containing the parameters
          corresponding to the initial state values in 'xstart'. This
          must have a 'rownames' attribute. It is permissible to supply
          'params' as a named numeric vector, i.e., without a 'dim'
          attribute. In this case, all particles will inherit the same
          parameter values. 

      Np: integer; number of particles to use. When 'object' is of
          class 'mif', this is by default the same number of particles
          used in the 'mif' iterations. 

     tol: positive numeric scalar; particles with log likelihood below
          'tol' are considered to be "lost". A filtering failure occurs
          when, at some time point, all particles are lost. When all
          particles are lost, the conditional log likelihood at that
          time point is set to be 'log(tol)'. 

max.fail: integer; the maximum number of filtering failures allowed. If
          the number of filtering failures exceeds this number,
          execution will terminate with an error. 

pred.mean: logical; if 'TRUE', the prediction means are calculated for
          the state variables and parameters. 

pred.var: logical; if 'TRUE', the prediction variances are calculated
          for the state variables and parameters. 

filter.mean: logical; if 'TRUE', the filtering means are calculated for
          the state variables and parameters. 

save.states: logical; if 'TRUE', the state-vector for each particle is
          saved and returned. 

 verbose: logical; if 'TRUE', progress information is reported as
          'pfilter' works. 

     ...: Additional arguments unused at present. 

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

     A list with the following elements: 

pred.mean: The matrix of prediction means. The rows correspond to
          states and parameters (if appropriate), in that order, the
          columns to successive observations in the time series
          contained in 'object'. 

pred.var: The matrix of prediction variances, in the same format as
          'pred.mean'. 

filter.mean: The matrix of filtering means, in the same format as
          'pred.mean'. 

eff.sample.size: A vector containing the effective number of particles
          at each time point. 

cond.loglik: A vector containing the conditional log likelihoods at
          each time point. 

  states: If 'saves.states=TRUE', the array of state-vectors at each
          time point, for each particle. An array with dimensions
          'nvars'-by-'Np'-by-'ntimes'. In particular, 'states[,i,t]'
          can be considered a sample from f[X|y_{1:t}]. 

   nfail: The number of filtering failures encountered. 

  loglik: The estimated log-likelihood. 

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

     Aaron A. King kingaa at umich dot edu

_R_e_f_e_r_e_n_c_e_s:

     M. S. Arulampalam, S. Maskell, N. Gordon, & T. Clapp. A Tutorial
     on Particle Filters for Online Nonlinear, Non-Gaussian Bayesian
     Tracking. IEEE Trans. Sig. Proc. 50:174-188, 2002.

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

     pomp-class

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

     ## See the vignettes for examples.

