pfilter(object, ...)
## S3 method for class 'pomp':
pfilter(object, params, Np, tol = 1e-17,
max.fail = 0, pred.mean = FALSE, pred.var = FALSE,
filter.mean = FALSE, save.states = FALSE, seed = NULL,
verbose = getOption("verbose"), ...)
## S3 method for class 'mif':
pfilter(object, params, Np, tol = 1e-17,
max.fail = 0, pred.mean = FALSE, pred.var = FALSE,
filter.mean = FALSE, \dots)
pomp
or inheriting class pomp
.npars
x Np
matrix containing the parameters corresponding to the initial state values in xstart
.
This must have a params
as a naobject
is of class mif
, this is by default the same number of particles used in the mif
iterations.tol
are considered to be 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
, the state-vector for each particle is saved and returned.seed
is an integer, it is passed to set.seed
prior to any simulation and is returned as the TRUE
, progress information is reported as pfilter
works.object
.pred.mean
.pred.mean
.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}]$.pfilter
was called.
If the argument seed
was specified, this is a copy;
if not, this is the internal state of the random number generator at the time of call.## See the vignettes for examples.
Run the code above in your browser using DataLab