tvvar {TSSS}R Documentation

Time Varying Variance

Description

Estimate time-varying variance.

Usage

tvvar(y, trend.order, tau2.ini = NULL, delta, plot = TRUE, ...)

Arguments

y

a univariate time series.

trend.order

trend order.

tau2.ini

initial estimate of variance of the system noise τ2\tau^2. If tau2.ini = NULL, the most suitable value is chosen in τ2=2k\tau^2 = 2^{-k}.

delta

search width.

plot

logical. If TRUE (default), transformed data, trend and residuals are plotted.

...

graphical arguments passed to the plot method.

Details

Assuming that σ2m12=σ2m2\sigma_{2m-1}^2 = \sigma_{2m}^2, we define a transformed time series s1,,sN/2s_1,\dots,s_{N/2} by

sm=y2m12+y2m2,s_m = y_{2m-1}^2 + y_{2m}^2,

where yny_n is a Gaussian white noise with mean 00 and variance σn2\sigma_n^2. sms_m is distributed as a χ2\chi^2 distribution with 22 degrees of freedom, so the probability density function of sms_m is given by

f(s)=12σ2es/2σ2.f(s) = \frac{1}{2\sigma^2} e^{-s/2\sigma^2}.

By further transformation

zm=log(sm2),z_m = \log \left( \frac{s_m}{2} \right),

the probability density function of zmz_m is given by

g(z)=1σ2exp{zezσ2}=exp{(zlogσ2)e(zlogσ2)}.g(z) = \frac{1}{\sigma^2} \exp{ \left\{ z-\frac{e^z}{\sigma^2} \right\} } = \exp{ \left\{ (z-\log\sigma^2) - e^{(z-\log\sigma^2)} \right\} }.

Therefore, the transformed time series is given by

zm=logσ2+wm,z_m = \log \sigma^2 + w_m,

where wmw_m is a double exponential distribution with probability density function

h(w)=exp{wew}.h(w) = \exp{\{w-e^w\}}.

In the space state model

zm=tm+wmz_m = t_m + w_m

by identifying trend components of zmz_m, the log variance of original time series yny_n is obtained.

Value

An object of class "tvvar" which has a plot method. This is a list with the following components:

tvv

time varying variance.

nordata

normalized data.

sm

transformed data.

trend

trend.

noise

residuals.

tau2

variance of the system noise.

sigma2

variance of the observational noise.

llkhood

log-likelihood of the model.

aic

AIC.

tsname

the name of the univariate time series y.

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.

Kitagawa, G. and Gersch, W. (1985) A smoothness priors time varying AR coefficient modeling of nonstationary time series. IEEE trans. on Automatic Control, AC-30, 48-56.

Examples

# seismic data
data(MYE1F)
tvvar(MYE1F, trend.order = 2, tau2.ini = 6.6e-06, delta = 1.0e-06)

[Package TSSS version 1.3.4-5 Index]