pfilterNL {TSSS} | R Documentation |
Particle Filtering and Smoothing for Nonlinear State-Space Model
Description
Trend estimation by particle filter and smoother via nonlinear state-space model.
Usage
pfilterNL(y, m = 10000, lag = 20, sigma2, tau2, xrange = NULL, seed = NULL,
plot = TRUE, ...)
Arguments
y |
univariate time series. |
m |
number of particles. |
lag |
lag length for fixed-lag smoothing. |
sigma2 |
observation noise variance. |
tau2 |
system noise variance. |
xrange |
specify the lower and upper bounds of the distribution's range. |
seed |
arbitrary positive integer to generate a sequence of uniform random numbers. The default seed is based on the current time. |
plot |
logical. If |
... |
graphical arguments passed to the |
Details
This function performs particle filtering and smoothing for the following nonlinear state-space model;
| (system model) |
| (observation model) |
where is a time series,
is the state vector.
The system noise
and the observation noise
are assumed to be white noises
which follow a Gaussian distribution and
~
.
The algorithm of the particle filtering and smoothing are presented in Kitagawa (2020). For more details, please refer to Kitagawa (1996) and Doucet et al. (2001).
Value
An object of class "pfilter"
which has a plot
method. This is a
list with the following components:
llkhood |
log-likelihood. | ||||||||||||
smooth.dist |
marginal smoothed distribution of the trend
|
References
Kitagawa, G. (1996) Monte Carlo filter and smoother for non-Gaussian nonlinear state space models, J. of Comp. and Graph. Statist., 5, 1-25.
Doucet, A., de Freitas, N. and Gordon, N. (2001) Sequential Monte Carlo Methods in Practice, Springer, New York.
Kitagawa, G. (2020) Introduction to Time Series Modeling with Applications in R. Chapman & Hall/CRC.
See Also
pfilter
performs particle filtering and smoothing for linear
non-Gaussian state-space model.
Examples
data(NLmodel)
x <- NLmodel[, 2]
pfilterNL(x, m = 100000, lag = 20 , sigma2 = 10.0, tau2 = 1.0,
xrange = c(-20, 20), seed = 2019071117)