find_outliers function

Find additive outliers

Find additive outliers

Searches for additive outliers using the method described in Appendix C of Findley et al. (1998). If the number of trigonometric variables is not specified will search automatically through the model space to identify the best number of trigonometric variables, with the lowest AIC, AICc or BIC value.

find_outliers( x, dates, out.tolerance = 3.8, my.AO.list = NULL, H = NULL, my.k_l = NULL, method = "additive" )

Arguments

  • x: Numeric vector. Time series to seasonally adjust
  • dates: a vector of class "Date", containing the data dates
  • out.tolerance: t-stat threshold for outliers (see Findley et al., 1998)
  • my.AO.list: (optional) Vector with user defined additive outlier variables
  • H: (optional) Matrix with holiday and trading day variables
  • my.k_l: (optional) Vector with the number of fourier terms to capture the yearly and monthly cycle. If NULL, would perform automatic search using AICc criterion
  • method: Decomposition method: "additive" or "multiplicative". By default uses the additive method

Returns

my.k_l

ao list of AO dates

Examples

#Not run: # Searching for additive outliers in Gasoline data data(gasoline.data) ao_list=find_outliers(x=gasoline.data$y,dates = gasoline.data$date)

References

Findley, D.F., Monsell, B.C., Bell, W.R., Otto, M.C. and B.C Chen (1998). New capabilities and methods of the X-12-ARIMA seasonal-adjustment program. Journal of Business & Economic Statistics, 16(2), pp.127-152.

  • Maintainer: Tim Ginker
  • License: MIT + file LICENSE
  • Last published: 2025-02-05