Skip to contents

Function allowing to include calendars and external regressors in a format that makes them usable in an estimation processes (seasonal adjustment or pre-processing). The regressors can be created with functions available in the package or come from any other source, provided they are ts class objects.

Usage

modelling_context(calendars = NULL, variables = NULL)

Arguments

calendars

list of calendars.

variables

list of variables.

Value

list of calendars and variables

References

More information on auxiliary variables in JDemetra+ online documentation: https://jdemetra-new-documentation.netlify.app/

Examples

# creating one or several external regressors (TS objects), which will
# be gathered in one or several groups
iv1 <- intervention_variable(12, c(2000, 1), 60,
    starts = "2001-01-01", ends = "2001-12-01"
)
iv2 <- intervention_variable(12, c(2000, 1), 60,
    starts = "2001-01-01", ends = "2001-12-01", delta = 1
)
# regressors as a list of two groups reg1 and reg2
vars <- list(reg1 = list(x = iv1), reg2 = list(x = iv2))
# creating the modelling context
my_context <- modelling_context(variables = vars)
# customize a default specification
# init_spec <- rjd3x13::x13_spec("RSA5c")
# new_spec<- add_usrdefvar(init_spec,name = "reg1.iv1", regeffect="Trend")
# modelling context is needed for the estimation phase
# sa_x13<- rjd3x13::x13(ABS$X0.2.09.10.M, new_spec, context = my_context)