ARIMAdec {tsdecomp} | R Documentation |
ARIMA-Model-Based Decomposition of Time Series
Description
This is the main function for the ARIMA-model-based decomposition of a time series.
Usage
ARIMAdec(x, mod, width = c(0.035, 0.035), min.modulus = 0.4,
extend = 16, drift = FALSE, optim.tol = 1e-04, ...)
## S3 method for class 'ARIMAdec'
print(x, units = c("radians", "degrees", "pi"), digits = 4, ...)
## S3 method for class 'ARIMAdec'
plot(x, ...)
Arguments
x |
for |
mod |
an object of class |
width |
numeric of length two, width of the interval of frequencies allocated to the trend
and the seasonal components (measured in radians). If a numeric of length one is passed as argument, the same
width is used for both components. See |
min.modulus |
numeric, minimum modulus of the roots assigned to the trend component.
See |
extend |
integer; if greater than zero, the series is extended by means of forecasts
and backcasts based on the fitted model |
drift |
logical, if |
optim.tol |
numeric, the convergence tolerance to be used by |
units |
character, the units in which the argument of the roots are printed. |
digits |
numeric, the number of significant digits to be used by |
... |
further arguments to be passed to |
Details
This function is a wrapper to the sequence of calls to
roots.allocation
, pseudo.spectrum
,
canonical.decomposition
and filtering
.
Value
An object of class ARIMAdec
containing the following:
1) ar
: the output from {roots.allocation}
,
2) spectrum
: the output from {pseudo.spectrum}
,
3) ma
: the output from {canonical.decomposition}
,
4) xextended
: the series extended with backcasts and forecasts (if extend > 0
),
5) filters
: the filters returned by {filtering}
,
6) components
: the estimated components returned by {filtering}
.
References
Burman, J. P. (1980) ‘Seasonal Adjustment by Signal Extraction’. Journal of the Royal Statistical Society. Series A (General), 143(3), pp. 321-337. doi: 10.2307/2982132
Hillmer, S. C. and Tiao, G. C. (1982) ‘An ARIMA-Model-Based Approach to Seasonal Adjustment’. Journal of the American Statistical Association, 77(377), pp. 63-70. doi: 10.1080/01621459.1982.10477767
See Also
canonical.decomposition
,
filtering
,
pseudo.spectrum
,
roots.allocation
.
Examples
# Airlines model and monthly data
y <- log(AirPassengers)
fit <- arima(y, order=c(0,1,1), seasonal=list(order=c(0,1,1)))
dec <- ARIMAdec(y, fit, extend=72)
dec
plot(dec)
# JohnsonJohnson quarterly data
y <- log(JohnsonJohnson)
fit <- arima(y, order=c(0,1,1), seasonal=list(order=c(0,1,1)))
dec <- ARIMAdec(y, fit, extend=16)
dec
plot(dec)
# Nile annual data
# this series is better modelled as a level shift at
# observation 29 and a mean (no ARMA structure),
# here the shift is ignored for illustration of the
# decomposition of the fitted ARIMA(0,1,1) model
y <- Nile
fit <- arima(y, order=c(0,1,1))
dec <- ARIMAdec(y, fit, extend=72)
dec
plot(dec, overlap.trend=TRUE, args.trend=list(col="blue"))