RegARIMA model specification, pre-adjustment in TRAMO-SEATS
Function to create (and/or modify) a c("regarima_spec","TRAMO_SEATS")
class object with the RegARIMA model specification for the TRAMO-SEATS method. The object can be created from a predefined 'JDemetra+' model specification (a character
), a previous specification (c("regarima_spec","TRAMO_SEATS")
object) or a TRAMO-SEATS RegARIMA model (c("regarima","TRAMO_SEATS")
).
regarima_spec_tramoseats( spec = c("TRfull", "TR0", "TR1", "TR2", "TR3", "TR4", "TR5"), preliminary.check = NA, estimate.from = NA_character_, estimate.to = NA_character_, estimate.first = NA_integer_, estimate.last = NA_integer_, estimate.exclFirst = NA_integer_, estimate.exclLast = NA_integer_, estimate.tol = NA_integer_, estimate.eml = NA, estimate.urfinal = NA_integer_, transform.function = c(NA, "Auto", "None", "Log"), transform.fct = NA_integer_, usrdef.outliersEnabled = NA, usrdef.outliersType = NA, usrdef.outliersDate = NA, usrdef.outliersCoef = NA, usrdef.varEnabled = NA, usrdef.var = NA, usrdef.varType = NA, usrdef.varCoef = NA, tradingdays.mauto = c(NA, "Unused", "FTest", "WaldTest"), tradingdays.pftd = NA_integer_, tradingdays.option = c(NA, "TradingDays", "WorkingDays", "UserDefined", "None"), tradingdays.leapyear = NA, tradingdays.stocktd = NA_integer_, tradingdays.test = c(NA, "Separate_T", "Joint_F", "None"), easter.type = c(NA, "Unused", "Standard", "IncludeEaster", "IncludeEasterMonday"), easter.julian = NA, easter.duration = NA_integer_, easter.test = NA, outlier.enabled = NA, outlier.from = NA_character_, outlier.to = NA_character_, outlier.first = NA_integer_, outlier.last = NA_integer_, outlier.exclFirst = NA_integer_, outlier.exclLast = NA_integer_, outlier.ao = NA, outlier.tc = NA, outlier.ls = NA, outlier.so = NA, outlier.usedefcv = NA, outlier.cv = NA_integer_, outlier.eml = NA, outlier.tcrate = NA_integer_, automdl.enabled = NA, automdl.acceptdefault = NA, automdl.cancel = NA_integer_, automdl.ub1 = NA_integer_, automdl.ub2 = NA_integer_, automdl.armalimit = NA_integer_, automdl.reducecv = NA_integer_, automdl.ljungboxlimit = NA_integer_, automdl.compare = NA, arima.mu = NA, arima.p = NA_integer_, arima.d = NA_integer_, arima.q = NA_integer_, arima.bp = NA_integer_, arima.bd = NA_integer_, arima.bq = NA_integer_, arima.coefEnabled = NA, arima.coef = NA, arima.coefType = NA, fcst.horizon = NA_integer_ )
spec |
model specification. It can be a |
preliminary.check |
boolean to check the quality of the input series and exclude highly problematic ones: e.g. these with a number of identical observations and/or missing values above pre-specified threshold values. The time span of the series to be used for the estimation of the RegArima model coefficients (default from 1900-01-01 to 2020-12-31) is controlled by the following six variables: |
estimate.from |
character in format "YYYY-MM-DD" indicating the start of the time span (e.g. "1900-01-01"). Can be combined with |
estimate.to |
character in format "YYYY-MM-DD" indicating the end of the time span (e.g. "2020-12-31"). Can be combined with |
estimate.first |
numeric specifying the number of periods considered at the beginning of the series. |
estimate.last |
numeric specifying the number of periods considered at the end of the series. |
estimate.exclFirst |
numeric specifying the number of periods excluded at the beginning of the series. Can be combined with |
estimate.exclLast |
numeric specifying the number of periods excluded at the end of the series. Can be combined with |
estimate.tol |
numeric, convergence tolerance. The absolute changes in the log-likelihood function are compared to this value to check for the convergence of the estimation iterations. |
estimate.eml |
logicals, exact maximum likelihood estimation. If |
estimate.urfinal |
numeric, final unit root limit. The threshold value for the final unit root test for identification of differencing orders. If the magnitude of an AR root for the final model is less than this number, a unit root is assumed, the order of the AR polynomial is reduced by one, and the appropriate order of the differencing (non-seasonal, seasonal) is increased. |
transform.function |
transformation of the input series: |
transform.fct |
numeric controlling the bias in the log/level pre-test: Control variables for the pre-specified outliers. The pre-specified outliers are used in the model only if they are enabled ( |
usrdef.outliersEnabled |
logicals. If |
usrdef.outliersType |
vector defining the outliers' type. Possible types are: |
usrdef.outliersDate |
vector defining the outliers' date. The dates should be characters in format "YYYY-MM-DD". E.g.: |
usrdef.outliersCoef |
vector providing fixed coefficients for the outliers. The coefficients can't be fixed if Control variables for the user-defined variables: |
usrdef.varEnabled |
logicals. If |
usrdef.var |
time series ( |
usrdef.varType |
vector of character(s) defining the user-defined variables component type. Possible types are: |
usrdef.varCoef |
vector providing fixed coefficients for the user-defined variables. The coefficients can't be fixed if |
tradingdays.mauto |
defines whether the calendar effects should be added to the model manually ( |
tradingdays.pftd |
numeric. P-value applied in the test specified by the automatic parameter ( Control variables for the manual selection of calendar effects variables ( |
tradingdays.option |
defines the type of the trading days regression variables: |
tradingdays.leapyear |
logicals. Specifies if the leap-year correction should be included. If |
tradingdays.stocktd |
numeric indicating the day of the month when inventories and other stock are reported (to denote the last day of the month set the variable to 31). Modifications of this variable are taken into account only when |
tradingdays.test |
defines the pre-tests of the trading day effects: |
easter.type |
specifies the presence and the length of the Easter effect: |
easter.julian |
logicals. If |
easter.duration |
numeric indicating the duration of the Easter effect (length in days, between 1 and 15). |
easter.test |
logicals. If |
outlier.enabled |
logicals. If The time span of the series to be searched for outliers (default from 1900-01-01 to 2020-12-31) is controlled by the following six variables: |
outlier.from |
character in format "YYYY-MM-DD" indicating the start of the time span (e.g. "1900-01-01"). Can be combined with |
outlier.to |
character in format "YYYY-MM-DD" indicating the end of the time span (e.g. "2020-12-31"). Can be combined with |
outlier.first |
numeric specifying the number of periods considered at the beginning of the series. |
outlier.last |
numeric specifying the number of periods considered at the end of the series. |
outlier.exclFirst |
numeric specifying the number of periods excluded at the beginning of the series. Can be combined with |
outlier.exclLast |
numeric specifying the number of periods excluded at the end of the series. Can be combined with |
outlier.ao |
logicals. If |
outlier.tc |
logicals. If |
outlier.ls |
logicals. If |
outlier.so |
logicals. If |
outlier.usedefcv |
logicals. If |
outlier.cv |
numeric. Inputted critical value for the outliers' detection procedure. The modification of this variable is taken in to account only when |
outlier.eml |
logicals, exact likelihood estimation method.Controls the method applied for a parameter estimation in the intermediate steps of the automatic detection and correction of outliers. If |
outlier.tcrate |
numeric. The rate of decay for the transitory change outlier. |
automdl.enabled |
logicals. If Control variables for the automatic modelling of the ARIMA model ( |
automdl.acceptdefault |
logicals. If |
automdl.cancel |
numeric, cancelation limit. If the difference in moduli of an AR and an MA roots (when estimating ARIMA(1,0,1)(1,0,1) models in the second step of the automatic identification of the differencing orders) is smaller than cancelation limit, the two roots are assumed equal and cancel out. |
automdl.ub1 |
numeric, first unit root limit. It is the threshold value for the initial unit root test in the automatic differencing procedure. When one of the roots in the estimation of the ARIMA(2,0,0)(1,0,0) plus mean model, performed in the first step of the automatic model identification procedure, is larger than first unit root limit in modulus, it is set equal to unity. |
automdl.ub2 |
numeric, second unit root limit. When one of the roots in the estimation of the ARIMA(1,0,1)(1,0,1) plus mean model, which is performed in the second step of the automatic model identification procedure, is larger than second unit root limit in modulus, it is checked if there is a common factor in the corresponding AR and MA polynomials of the ARMA model that can be cancelled (see |
automdl.armalimit |
numeric, arma limit. It is the threshold value for t-statistics of ARMA coefficients and constant term used for the final test of model parsimony. If the highest order ARMA coefficient has a t-value less than this value in magnitude, the order of the model is reduced. Also if the constant term has a t-value less than arma limit in magnitude, it is removed from the set of regressors. |
automdl.reducecv |
numeric, ReduceCV. The percentage by which the outlier's critical value will be reduced when an identified model is found to have a Ljung-Box statistic with an unacceptable confidence coefficient. The parameter should be between 0 and 1, and will only be active when automatic outlier identification is enabled. The reduced critical value will be set to (1-ReduceCV)xCV, where CV is the original critical value. |
automdl.ljungboxlimit |
numeric, Ljung Box limit. Acceptance criterion for the confidence intervals of the Ljung-Box Q statistic. If the LjungBox Q statistics for the residuals of a final model is greater than Ljung Box limit, the model is rejected, the outlier critical value is reduced, and model and outlier identification (if specified) is redone with a reduced value. |
automdl.compare |
logicals. If TRUE the program compares the model identified by the automatic procedure to the default model (ARIMA(0,1,1)(0,1,1)) and the model with the best fit is selected. Criteria considered are residual diagnostics, the model structure and the number of outliers. Control variables for the non-automatic modelling of the ARIMA model ( |
arima.mu |
logicals. If |
arima.p |
numeric. The order of the non-seasonal autoregressive (AR) polynomial. |
arima.d |
numeric. Regular differencing order. |
arima.q |
numeric. The order of the non-seasonal moving average (MA) polynomial. |
arima.bp |
numeric. The order of the seasonal autoregressive (AR) polynomial. |
arima.bd |
numeric. Seasonal differencing order. |
arima.bq |
numeric. The order of the seasonal moving average (MA) polynomial. Control variables for the user-defined ARMA coefficients. Coefficients can be defined for the regular and seasonal autoregressive (AR) polynomials and moving average (MA) polynomials. The model considers the coefficients only if the procedure for their estimation ( |
arima.coefEnabled |
logicals. If |
arima.coef |
vector providing the coefficients for the regular and seasonal AR and MA polynominals. The length of the vector must equal the sum of the regular and seasonal AR and MA orders. The coefficients shall be provided in the order: regular AR (Phi - |
arima.coefType |
vector defining ARMA coefficients estimation procedure. Possible procedures are: |
fcst.horizon |
numeric, forecasts horizon. Length of the forecasts generated by the RegARIMA model in periods (positive values) or years (negative values). By default the program generates two years forecasts ( |
The available predefined 'JDemetra+' model specifications are described in the table below.
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 |
A list of class c("regarima_spec","TRAMO_SEATS")
with the below components. Each component refers to different part of the RegARIMA model specification, mirroring the arguments of the function (for details see arguments description). Each of the lowest-level component (except span, pre-specified outliers, user-defined variables and pre-specified ARMA coefficients) is structured within a data frame with columns denoting different variables of the model specification and rows referring to: first row - base specification, as provided within the argument spec
; second row - user modifications as specified by the remaining arguments of the function (e.g.: arima.d
); and third row - final model specification, values that will be used in the function regarima
. The final specification (third row) shall include user modifications (row two) unless they were wrongly specified. The pre-specified outliers, user-defined variables and pre-specified ARMA coefficients consist of a list with the Predefined
(base model specification) and Final
values.
estimate |
data frame. Variables referring to: |
transform |
data frame. Variables referring to: |
regression |
list including the information on the user-defined variables ( |
outliers |
data frame. Variables referring to:
|
arima |
list containing a data frame with the ARIMA settings ( |
forecast |
data frame with the forecast horizon (argument |
span |
matrix containing the final time span for the model estimation and outliers' detection. Contains the same information as the variable span in the data frames estimate and outliers.The matrix can be also accessed with the function |
Info on 'JDemetra+', usage and functions: https://ec.europa.eu/eurostat/cros/content/documentation_en
myseries <- ipi_c_eu[, "FR"] myspec1 <- regarima_spec_tramoseats(spec = "TRfull") myreg1 <- regarima(myseries, spec = myspec1) # Modify a pre-specified model specification myspec2 <- regarima_spec_tramoseats(spec = "TRfull", tradingdays.mauto = "Unused", tradingdays.option = "WorkingDays", easter.type = "Standard", automdl.enabled = FALSE, arima.mu = TRUE) myreg2 <- regarima(myseries, spec = myspec2) # Modify the model specification from a "regarima" object myspec3 <- regarima_spec_tramoseats(myreg1, tradingdays.mauto = "Unused", tradingdays.option = "WorkingDays", easter.type = "Standard", automdl.enabled = FALSE, arima.mu = TRUE) myreg3 <- regarima(myseries, myspec3) # Modify the model specification from a "regarima_spec" object myspec4 <- regarima_spec_tramoseats(myspec1, tradingdays.mauto = "Unused", tradingdays.option = "WorkingDays", easter.type = "Standard", automdl.enabled = FALSE, arima.mu = TRUE) myreg4 <- regarima(myseries, myspec4) # Pre-specified outliers myspec1 <- regarima_spec_tramoseats(spec = "TRfull", usrdef.outliersEnabled = TRUE, usrdef.outliersType = c("LS", "LS"), usrdef.outliersDate = c("2008-10-01" ,"2003-01-01"), usrdef.outliersCoef = c(10, -8), transform.function = "None") s_preOut(myspec1) myreg1 <- regarima(myseries, myspec1) myreg1 s_preOut(myreg1) # User-defined variables 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) myspec1 <- regarima_spec_tramoseats(spec = "TRfull", usrdef.varEnabled = TRUE, usrdef.var = var) s_preVar(myspec1) myreg1 <- regarima(myseries,myspec1) myspec2 <- regarima_spec_tramoseats(spec = "TRfull", usrdef.varEnabled = TRUE, usrdef.var = var, usrdef.varCoef = c(17,-1), transform.function = "None") myreg2 <- regarima(myseries, myspec2) # Pre-specified ARMA coefficients myspec1 <- regarima_spec_tramoseats(spec = "TRfull", arima.coefEnabled = TRUE, automdl.enabled = FALSE, arima.p = 2, arima.q = 0, arima.bp = 1, arima.bq = 1, arima.coef = c(-0.12, -0.12, -0.3, -0.99), arima.coefType = rep("Fixed", 4)) myreg1 <- regarima(myseries, myspec1) myreg1 summary(myreg1) s_arimaCoef(myspec1) s_arimaCoef(myreg1)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.