Seasonal Adjustment with X-13ARIMA-SEATS
Functions to estimate the seasonally adjusted series (sa) with the X-13ARIMA-SEATS method.
This is achieved by decomposing the time series (y) into the: trend-cycle (t), seasonal component (s) and irregular component (i).
The final seasonally adjusted series shall be free of seasonal and calendar-related movements.
x13
returns a preformatted result while jx13
returns the Java objects of the seasonal adjustment.
jx13( series, spec = c("RSA5c", "RSA0", "RSA1", "RSA2c", "RSA3", "RSA4c", "X11"), userdefined = NULL ) x13( series, spec = c("RSA5c", "RSA0", "RSA1", "RSA2c", "RSA3", "RSA4c", "X11"), userdefined = NULL )
series |
a univariate time series |
spec |
model specification X13. It can be a |
userdefined |
vector with characters for additional output variables (see |
The first step of the seasonal adjustment consist of pre-adjusting the time series by removing from it the deterministic effects by means of a regression model with ARIMA noise (RegARIMA, see: regarima
).
In the second part, the pre-adjusted series is decomposed into the following components: trend-cycle (t), seasonal component (s) and irregular component (i). The decomposition can be: additive (y = t + s + i), multiplicative (y = t * s * i), log-additive (log(y) = log(t)+log(s)+log(i)) or pseudo-additive (y = t*(s+i-1)).
The final seasonally adjusted series (sa) shall be free of seasonal and calendar-related movements.
In the X13 method, the X11 algorithm (second step) decomposes the time series by means of linear filters. More information on the method can be found on the U.S. Census Bureau website.
As regards the available predefined 'JDemetra+' X13 model specifications, they are described in the table below.
Identifier | | Log/level detection | | Outliers detection | | Calendar effects | | ARIMA |
RSA0 | | NA | | NA | | NA | | Airline(+mean) |
RSA1 | | automatic | | AO/LS/TC | | NA | | Airline(+mean) |
RSA2c | | automatic | | AO/LS/TC | | 2 td vars + Easter | | Airline(+mean) |
RSA3 | | automatic | | AO/LS/TC | | NA | | automatic |
RSA4c | | automatic | | AO/LS/TC | | 2 td vars + Easter | | automatic |
RSA5c | | automatic | | AO/LS/TC | | 7 td vars + Easter | | automatic |
X11 | | NA | | NA | | NA | | NA |
jx13
returns a jSA
object. It contains the Java objects of the result of the seasonal adjustment without any formatting. Therefore the computation is faster than with x13
. The results can the seasonal adjustment can be extract by get_indicators
.
x13
returns an object of class c("SA","X13")
, a list containing the following components:
regarima |
object of class |
decomposition |
object of class
|
final |
object of class |
diagnostics |
object of class
|
user_defined |
object of class |
Info on 'JDemetra+', usage and functions: https://ec.europa.eu/eurostat/cros/content/documentation_en
BOX G.E.P. and JENKINS G.M. (1970), "Time Series Analysis: Forecasting and Control", Holden-Day, San Francisco.
BOX G.E.P., JENKINS G.M., REINSEL G.C. and LJUNG G.M. (2015), "Time Series Analysis: Forecasting and Control", John Wiley & Sons, Hoboken, N. J., 5th edition.
myseries <- ipi_c_eu[, "FR"] mysa <- x13(myseries, spec = "RSA5c") myspec1 <- x13_spec(mysa, tradingdays.option = "WorkingDays", usrdef.outliersEnabled = TRUE, usrdef.outliersType = c("LS","AO"), usrdef.outliersDate = c("2008-10-01", "2002-01-01"), usrdef.outliersCoef = c(36, 14), transform.function = "None") mysa1 <- x13(myseries, myspec1) mysa1 summary(mysa1$regarima) myspec2 <- x13_spec(mysa, automdl.enabled =FALSE, arima.coefEnabled = TRUE, arima.p = 1, arima.q = 1, arima.bp = 0, arima.bq = 1, arima.coef = c(-0.8, -0.6, 0), arima.coefType = c(rep("Fixed", 2), "Undefined")) s_arimaCoef(myspec2) mysa2 <- x13(myseries, myspec2, userdefined = c("decomposition.d18", "decomposition.d19")) mysa2 plot(mysa2) plot(mysa2$regarima) plot(mysa2$decomposition)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.