Seasonal Adjustment with TRAMO-SEATS
Function to estimate the seasonally adjusted series (sa) with the TRAMO-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.
tramoseats returns a preformatted result while jtramoseats returns the Java objects of the seasonal adjustment.
jtramoseats(
series,
spec = c("RSAfull", "RSA0", "RSA1", "RSA2", "RSA3", "RSA4", "RSA5"),
userdefined = NULL
)
tramoseats(
series,
spec = c("RSAfull", "RSA0", "RSA1", "RSA2", "RSA3", "RSA4", "RSA5"),
userdefined = NULL
)series |
a univariate time series |
spec |
model specification TRAMO-SEATS. 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) or multiplicative (y = t * s * i). The final seasonally adjusted series (sa) shall be free of seasonal and calendar-related movements.
In the TRAMO-SEATS method, the second step - SEATS ("Signal Extraction in ARIMA Time Series") - performs an ARIMA-based decomposition of an observed time series into unobserved components. More information on the method can be found on the Bank of Spian website (https://www.bde.es).
As regards the available predefined 'JDemetra+' TRAMO-SEATS 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) |
| RSA2 | | automatic | | AO/LS/TC | | 2 td vars + Easter | | Airline(+mean) |
| RSA3 | | automatic | | AO/LS/TC | | NA | | automatic |
| RSA4 | | automatic | | AO/LS/TC | | 2 td vars + Easter | | automatic |
| RSA5 | | automatic | | AO/LS/TC | | 7 td vars + Easter | | automatic |
| RSAfull | | automatic | | AO/LS/TC | | automatic | | automatic |
jtramoseats 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 tramoseats. The results can the seasonal adjustment can be extract by get_indicators.
tramoseats returns an object of class c("SA","TRAMO_SEATS"), 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"]
myspec <- tramoseats_spec("RSAfull")
mysa <- tramoseats(myseries, myspec)
mysa
# Equivalent to:
mysa1 <- tramoseats(myseries, spec = "RSAfull")
mysa1
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)
myspec2 <- tramoseats_spec(myspec, tradingdays.mauto = "Unused",
tradingdays.option = "WorkingDays",
easter.type = "Standard",
automdl.enabled = FALSE, arima.mu = TRUE,
usrdef.varEnabled = TRUE, usrdef.var = var)
s_preVar(myspec2)
mysa2 <- tramoseats(myseries, myspec2,
userdefined = c("decomposition.sa_lin_f",
"decomposition.sa_lin_e"))
mysa2
plot(mysa2)
plot(mysa2$regarima)
plot(mysa2$decomposition)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.