
Last chance! 50% off unlimited learning
Sale ends in
Trend estimation by particle filter and smoother.
pfilter(y, m = 10000, model = 0, lag = 20, initd = 0, sigma2, tau2,
alpha = 0.99, bigtau2 = NULL, init.sigma2 = 1, xrange = NULL,
seed = NULL, plot = TRUE, ...)
An object of class "pfilter"
which has a plot
method. This is a
list with the following components:
log-likelihood.
marginal smoothed distribution of the trend y
.
j = 4: | 50% point | |
j = 3, 5: | 1-sigma points (15.87% and 84.14% points) | |
j = 2, 6: | 2-sigma points (2.27% and 97.73% points) | |
j = 1, 7: | 3-sigma points (0.13% and 99.87% points) |
univariate time series.
number of particles.
model for the system noise.
0: | normal distribution |
1: | Cauchy distribution |
2: | Gaussian mixture distribution |
where |
lag length for fixed-lag smoothing.
type of initial state distribution.
0: | normal distribution |
1: | uniform distribution |
2: | Cauchy distribution |
3: | fixed point (default value = 0) |
observation noise variance
system noise variance model
= 0 or dispersion parameter
for model
= 1.
mixture weight model
= 2)
variance of the second component model
= 2)
variance for initd
= 0 or dispersion parameter of
initial state distribution for initd
= 2.
specify the lower and upper bounds of the distribution's range.
arbitrary positive integer to generate a sequence of uniform random numbers. The default seed is based on the current time.
logical. If TRUE
(default), marginal smoothed distribution
is plotted.
graphical arguments passed to the plot
method.
This function performs particle filtering and smoothing for the first order trend model;
(system model) | |
(observation model) |
where
The algorithm of the particle filter and smoother are presented in Kitagawa (2020). For more details, please refer to Kitagawa (1996) and Doucet et al. (2001).
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.
pfilterNL
performs particle filtering and smoothing for nonlinear
non-Gaussian state-space model.
data(PfilterSample)
y <- PfilterSample
if (FALSE) {
pfilter(y, m = 100000, model = 0, lag = 20, initd = 0, sigma2 = 1.048,
tau2 = 1.4e-2, xrange = c(-4, 4), seed = 2019071117)
pfilter(y, m = 100000, model = 1, lag = 20 , initd = 0, sigma2 = 1.045,
tau2 = 3.53e-5, xrange = c(-4, 4), seed = 2019071117)
pfilter(y, m = 100000, model = 2, lag = 20 , initd = 0, sigma2 = 1.03,
tau2 = 0.00013, alpha = 0.991, xrange = c(-4, 4), seed = 2019071117)
}
Run the code above in your browser using DataLab