ngsmth {TSSS} | R Documentation |
Trend estimation by non-Gaussian smoothing.
ngsmth(y, noisev = 2, tau2, bv = 1.0, noisew = 1, sigma2, bw = 1.0, initd = 1, k = 200, plot = TRUE, ...)
y |
a univariate time series. | ||||||||
noisev |
type of system noise density.
| ||||||||
tau2 |
variance of dispersion of system noise. | ||||||||
bv |
shape parameter of system noise (for | ||||||||
noisew |
type of observation noise density
| ||||||||
sigma2 |
variance of dispersion of observation noise. | ||||||||
bw |
shape parameter of observation noise (for | ||||||||
initd |
type of density function.
| ||||||||
k |
number of intervals. | ||||||||
plot |
logical. If | ||||||||
... |
further arguments to be passed to |
Consider a one-dimensional state space model
x(n) = x(n-1) + v(n),
y(n) = x(n) + w(n),
where the observation noise w(n) is assumed to be Gaussian distributed and the system noise v(n) is assumed to be distributed as the Pearson system
q(v(n)) = c/{τ^2 + v(n)^2}^b
with 1/2 < b < ∞ and c = τ^(2b-1) Γ(b) / {Γ(1/2) Γ(b-1/2)}.
This broad family of distributions includes the Cauchy distribution (b = 1) and t-distribution (b = (k+1)/2).
An object of class "ngsmth"
. It contains the following components:
trend |
trend. |
smt |
smoothed density. |
Kitagawa, G. (2010) Introduction to Time Series Modeling. Chapman & Hall/CRC.
Kitagawa, G. and Gersch, W. (1996) Smoothness Priors Analysis of Time Series. Lecture Notes in Statistics, No.116, Springer-Verlag.
## trend model x <- rep(0, 400) x[101:200] <- 1 x[201:300] <- -1 y <- x + rnorm(400, mean = 0, sd = 1.0) # system noise density : Gaussian (normal) s1 <- ngsmth(y, noisev = 1, tau2 = 1.4e-02, noisew = 2, sigma2 = 1.048) plot(s1, "smt", theta = 20, phi = 60, expand = 0.3) # system noise density : Pearson family s2 <- ngsmth(y, noisev = 2, tau2 = 2.11e-10, bv = 0.6, noisew = 2, sigma2 = 1.042) plot(s2, "smt", theta = 25, phi = 30, expand = 0.25) ## seismic data data(MYE1F) n <- length(MYE1F) yy <- rep(0, n) for (i in 2:n) yy[i] <- MYE1F[i] - 0.5 * MYE1F[i-1] m <- seq(1, n, by = 2) y <- yy[m] z <- tvvar(y, trend.order = 2, tau2.ini = 4.909e-02, delta = 1.0e-06) # system noise density : Gaussian (normal) s3 <- ngsmth(z$sm, noisev = 1, tau2 = z$tau2, noisew = 2, sigma2 = pi*pi/6, k = 190) plot(s3, "smt", phi = 50, expand = 0.5, col = 8)