为Arima模型添加漂移时的错误消息

时间:2019-05-08 15:51:28

标签: r

我正在使用R预测包来尝试拟合ARMA(2,0,0)模型。我认为漂移词会有所帮助,但是当我尝试将其包括在内时会收到一条错误消息。

我尝试在线研究错误消息,但找不到与我所遇到的事情有关的任何信息。

这是我的数据:

-6.732172338
-2.868884273
-5.371585089
-6.512740463
-4.171062657
-5.738499071
-3.343947176
-1.944879508
-5.464109272
-3.189183392
-3.684700232
-2.168303451
-2.329837082
-0.761979236
-2.189025304
1.094238807
-4.812300745
0.784198777
-1.567075922
0.143963653
1.131119051
2.899746353
-0.498719993
3.121623505

我创建了一个具有24个年度观测值的时间序列对象。我没有包括日期,因为没有每年的观测值。

tsdata<-ts(read.csv("...\\Pre2001LaunchDateTraining.csv"), start = c(1,1), end = c(24,1), frequency = 1)

然后我使用Arima()函数创建了一个新模型。

fitdata <- Arima(tsdata,c(2,0,0),include.drift = "true")

执行上述代码后,出现此错误:

Error in (order[2] + seasonal$order[2]) > 1 & include.drift: operations are possible only for numeric, logical or complex types Traceback: 1. Arima(tsdata, c(2, 0, 0), include.drift = "true")

0 个答案:

没有答案