如何在R中以不规则间隔的时间序列拟合自动ARIMA模型以预测未来值?

时间:2016-07-22 17:37:12

标签: r time-series prediction forecasting

我们有以下数据值和时间序列标记:

Lines <- "date,time,data
 20/03/2014,07:10,9996792524
 21/04/2014,07:10,8479115468
 21/09/2014,07:10,11394750532
 16/10/2014,07:10,9594869828
 18/11/2014,07:10,10850291677
 08/12/2014,07:10,10475635302
 22/01/2015,07:10,10116010939
 26/02/2015,07:10,11206949341
 20/03/2015,07:10,11975140317
 09/04/2015,07:10,11526960332
 29/04/2015,07:10,9986194500
 16/09/2015,07:10,11501088256
 13/10/2015,07:10,11833183163
 10/11/2015,07:10,13246940910
 16/12/2015,07:10,13255698568
 27/01/2016,07:10,13775653990
 23/02/2016,07:10,13567323648
 22/03/2016,07:10,14607415705
 11/04/2016,07:10,13835444224
 04/04/2016,07:10,14118970743"

我们已使用zoo库在R中读取这些内容,如下所示:

z <- read.zoo(text = Lines, sep = ",", header = TRUE, 
              index = 1:2, tz = "", format = "%d/%m/%Y %H:%M")
plot(z)

现在我们正在尝试在此时间序列数据上使用自动ARIMA模型。但是,我们收到错误:

amar_fit <- auto.arima(z)
#Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 
#  0 (non-NA) cases

我们做错了什么?我们如何在这个不规则的时空系列中成功地拟合ARIMA(或其他)预测模型?

0 个答案:

没有答案