
## S3 method for class 'pomp':
pfilter(object, params, Np, tol = 1e-17,
max.fail = Inf, pred.mean = FALSE, pred.var = FALSE,
filter.mean = FALSE, filter.traj = FALSE, save.states = FALSE,
save.params = FALSE, verbose = getOption("verbose"), ...)
## S3 method for class 'pfilterd.pomp':
pfilter(object, params, Np, tol, \dots)
## S3 method for class 'pfilterd.pomp':
logLik(object, \dots)
## S3 method for class 'pfilterd.pomp':
cond.logLik(object, \dots)
## S3 method for class 'pfilterd.pomp':
eff.sample.size(object, \dots)
## S3 method for class 'pfilterd.pomp':
pred.mean(object, pars, \dots)
## S3 method for class 'pfilterd.pomp':
pred.var(object, pars, \dots)
## S3 method for class 'pfilterd.pomp':
filter.mean(object, pars, \dots)
## S3 method for class 'pfilterd.pomp':
filter.traj(object, vars, \dots)
pomp
or inheriting class pomp
.npars
x Np
numeric matrix containing the parameters corresponding to the initial state values in xstart
.
This must have a tol
are considered to be max.fail
is set to infinity, so no error can be triggered.TRUE
, the prediction means are calculated for the state variables and parameters.TRUE
, the prediction variances are calculated for the state variables and parameters.TRUE
, the filtering means are calculated for the state variables and parameters.TRUE
, a filtered trajectory is returned for the state variables and parameters.save.states=TRUE
, the state-vector for each particle at each time is saved in the saved.states
slot of the returned pfilterd.pomp
object.
TRUE
, progress information is reported as pfilter
works.pfilterd.pomp
.
This class inherits from class pomp
.
The following additional slots can be accessed via the $
operator:
[object Object],[object Object],[object Object]pomp
, mif
, pmcmc
, bsmc2
,
and the tutorials on the pompExample(gompertz)
pf <- pfilter(gompertz,Np=1000) ## use 1000 particles
plot(pf)
logLik(pf)
cond.logLik(pf) ## conditional log-likelihoods
eff.sample.size(pf) ## effective sample size
logLik(pfilter(pf)) ## run it again with 1000 particles
## run it again with 2000 particles
pf <- pfilter(pf,Np=2000,filter.mean=TRUE)
fm <- filter.mean(pf) ## extract the filtering means
Run the code above in your browser using DataLab