baysea {timsac}R Documentation

Bayesian Seasonal Adjustment Procedure

Description

Decompose a nonstationary time series into several possible components.

Usage

  baysea(y, period=12, span=4, shift=1, forecast=0, trend.order=2, seasonal.order=1, year=0, month=1, out=0,
         rigid=1, zersum=1, delta=7, alpha=0.01, beta=0.01, gamma=0.1, spec=TRUE, plot=TRUE, separate.graphics=FALSE)

Arguments

y a univariate time series.
period number of seasonals within a period.
span number of periods to be processed at one time.
shift number of periods to be shifted to define the new span of data.
forecast length of forecast at at the end of data.
trend.order order of differencing of trend.
seasonal.order order of differencing of seasonal. seasonal.order is smaller than or equal to span.
year trading-day adjustment option.
=0 : without trading-day adjustment
>0 : with trading-day adjustment (the series is supposed to start at this "year")
month number of the month in which the series starts. If year=0 this parameter is ignored.
out outlier correction option.
=0 : without outlier detection
=1 : with outlier detection by marginal probability
=2 : with outlier detection by model selection
rigid controls the rigidity of the seasonal component. more rigid seasonal with larger than rigid.
zersum controls the sum of the seasonals within a period.
delta controls the leap year effect.
alpha controls prior variance of initial trend.
beta controls prior variance of initial seasonal.
gamma controls prior variance of initial sum of seasonal.
spec logical. If TRUE (default) estimate spectra of irregular and differenced adjusted.
plot logical. If TRUE (default) plot trend, adjust, smoothed, season and irregular.
separate.graphics logical. If TRUE a graphic device is opened for each graphics display.

Details

This function realized a decomposition of time series Y into the form

y(t) = T(t) + S(t) + I(t) + TDC(t) + OCF(t)

where T(t) is trend component, S(t) is seasonal component, I(t) is irregular, TDC(t) is trading day factor and OCF(t) is outlier correction factor.

For the purpose of comparison of models the criterion ABIC is defined

ABIC = -2(log maximum likelihood of the model)

Smaller value of ABIC represents better fit.

Value

outlier outlier correction factor.
trend trend.
season seasonal.
tday trading-day component if year>0.
irregular irregular = data - trend - season - tday - ootlier.
adjust adjusted = trend - irreguar.
smoothed smoothed = trend + season + tday.
aveABIC averaged ABIC.
irregular.spec a list of acov(autocovariances), acor(normalized covariances), mean, v(innovation variance), aic(AIC), parcor(partial autocorrelation) and rspec(rational spectrum) of irregular if spec=TRUE.
adjusted.spec a list of acov(autocovariances), acor(normalized covariances), mean, v(innovation variance), aic(AIC), parcor(partial autocorrelation) and rspec(rational spectrum) of differenced adjusted series if spec=TRUE.
differenced.trend a list of acov(autocovariances), acor(normalized covariances), mean, v(innovation variance), aic(AIC) and parcor(partial autocorrelation) of differenced trend series if spec=TRUE.
differenced.season a list of acov(autocovariances), acor(normalized covariances), mean, v(innovation variance), aic(AIC) and parcor(partial autocorrelation) of differenced seasonal series if spec=TRUE.

References

H.Akaike, T.Ozaki, M.Ishiguro, Y.Ogata, G.Kitagawa, Y-H.Tamura, E.Arahata, K.Katsura and Y.Tamura (1985) Computer Science Monograph, No.22, Timsac84 Part 1. The Institute of Statistical Mathematics.

Examples

  data(LaborData)
  baysea(y=LaborData, forecast=12)

[Package timsac version 1.2.1 Index]