Skip to contents

Specials used on the right-hand side of the formula of AIRLINE_DECOMPOSITION(), MSTL(), ISTL(), STLPLUS() and X11PLUS(), e.g. MSTL(y ~ period(7, 365.25) + preadjust() + holidays(cal)).

Specials

  • period(...): periodicities of the series (numeric values, possibly non-integer such as 365.25). By default they are deduced from the index of the tsibble: c(7, 365.25) for daily series, k * c(1, 7) for series with k observations per day (daily and weekly periodicities, e.g. c(48, 336) for half-hourly series: the annual periodicity, k * 365.25, must be added explicitly with period()), 365.25 / 7 for weekly series. STLPLUS() and X11PLUS() only handle one periodicity: by default the smallest one is used.

  • preadjust(outliers = c("ao", "ls", "wo"), critical_value = 6, ...): pre-adjustment of the series with rjd3highfreq::fractional_airline_estimation() (outlier detection and estimation of the regression effects). The other arguments (ndiff, ar, mean, precision, deps, approximate_hessian) are passed to this function. Use outliers = NULL to disable the outlier detection.

  • holidays(calendar, type = "Skip", nonworking = NULL, single = FALSE): holidays regressors of a national calendar created with rjd3toolkit::national_calendar(), computed with rjd3toolkit::holidays() (daily or infra-daily series only). Several holidays() can be used.

  • xreg(..., regeffect = "Irregular"): user-defined regressors taken from the columns of the tsibble. regeffect is the component to which the estimated effect is allocated: "Irregular", "Trend" or "Calendar". Variables written directly in the formula (y ~ var) are handled by xreg().

As soon as preadjust(), holidays() or xreg() is used, the series is first linearized with rjd3highfreq::fractional_airline_estimation() (with the periodicities and the transformation of the model) and the decomposition is done on the linearized series. Without preadjust(), no outlier is searched for.

Allocation of the regression effects

The effects removed by the pre-adjustment are put back in the components, following the JDemetra+ conventions:

  • level shifts (LS) are added to the trend;

  • additive outliers (AO) and switch outliers (WO) are added to the irregular;

  • holidays (and xreg(regeffect = "Calendar")) are put in a separate calendar component, which is removed from the seasonally adjusted series;

  • the other user-defined regressors are allocated according to regeffect.