Is there a way to force seasonality from auto.arima

后端 未结 1 1957
梦毁少年i
梦毁少年i 2021-01-02 10:59

With the forecast package, I have a time series that I would like ?auto.arima to automatically pick the orders but I would like to coerce seasonali

相关标签:
1条回答
  • 2021-01-02 11:52

    You can set the D parameter, which governs seasonal differencing, to a value greater than zero. (The default NA allows auto.arima() to use or not use seasonality.) For example:

    > set.seed(1)
    > foo <- ts(rnorm(60),frequency=12)
    > auto.arima(foo)
    Series: foo 
    ARIMA(0,0,0) with zero mean     
    
    sigma^2 estimated as 0.7307:  log likelihood=-75.72
    AIC=153.45   AICc=153.52   BIC=155.54
    > auto.arima(foo,D=1)
    Series: foo 
    ARIMA(0,0,0)(1,1,0)[12]                    
    
    Coefficients:
             sar1
          -0.3902
    s.e.   0.1478
    
    sigma^2 estimated as 1.139:  log likelihood=-72.23
    AIC=148.46   AICc=148.73   BIC=152.21
    
    0 讨论(0)
提交回复
热议问题