Modified versions of the Liu and West (2001) algorithm.
# S4 method for pomp
bsmc2(object, params, Np, est, smooth = 0.1,
tol = 1e-17, verbose = getOption("verbose"), max.fail = 0,
transform = FALSE, …)
# S4 method for pomp
bsmc(object, params, Np, est, smooth = 0.1,
ntries = 1, tol = 1e-17, lower = -Inf, upper = Inf,
verbose = getOption("verbose"), max.fail = 0,
transform = FALSE, …)
An object of class pomp
or inheriting class pomp
.
Specifications for the prior distribution of particles. See details below.
Names of the rows of params
that are to be estimated.
No updates will be made to the other parameters.
If est
is not specified, all parameters for which there is variation in params
will be estimated.
Kernel density smoothing parameters.
The compensating shrinkage factor will be sqrt(1-smooth^2)
.
Thus, smooth=0
means that no noise will be added to parameters.
Generally, the value of smooth
should be chosen close to 0 (i.e., shrink~0.1
).
Number of draws from rprocess
per particle used to estimate the expected value of the state process at time t+1
given the state and parameters at time t
.
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)
.
optional; lower and upper bounds on the priors. This is useful in case there are box constraints satisfied by the priors. The posterior is guaranteed to lie within these bounds.
logical; if TRUE
, print diagnostic messages.
The maximum number of filtering failures allowed. If the number of filtering failures exceeds this number, execution will terminate with an error.
logical;
if TRUE
, the algorithm operates on the transformed scale.
currently ignored.
An object of class “bsmcd.pomp”. The “params” slot of this object will hold the parameter posterior medians. The slots of this class include:
A matrix containing draws from the approximate posterior distribution.
A matrix containing draws from the prior distribution (identical to params
on call).
A vector containing the effective number of particles at each time point.
The smoothing parameter used (see above).
The number of filtering failures encountered.
A vector containing the conditional log evidence scores at each time point.
The estimated log evidence.
The resampling weights for each particle.
There are two ways to specify the prior distribution of particles.
If params
is unspecified or is a named vector, Np
draws are made from the prior distribution, as specified by rprior
.
Alternatively, params
can be specified as an npars
x Np
matrix (with rownames).
bsmc
uses version of the original algorithm that includes a plug-and-play auxiliary particle filter.
bsmc2
discards this auxiliary particle filter and appears to give superior performance for the same amount of effort.
Liu, J. and M. West. Combining Parameter and State Estimation in Simulation-Based Filtering. In A. Doucet, N. de Freitas, and N. J. Gordon, editors, Sequential Monte Carlo Methods in Practice, pages 197-224. Springer, New York, 2001.