Interface around 'JDemetra+' (< https://github.com/jdemetra/jdemetra-app>), the seasonal adjustment software officially recommended to the members of the European Statistical System (ESS) and the European System of Central Banks. It offers full access to all options and outputs of 'JDemetra+', including the two leading seasonal adjustment methods TRAMO/SEATS+ and X-12ARIMA/X-13ARIMA-SEATS.
RJDemetra is a R interface to JDemetra+, the seasonal adjustment software officially recommended to the members of the European Statistical System (ESS) and the European System of Central Banks. JDemetra+ implements the two leading seasonal adjustment methods TRAMO/SEATS+ and X-12ARIMA/X-13ARIMA-SEATS.
Besides seasonal adjustment, JDemetra+ bundles other time series models that are useful in the production or analysis of economic statistics, including for instance outlier detection, nowcasting, temporal disaggregation or benchmarking.
For more details on the JDemetra+ software see https://github.com/jdemetra/jdemetra-app.
RJDemetra offers full access to all options and outputs of JDemetra+.
RJDemetra relies on the rJava package and Java SE 8 or later version is required.
# Install release version from CRANinstall.packages("RJDemetra")# Install development version from GitHub# install.packages("devtools")devtools::install_github("jdemetra/rjdemetra")
To seasonally adjust a time series with a pre-defined specification you
can either use the
x13_def() function for the X-13ARIMA method or the
tramoseats_def() function for the TRAMO-SEATS method.
library(RJDemetra)myseries <- ipi_c_eu[, "FR"]x13_model <- x13_def(myseries) # X-13ARIMA methodts_model <- tramoseats_def(myseries) # TRAMO-SEATS method# Basic plot with the original series, the trend and the SA seriesplot(x13_model, type_chart = "sa-trend")
# S-I ratioplot(x13_model$decomposition)
objectargument renamed by
preliminary.checkadded to the specifications functions (
x13_spec). By default (
preliminary.check = TRUE), JDemetra+ checks 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. When
preliminary.check = FALSE, the thresholds are ignored and process is performed, when possible. (issue #39)
tradingdays.option = "UserDefinedand add new regressors variables (
usrdef.varEnabled = TRUEto enable user-defined regressors and
usrdef.varto define the regressors) using
usrdef.varType = "Calendar".
usrdef.varTypeargument is recycled with the number of variables defined in the
get_jmodel. Therefore, there is no formatting and the computation is faster than the non 'j' functions (
get_model). To manipulate these objects, there are three functions:
get_dictionaryto get the indicators that can be extracted,
get_indicatorsto extract these indicators and
jSA2Rto get the formatted R model.
x11.fcastcan now be set to 0 or 1 (issue #42)