baysea | R Documentation |
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)
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 the end of data. | ||||||
trend.order |
order of differencing of trend. | ||||||
seasonal.order |
order of differencing of seasonal. | ||||||
year |
trading-day adjustment option.
| ||||||
month |
number of the month in which the series starts. If | ||||||
out |
outlier correction option.
| ||||||
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 | ||||||
plot |
logical. If | ||||||
separate.graphics |
logical. If |
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.
outlier |
outlier correction factor. |
trend |
trend. |
season |
seasonal. |
tday |
trading day component if |
irregular |
= |
adjust |
= |
smoothed |
= |
aveABIC |
averaged ABIC. |
irregular.spec |
a list with components |
adjusted.spec |
a list with components |
differenced.trend |
a list with components |
differenced.season |
a list with components |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.