TSSS (version 1.3.4-5)

ngsmth: Non-Gaussian Smoothing

Description

Trend estimation by non-Gaussian smoothing.

Usage

ngsmth(y, noisev = 2, tau2, bv = 1.0, noisew = 1, sigma2, bw = 1.0, 
       initd = 1, k = 200, plot = TRUE, ...)

Value

An object of class "ngsmth", which is a list with the following components:

llkhood

log-likelihood.

trend

trend.

smt

smoothed density.

Arguments

y

a univariate time series.

noisev

type of system noise density.

1 :Gaussian (normal)
2 :Pearson family
3 :two-sided exponential

tau2

variance or dispersion of system noise.

bv

shape parameter of system noise (for noisev = 2).

noisew

type of observation noise density

1 :Gaussian (normal)
2 :Pearson family
3 :two-sided exponential
4 :double exponential

sigma2

variance or dispersion of observation noise.

bw

shape parameter of observation noise (for noisew = 2).

initd

type of density function.

1 :Gaussian (normal)
2 :uniform
3 :two-sided exponential

k

number of intervals in numerical integration.

plot

logical. If TRUE (default), trend is plotted.

...

graphical arguments passed to plot.ngsmth.

Details

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/(\tau^2 + v_n^2)^b$$ with \(\frac{1}{2} < b < \infty\) and \(c = \tau^{2b-1}\Gamma(b) \bigm/ \Gamma(\frac{1}{2})\Gamma(b-\frac{1}{2})\).

This broad family of distributions includes the Cauchy distribution (\(b = 1\)) and \(t\)-distribution (\(b = (k+1)/2\)).

References

Kitagawa, G. (2020) Introduction to Time Series Modeling with Applications in R. Chapman & Hall/CRC.

Kitagawa, G. and Gersch, W. (1996) Smoothness Priors Analysis of Time Series. Lecture Notes in Statistics, No.116, Springer-Verlag.

Examples

Run this code
## test data
data(PfilterSample)
par(mar = c(3, 3, 1, 1) + 0.1)

# system noise density : Gaussian (normal)
s1 <- ngsmth(PfilterSample, noisev = 1, tau2 = 1.4e-02, noisew = 1, sigma2 = 1.048)
s1
plot(s1, "smt", theta = 25, phi = 30, expand = 0.25, col = "white")

# system noise density : Pearson family
s2 <- ngsmth(PfilterSample, noisev = 2, tau2 = 2.11e-10, bv = 0.6, noisew = 1,
             sigma2 = 1.042)
s2
plot(s2, "smt", theta = 25, phi = 30, expand = 0.25, col = "white")

## 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)
s3
plot(s3, "smt", phi = 50, expand = 0.5, col = 8)

Run the code above in your browser using DataLab