RegARIMA model, pre-adjustment in X13 and TRAMO-SEATS
regarima/regarima_x13/regarima_tramoseats
decomposes the time series in a linear deterministic component and in a stochastic component. The deterministic part of the series can contain outliers, calendar effects and regression effects. The stochastic part is defined by a seasonal multiplicative ARIMA model, as discussed by BOX, G.E.P., and JENKINS, G.M. (1970).
jregarima/jregarima_x13/jregarima_tramoseats
does the same computation but returns the Java objects without formatting the output
jregarima(series, spec = NA) jregarima_tramoseats( series, spec = c("TRfull", "TR0", "TR1", "TR2", "TR3", "TR4", "TR5") ) jregarima_x13(series, spec = c("RG5c", "RG0", "RG1", "RG2c", "RG3", "RG4c")) regarima(series, spec = NA) regarima_tramoseats( series, spec = c("TRfull", "TR0", "TR1", "TR2", "TR3", "TR4", "TR5") ) regarima_x13(series, spec = c("RG5c", "RG0", "RG1", "RG2c", "RG3", "RG4c"))
series |
a univariate time series |
spec |
model specification. For the function:
|
In the X13 and TRAMO-SEATS seasonal adjustment the first step consists of pre-adjusting the original series with a RegARIMA model, where the original series is corrected for any deterministic effects and missing observations. This step is also referred as linearization of the original series.
The RegARIMA model (model with ARIMA errors) is specified as below.
z_t=y_tβ+x_t
where:
z_t - is the original series;
β = (β_1,...,β_n) - a vector of regression coefficients;
y_t = (y_{1t},...,y_{nt}) - n regression variables (outliers, calendar effects, user-defined variables);
x_t - a disturbance that follows the general ARIMA process: φ(B)δ(B)x_t=θ(B)a_t; φ(B), δ(B) and θ(B) are the finite polynomials in B; a_t is a white-noise variable with zero mean and a constant variance.
The polynomial φ(B) is a stationary autoregressive (AR) polynomial in B, which is a product of the stationary regular AR polynomial in B and the stationary seasonal polynomial in B^s:
φ(B)=φ_p(B)Φ_{bp}(B^s)=(1+φ_1B+...+φ_pB^p)(1+Φ_1B^s+...+Φ_{bp}B^{bps})
where:
p - number of regular AR terms (here and in 'JDemetra+' p ≤ 3);
bp - number of seasonal AR terms (here and in 'JDemetra+' bp ≤ 1);
s - number of observations per year (frequency of the time series).
The polynomial θ(B) is an invertible moving average (MA) polynomial in B, which is a product of the invertible regular MA polynomial in B and the invertible seasonal MA polynomial in B^s:
θ(B)=θ_q(B)Θ_{bq}(B^s)=(1+θ_1B+...+θ_qB^q)(1+Θ_1B^s+...+Θ_{bq}B^{bqs})
where:
q - number of regular MA terms (here and in 'JDemetra+' q ≤ 3);
bq - number of seasonal MA terms (here and in 'JDemetra+' bq ≤ 1);
The polynomial δ(B) is the non-stationary AR polynomial in B (unit roots):
δ(B)=(1-B)^d(1-B^s)^{d_s}
where:
d - regular differencing order (here and in 'JDemetra+' d ≤ 1);
d_s - seasonal differencing order (here and in 'JDemetra+' d_s ≤ 1);
Notations used for AR and MA processes, model denoted as ARIMA (P,D,Q)(BP,BD,BQ), are consistent with those in 'JDemetra+'.
As regards the available predefined 'JDemetra+' X13 and TRAMO-SEATS model specifications, they are described in the tables below.
X13:
Identifier | | Log/level detection | | Outliers detection | | Calendar effects | | ARIMA |
RG0 | | NA | | NA | | NA | | Airline(+mean) |
RG1 | | automatic | | AO/LS/TC | | NA | | Airline(+mean) |
RG2c | | automatic | | AO/LS/TC | | 2 td vars + Easter | | Airline(+mean) |
RG3 | | automatic | | AO/LS/TC | | NA | | automatic |
RG4c | | automatic | | AO/LS/TC | | 2 td vars + Easter | | automatic |
RG5c | | automatic | | AO/LS/TC | | 7 td vars + Easter | | automatic |
TRAMO-SEATS:
Identifier | | Log/level detection | | Outliers detection | | Calendar effects | | ARIMA |
TR0 | | NA | | NA | | NA | | Airline(+mean) |
TR1 | | automatic | | AO/LS/TC | | NA | | Airline(+mean) |
TR2 | | automatic | | AO/LS/TC | | 2 td vars + Easter | | Airline(+mean) |
TR3 | | automatic | | AO/LS/TC | | NA | | automatic |
TR4 | | automatic | | AO/LS/TC | | 2 td vars + Easter | | automatic |
TR5 | | automatic | | AO/LS/TC | | 7 td vars + Easter | | automatic |
TRfull | | automatic | | AO/LS/TC | | automatic | | automatic |
jregarima/jregarima_x13/jregarima_tramoseats
return a jSA
object. It contains the Java objects of the result of the preadjustment method without any formatting. Therefore the computation is faster than with regarima/regarima_x13/regarima_tramoseats
. The results can the seasonal adjustment can be extract by get_indicators
.
regarima/regarima_x13/regarima_tramoseats
return an object of class "regarima"
and sub-class "X13"
or "TRAMO_SEATS"
. regarima_x13
returns an object of class c("regarima","X13")
and regarima_tramoseats
an object of class c("regarima","TRAMO_SEATS")
.
For the function regarima
, the sub-class of the object depends on the used method that is defined by the class of the spec
object.
An object of class "regarima"
is a list containing the following components:
specification |
list with the model specification as defined by the |
arma |
vector with the orders of the autoregressive (AR), moving average (MA), seasonal AR and seasonal MA processes, as well as with the regular and seasonal differencing orders (P,D,Q) (BP,BD,BQ). |
arima.coefficients |
matrix with the regular and seasonal AR and MA coefficients. The matrix contains the estimated coefficients, standard errors and t-statistics values. The estimated coefficients can be also extracted with the function |
regression.coefficients |
matrix with the regression variables (i.e.: mean, calendar effect, outliers and user-defined regressors) coefficients. The matrix contains the estimated coefficients, standard errors and t-statistics values. The estimated coefficients can be also extracted with the function |
loglik |
matrix containing the log-likelihood of the RegARIMA model as well as the associated model selection criteria statistics (AIC, AICC, BIC and BICC) and parameters ( |
model |
list containing the information on the model specification after its estimation ( |
residuals |
the residuals (time series). They can be also extracted with the function |
residuals.stat |
List containing statistics on the RegARIMA residuals. It provides residuals standard error ( |
forecast |
ts matrix containing the forecast of the original series ( |
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.
# X13 method myseries <- ipi_c_eu[, "FR"] myreg <- regarima_x13(myseries, spec ="RG5c") summary(myreg) plot(myreg) myspec1 <- regarima_spec_x13(myreg, tradingdays.option = "WorkingDays") myreg1 <- regarima(myseries, myspec1) myspec2 <- regarima_spec_x13(myreg, 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") myreg2 <- regarima(myseries, myspec2) myreg2 myspec3 <- regarima_spec_x13(myreg, automdl.enabled = FALSE, arima.p = 1, arima.q = 1, arima.bp = 0, arima.bq = 1, arima.coefEnabled = TRUE, arima.coef = c(-0.8, -0.6, 0), arima.coefType = c(rep("Fixed", 2), "Undefined")) s_arimaCoef(myspec3) myreg3 <- regarima(myseries, myspec3) summary(myreg3) plot(myreg3) # TRAMO-SEATS method myspec <- regarima_spec_tramoseats("TRfull") myreg <- regarima(myseries, myspec) myreg myspec2 <- regarima_spec_tramoseats(myspec, tradingdays.mauto = "Unused", tradingdays.option = "WorkingDays", easter.type = "Standard", automdl.enabled = FALSE, arima.mu = TRUE) myreg2 <- regarima(myseries, myspec2) var1 <- ts(rnorm(length(myseries))*10, start = start(myseries), frequency = 12) var2 <- ts(rnorm(length(myseries))*100, start = start(myseries), frequency = 12) var <- ts.union(var1, var2) myspec3 <- regarima_spec_tramoseats(myspec, usrdef.varEnabled = TRUE, usrdef.var = var) s_preVar(myspec3) myreg3 <- regarima(myseries, myspec3) myreg3
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.