ellisp / forecastxgb-r-package

An R package for time series models and forecasts with xgboost compatible with {forecast} S3 classes
GNU General Public License v3.0
140 stars 42 forks source link

fails when maxlag = 1 #15

Closed ellisp closed 7 years ago

ellisp commented 7 years ago

test case:

library(Mcomp)
thedata <- M1[[1]]
mod <- xgbts(thedata$x, maxlag = 1, nrounds_method = "cv")
fc <- forecast(mod, h = thedata$h)

error is in forecast.xgbts:

Error in `colnames<-`(`*tmp*`, value = c("lag1", "time")) : 
  length of 'dimnames' [2] not equal to array extent