Learn R Programming

timsac (version 1.2.7)

tvar: Time Varying Coefficients AR model

Description

Estimate time varying coefficients AR model.

Usage

tvar(y, ar.order, trend.order=2, span, outlier=NULL, tau20=NULL,
       delta=NULL, plot=TRUE)

Arguments

y
a univariate time series.
ar.order
AR order.
trend.order
trend order (1 or 2).
span
local stationary span.
outlier
positions of outliers.
tau20
initial estimate of variance of the system noise tau2.
delta
search width. If tau2 is NULL or delta is NULL, tau2 is computed automatically.
plot
logical. If TRUE (default) parcor is plotted.

Value

  • tau2maxvariance of the system noise for maximum log-likelihood.
  • sigma2variance of the observational noise.
  • lkhoodlog-likelihood.
  • aicAIC.
  • arcoeftime varying AR coefficients.
  • parcorpartial autocorrelation coefficient.

Details

The time-varying coefficients AR model is given by $$y_t = a_{1,t}y_{t-1} + \ldots + a_{p,t}y_{t-p} + u_t$$ where $a_{i,t}$ is $i$-lag AR coefficient at time $t$ and $u_t$ is a zero mean white noise.

References

Kitagawa, G. (1993) Time series analysis programing (in Japanese). The Iwanami Computer Science Series. 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

Run this code
data(MYE1F) # an earthquake wave data
  z <- tvar(MYE1F, 4, 2, 20, c(630,1026), 6.6e-06, 1.0e-06)
  z$tau2max
  z$sigma2
  z$lkhood
  z$aic

Run the code above in your browser using DataLab