rseasonal-adjustment

How can I specify the seasonal filter I want?


I'm trying to replicate a specification that uses a 3x9 seasonal filter. However, when I use udg() in the following object:

sa <- seas(x = ts(pib_headline_nsa_ts, start = c(2005, 1), end = c(2024,2), frequency = 4), 
arima.model="(0 1 0)(0 1 1)", x11 = "", transform.function = "log", regression.aictest = c("easter"), outlier.types = 'NULL', forecast = c(maxlead = 6, maxback = 0))

The algorithm uses a 3x5 specification. Which parameter should I change to specify a 3x9 filter instead of automatic selection? I suppose it is in the x11 parameter, but I couldnt find information in any manual.


Solution

  • You can try specifying x11.seasonalma = "S3X5" in the call:

    library(seasonal)
    
    sa <- seas(x = ts(pib_headline_nsa_ts, 
      start = c(2005, 1), 
      end = c(2024,2), 
      frequency = 4), 
      arima.model="(0 1 0)(0 1 1)", 
      x11.seasonalma = "S3X5",  ## <----------- HERE
      transform.function = "log", 
      regression.aictest = c("easter"), 
      outlier.types = 'NULL', 
      forecast = c(maxlead = 6, maxback = 0))
    

    For example, using the AirPassengers dataset:

    seas(AirPassengers, x11.seasonalma = "S3X5", arima.model = "(0 1 1)")
    Call:
    seas(x = AirPassengers, x11.seasonalma = "S3X5", arima.model = "(0 1 1)")
    
    Coefficients:
              Weekday  MA-Nonseasonal-01  
            -0.003206          -0.325804