【问题标题】:Time Series Analysis with Arima使用 Arima 进行时间序列分析
【发布时间】:2021-09-16 20:37:14
【问题描述】:

我在尝试应用我不理解的 auto.arima 函数时遇到错误。

时间序列数据的创建:

tsData = ts(TimeSeries_Data$`1`, frequency = 12, start = c(2019,1))

时间序列数据:

> print(tsData)
      Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec
2019  773 2965 1875 2286 2387 3260 3234 2378 2930 5115 3992 2693
2020 3134 6406 2789 2097 1716 4990 1979 2915 3032 7220 6992 565

建模:

model_1 <- auto.arima(tsData, stepwise = FALSE, trace = TRUE)

错误信息:

Warning message:
The chosen seasonal unit root test encountered an error when testing for the first difference.
From stl(): series is not periodic or has less than two periods
0 seasonal differences will be used. Consider using a different unit root test. 

我不明白为什么我的时间序列数据不是周期性的或少于两个周期,因为打印的数据对我来说看起来不错。

有人可以指出我的错误方向和可能的解决方案吗?

如果我缺少回答我的问题所需的任何信息,请告诉我。

谢谢!

【问题讨论】:

    标签: r time-series arima forecast


    【解决方案1】:

    这不是错误,只是警告。根据您使用的季节性单位根检验(与stl 一样),您可能需要对每月数据进行超过 24 次观察(取决于必须估计的参数数量)。您要么必须获得 25 个观察值,要么可以尝试,例如:

    auto.arima(tsData, stepwise = FALSE, trace = TRUE, seasonal.test = "ocsb") 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-05-12
      • 1970-01-01
      • 2012-06-05
      • 1970-01-01
      • 1970-01-01
      • 2011-05-27
      相关资源
      最近更新 更多