SMCsamplers.PGASsampler — Function
PGASsampler(y, param, nDraws, N, prior, transition, observation,
initproposal = prior, resampler = systematic)Uses the PGAS algorithm with N particles to simulate nDraws from the joint smoothing posterior of the state xₜ in the state space model determined by the three functions (that all return distributions):
prioris the prior for the initial state p(x₁)transitionis the transition density p(xₜ | xₜ₋₁)observationis the observation density p(yₜ | xₜ)
param is a struct with all the parameters and data (e.g. covariates) in the model needed to evaluate the prior, transition and observation densities.
initproposal is the proposal distribution for x₁ and resampler is the resampling function which defaults to systematic resampling. If sample_t0 is true, then sample also a t=0.
SMCsamplers.PGASsimulate! — Function
PGASsimulate!(X, y, p, N, param, prior, transition, observation,
initproposal, resampler, Xref = nothing)Single update step of the PGAS algorithm with N particles in X (N×p×T) to simulate from the joint smoothing posterior of the state xₜ in the state space model determined by the three functions (that all return distributions):
prioris the prior for the initial state p(x₀)transitionis the transition density p(xₜ | xₜ₋₁)observationis the observation density p(yₜ | xₜ)
param is a struct with all the parameters in the model needed to evaluate the prior, transition and observation densities.
initproposal is the proposal distribution for x₀ and resampler is the resampling function which defaults to systematic resampling.
Xref is a T×p matrix with conditioning particle path - if nothing, unconditional PF is run. If sample_t0 is true, then sample also a t=0.