0

我想在整个训练集上使用带有“arima”方法和回归矩阵的先前拟合的 stlm 模型,但我遇到了错误。这是一个可重现的示例:

library(forecast)
set.seed(12345)

xa <- sample(c(0,1),length(wineind),replace = T,prob = c(0.2,0.8))
xb <- sample(c(0,1),length(wineind),replace = T,prob = c(0.99,0.01))
t1 <- window(wineind, end = c(1989,12))
xa1 <- xa[1:length(t1)]
xb1 <- xb[1:length(t1)]

m1 <- stlm(t1,method = "arima",
           robust = T,
           xreg = cbind(xa1,xb1),
           lambda = "auto")

t2 <- window(wineind, end = c(1992,12))
xa2 <- xa[1:length(t2)]
xb2 <- xb[1:length(t2)]

m2 <- stlm(t2,model = m1,xreg = cbind(xa2,xb2))

错误是:“arima2(x, model, xreg = xreg, method = method) 中的错误:未提供回归量”

谁能帮我理解这一点?

4

1 回答 1

0

这是一个错误,立即解决。谢谢罗伯! github上的问题

于 2018-06-18T18:37:34.903 回答