ARIMAdec function

ARIMA-Model-Based Decomposition of Time Series

ARIMA-Model-Based Decomposition of Time Series

This is the main function for the ARIMA-model-based decomposition of a time series.

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 ARIMAdec, a univariate time series; for plot.ARIMAdec and print.ARIMAdec, an object of class ARIMAdec returned by ARIMAdec.

  • mod: an object of class Arima. See arima.

  • 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 roots.allocation.

  • min.modulus: numeric, minimum modulus of the roots assigned to the trend component. See roots.allocation.

  • extend: integer; if greater than zero, the series is extended by means of forecasts and backcasts based on the fitted model mod. See filtering.

  • drift: logical, if TRUE the intercept in the fitted model mod or an external regressor named "drift" is treated as a deterministic linear trend. See filtering.

  • optim.tol: numeric, the convergence tolerance to be used by optimize.

  • units: character, the units in which the argument of the roots are printed. units="pi" prints the argument in radians as multiples of pipi.

  • digits: numeric, the number of significant digits to be used by print.

  • ...: further arguments to be passed to poly2acgf or to plot.tsdecFilter and print methods.

Details

This function is a wrapper to the sequence of calls to roots.allocation, pseudo.spectrum, canonical.decomposition and filtering.

Returns

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. tools:::Rd_expr_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. tools:::Rd_expr_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"))
  • Maintainer: Javier López-de-Lacalle
  • License: GPL-2
  • Last published: 2017-01-04