Skip to contents

Set X-11 Specification

Usage

set_x11(
  x,
  mode = c(NA, "Undefined", "Additive", "Multiplicative", "LogAdditive",
    "PseudoAdditive"),
  seasonal.comp = NA,
  seasonal.filter = NA,
  henderson.filter = NA,
  lsigma = NA,
  usigma = NA,
  fcasts = NA,
  bcasts = NA,
  calendar.sigma = c(NA, "None", "Signif", "All", "Select"),
  sigma.vector = NA,
  exclude.forecast = NA,
  bias = c(NA, "LEGACY")
)

Arguments

x

the specification to be modified, object of class "JD3_X11_SPEC", default X11 spec can be obtained as 'x=x11_spec()'

mode

character: the decomposition mode. Determines the mode of the seasonal adjustment decomposition to be performed: "Undefined" - no assumption concerning the relationship between the time series components is made; "Additive" - assumes an additive relationship; "Multiplicative" - assumes a multiplicative relationship; "LogAdditive" - performs an additive decomposition of the logarithms of the series being adjusted; "PseudoAdditive" - assumes an pseudo-additive relationship. Could be changed by the program, if needed.

seasonal.comp

logical: if TRUE, the program computes a seasonal component. Otherwise, the seasonal component is not estimated and its values are all set to 0 (additive decomposition) or 1 (multiplicative decomposition).

seasonal.filter

a vector of character(s) specifying which seasonal moving average (i.e. seasonal filter) will be used to estimate the seasonal factors for the entire series. The vector can be of length: 1 - the same seasonal filter is used for all periods (e.g.: seasonal.filter = "Msr" or seasonal.filter = "S3X3" ); or have a different value for each quarter (length 4) or each month (length 12) - (e.g. for quarterly series: seasonal.filter = c("S3X3", "Msr", "S3X3", "Msr")). Possible filters are: "Msr", "Stable", "X11Default", "S3X1", "S3X3", "S3X5", "S3X9", "S3X15". "Msr" - the program chooses the final seasonal filter automatically.

henderson.filter

numeric: the length of the Henderson filter (odd number between 3 and 101). If henderson.filter = 0 an automatic selection of the Henderson filter's length for the trend estimation is enabled.

lsigma

numeric: the lower sigma boundary for the detection of extreme values, > 0.5, default=1.5.

usigma

numeric: the upper sigma boundary for the detection of extreme values, > lsigma, default=2.5.

bcasts, fcasts

numeric: the number of backasts (bcasts) or forecasts (fcasts) generated by the RegARIMA model in periods (positive values) or years (negative values).Default values: fcasts=-1 and bcasts=0.

calendar.sigma

character to specify if the standard errors used for extreme values detection and adjustment are computed: from 5 year spans of irregulars ("None", default value); separately for each calendar period ("All"); separately for each period only if Cochran's hypothesis test determines that the irregular component is heteroskedastic by calendar month/quarter ("Signif"); separately for two complementary sets of calendar months/quarters specified by the x11.sigmaVector parameter ("Select", see parameter sigma.vector).

sigma.vector

a vector to specify one of the two groups of periods for which standard errors used for extreme values detection and adjustment will be computed separately. Only used if calendar.sigma = "Select". Possible values are: 1 or 2.

exclude.forecast

Boolean to exclude forecasts and backcasts. If TRUE, the RegARIMA model forecasts and backcasts are not used during the detection of extreme values in the seasonal adjustment routines. Default = FALSE.

bias

TODO.

Value

a "JD3_X11_SPEC" object, containing all the parameters.

See also

Examples

init_spec <- x11_spec()
new_spec <- set_x11(init_spec,
    mode = "LogAdditive",
    seasonal.comp = 1,
    seasonal.filter = "S3X9",
    henderson.filter = 7,
    lsigma = 1.7,
    usigma = 2.7,
    fcasts = -1,
    bcasts = -1,
    calendar.sigma = "All",
    sigma.vector = NA,
    exclude.forecast = FALSE,
    bias = "LEGACY"
)