我正在尝试运行以下代码,并且出现以下错误。该代码使用了预测包中的auto.arima来确定Arima模型并将其拟合到某些数据。它还在xreg参数中使用了回归变量。我认为xreg中的两列名称可能是问题,但我不确定为什么。列的名称类似于“ structure.c.NA..NA..211L ..”。它们是函数的输出。如果我在xreg参数中没有这些列的情况下运行auto.arima,那似乎还不错。非常感谢您提供有关解决此问题的任何技巧。
代码:
auto.arima(df2_comb[1:100,names(df2_comb)=='ECDD'], xreg = df2_comb[,names(df2_comb)!='ECDD'][1:100,names(df2_comb[,!names(df2_comb)%in%c('ECDD','order_dts')])])
错误:
Error in auto.arima(df2_comb[1:100, names(df2_comb) == "ECDD"], xreg = df2_comb[, :
xreg should be a numeric matrix or vector
数据:
dput(df2_comb[1:100,])
structure(list(ECDD = c(319.4, 319.4, 319.4, 319.4, 319.4, 319.4,
319.4, 319.4, 319.4, 319.4, 319.4, 319.4, 319.4, 319.4, 319.4,
319.4, 319.4, 319.4, 319.4, 198, 142, 254, 178, 97, 113, 116,
109, 127, 102, 99, 107, 109, 89, 101, 106, 319.4, 319.4, 319.4,
319.4, 319.4, 319.4, 319.4, 319.4, 319.4, 257, 169, 191, 115,
121, 121, 108, 110, 105, 93, 103, 93, 107, 99, 113, 319.4, 319.4,
319.4, 319.4, 319.4, 319.4, 319.4, 319.4, 319.4, 319.4, 237,
106, 108, 108, 117, 99, 105, 108, 100, 93, 88, 105, 95, 109,
319.4, 319.4, 319.4, 319.4, 319.4, 319.4, 319.4, 319.4, 192,
169, 319.4, 136, 108, 163, 136, 114, 116), order_dts = c("2017-12-31 09:00:00",
"2017-12-31 10:00:00", "2017-12-31 11:00:00", "2017-12-31 12:00:00",
"2017-12-31 13:00:00", "2017-12-31 14:00:00", "2017-12-31 15:00:00",
"2017-12-31 16:00:00", "2017-12-31 17:00:00", "2017-12-31 18:00:00",
"2017-12-31 19:00:00", "2017-12-31 20:00:00", "2017-12-31 21:00:00",
"2017-12-31 22:00:00", "2017-12-31 23:00:00", "2018-01-01 00:00:00",
"2018-01-01 01:00:00", "2018-01-01 02:00:00", "2018-01-01 03:00:00",
"2018-01-01 04:00:00", "2018-01-01 05:00:00", "2018-01-01 06:00:00",
"2018-01-01 07:00:00", "2018-01-01 08:00:00", "2018-01-01 09:00:00",
"2018-01-01 10:00:00", "2018-01-01 11:00:00", "2018-01-01 12:00:00",
"2018-01-01 13:00:00", "2018-01-01 14:00:00", "2018-01-01 15:00:00",
"2018-01-01 16:00:00", "2018-01-01 17:00:00", "2018-01-01 18:00:00",
"2018-01-01 19:00:00", "2018-01-01 20:00:00", "2018-01-01 21:00:00",
"2018-01-01 22:00:00", "2018-01-01 23:00:00", "2018-01-02 00:00:00",
"2018-01-02 01:00:00", "2018-01-02 02:00:00", "2018-01-02 03:00:00",
"2018-01-02 04:00:00", "2018-01-02 05:00:00", "2018-01-02 06:00:00",
"2018-01-02 07:00:00", "2018-01-02 08:00:00", "2018-01-02 09:00:00",
"2018-01-02 10:00:00", "2018-01-02 11:00:00", "2018-01-02 12:00:00",
"2018-01-02 13:00:00", "2018-01-02 14:00:00", "2018-01-02 15:00:00",
"2018-01-02 16:00:00", "2018-01-02 17:00:00", "2018-01-02 18:00:00",
"2018-01-02 19:00:00", "2018-01-02 20:00:00", "2018-01-02 21:00:00",
"2018-01-02 22:00:00", "2018-01-02 23:00:00", "2018-01-03 00:00:00",
"2018-01-03 01:00:00", "2018-01-03 02:00:00", "2018-01-03 03:00:00",
"2018-01-03 04:00:00", "2018-01-03 05:00:00", "2018-01-03 06:00:00",
"2018-01-03 07:00:00", "2018-01-03 08:00:00", "2018-01-03 09:00:00",
"2018-01-03 10:00:00", "2018-01-03 11:00:00", "2018-01-03 12:00:00",
"2018-01-03 13:00:00", "2018-01-03 14:00:00", "2018-01-03 15:00:00",
"2018-01-03 16:00:00", "2018-01-03 17:00:00", "2018-01-03 18:00:00",
"2018-01-03 19:00:00", "2018-01-03 20:00:00", "2018-01-03 21:00:00",
"2018-01-03 22:00:00", "2018-01-03 23:00:00", "2018-01-04 00:00:00",
"2018-01-04 01:00:00", "2018-01-04 02:00:00", "2018-01-04 03:00:00",
"2018-01-04 04:00:00", "2018-01-04 05:00:00", "2018-01-04 06:00:00",
"2018-01-04 07:00:00", "2018-01-04 08:00:00", "2018-01-04 09:00:00",
"2018-01-04 10:00:00", "2018-01-04 11:00:00", "2018-01-04 12:00:00"
), structure.c.NA..NA..211L..211L..211L..211L..211L..211L..211L.. = c(0,
0, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211,
211, 211, 211, 211, 211, 211, 211, 131, 94, 168, 117, 64, 75,
77, 72, 84, 67, 65, 71, 72, 59, 67, 70, 211, 211, 211, 211, 211,
211, 211, 211, 211, 170, 112, 126, 76, 80, 80, 71, 73, 69, 61,
68, 61, 71, 65, 75, 211, 211, 211, 211, 211, 211, 211, 211, 211,
211, 156, 70, 71, 71, 77, 65, 69, 71, 66, 61, 58, 69, 63, 72,
211, 211, 211, 211, 211, 211, 211, 211, 127, 112, 211, 90, 71,
108, 90), structure.c.NA..NA..NA..NA..48L..48L..48L..48L..48L..48L..48L.. = c(0,
0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 30, 21, 38, 27, 15, 17, 17, 16, 19, 15,
15, 16, 16, 13, 15, 16, 48, 48, 48, 48, 48, 48, 48, 48, 48, 39,
25, 29, 17, 18, 18, 16, 16, 16, 14, 15, 14, 16, 15, 17, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 36, 16, 16, 16, 18, 15, 16, 16,
15, 14, 13, 16, 14, 16, 48, 48, 48, 48, 48, 48, 48, 48, 29, 25,
48, 20, 16), S1 = c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 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0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0), S22 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 0), S23 = c(0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0)), row.names = c(NA,
100L), class = "data.frame")
答案 0 :(得分:1)
library(forecast)
## it works
auto.arima(df2_comb[1:100,names(df2_comb)=='ECDD'], xreg = as.matrix(df2_comb[,names(df2_comb)!='ECDD'][1:100,names(df2_comb[,!names(df2_comb)%in%c('ECDD','order_dts')])]))
## it fails
colnames(df2_comb)[3]<- "structure_211"
colnames(df2_comb)[4]<- "structure_48"
auto.arima(df2_comb[1:100,names(df2_comb)=='ECDD'], xreg = df2_comb[,names(df2_comb)!='ECDD'][1:100,names(df2_comb[,!names(df2_comb)%in%c('ECDD','order_dts')])])
它与名称无关,因为您可以看到是否更改了它们,但以相同的方式失败了。
但是,如果您使用xreg
as.matrix
,它应该可以解决问题!