Each of the control()
list options are described in detail below:
- d
A discount factor for the Liu-West filter. Should be close to,
but not above, 1.
- saveAll
Indicates whether to save state samples for all time points (TRUE), or only for the most recent time point (FALSE)
- timeIndex
An integer used to manually specify which dimension of the latent state variable indexes time.
Only needs to be set if the number of time points is less than or equal to the size of the latent state at each time point.
- initModel
A logical value indicating whether to initialize the model before running the filtering algorithm. Defaults to TRUE.
The Liu and West filter samples from the posterior
distribution of both the latent states and top-level parameters for a state space model.
Each particle in the Liu and West filter contains values not only for latent states,
but also for top level parameters. Latent states are propogated via an auxiliary step,
as in the auxiliary particle filter (buildAuxiliaryFilter
).
Top-level parameters are propagated from one
time point to the next through a smoothed kernel density based on previous particle values.
The resulting specialized particle filter algorthm will accept a
single integer argument (m
, default 10,000), which specifies the number
of random \'particles\' to use for sampling from the posterior distributions. The algorithm saves
unequally weighted samples from the posterior distribution of the latent
states and top-level parameters in mvWSamples
, with corresponding logged weights in mvWSamples['wts',]
.
An equally weighted sample from the posterior can be found in mvEWSamples
.
Note that if saveAll=TRUE
, the top-level parameter samples given in the mvWSamples
output will correspond to the weights from the final time point.