particleFilter.RdThe particle filter returns an estimate of the marginal log-likelihood \(L = p(y(t_{1:T})|\theta)\) as well as the set of filtered trajectories and their respective weights at the last observation time \(\omega(t_T)=p(y(t_T)|\theta)\).
particleFilter(fitmodel, theta, initState, data, nParticles, progress = FALSE)a fitmodel object
named numeric vector. Values of the parameters. Names should
match fitmodel$thetaNames.
named numeric vector. Initial values of the state
variables. Names should match fitmodel$stateNames.
data frame. Observation times and observed data. The time column
must be named "time" and the observation column must be named
"obs".
number of particles
if TRUE progression of the filter is displayed in the
console.
A list of 3 elements:
dPointObs the marginal log-likelihood of the theta.
traj a list of size nParticles with all filtered
  trajectories.
trajWeight a vector of size nParticles with the
  normalised weight of the filtered trajectories.
An unbiased state sample \(x(t_{0:T}) ~
  p(X(t_{0:T})|\theta,y(t_{0:T}))\) can be obtained by sampling the set of
  trajectories traj with probability trajWeight.
plotSMC