Decompose a nonstationary time series into several possible components.
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)
outlier correction factor.
trend.
seasonal.
trading day component if year
> 0.
= y
- trend
- season
- tday
-
outlier
.
= trend
- irregular
.
= trend
+ season
+ tday
.
averaged ABIC.
a list with components acov
(autocovariances),
acor
(normalized covariances), mean
, v
(innovation
variance), aic
(AIC), parcor
(partial autocorrelation) and
rspec
(rational spectrum) of irregular if spec
= TRUE
.
a list with components acov
, acor
,
mean
, v
, aic
, parcor
and rspec
of
differenced adjusted series if spec
= TRUE
.
a list with components acov
, acor
,
mean
, v
, aic
and parcor
of differenced trend
series if spec
= TRUE
.
a list with components acov
, acor
,
mean
, v
, aic
and parcor
of differenced seasonal
series if spec
= TRUE
.
a univariate time series.
number of seasonals within a period.
number of periods to be processed at one time.
number of periods to be shifted to define the new span of data.
length of forecast at the end of data.
order of differencing of trend.
order of differencing of seasonal. seasonal.order
is smaller than or equal to span
.
trading-day adjustment option.
= 0 : | without trading day adjustment |
> 0 : | with trading day adjustment |
(the series is supposed to start at this year ) |
number of the month in which the series starts. If year
=0
this parameter is ignored.
outlier correction option.
0 : | without outlier detection |
1 : | with outlier detection by marginal probability |
2 : | with outlier detection by model selection |
controls the rigidity of the seasonal component. more rigid seasonal with larger than rigid.
controls the sum of the seasonals within a period.
controls the leap year effect.
controls prior variance of initial trend.
controls prior variance of initial seasonal.
controls prior variance of initial sum of seasonal.
logical. If TRUE
(default), estimate spectra of irregular
and differenced adjusted.
logical. If TRUE
(default), plot trend
, adjust
,
smoothed
, season
and irregular
.
logical. If TRUE
, a graphic device is opened
for each graphics display.
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.
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.
data(LaborData)
baysea(LaborData, forecast = 12)
Run the code above in your browser using DataLab