Skip to content
Prev 201463 / 398506 Next

Subscript out of bounds

Hi!

Trying to make a forecast, and get the following error message:

Error in NextMethod("[<-") : subscript out of bounds

The script is as follows:
+ dimnames = list(c(), c("Outcome"))),
+ start = c(2006, 10), frequency = 12)
+ j <- i + 321
+ Data <- window(omxr, end = time(omxr)[j])
+ Result <- ets(Data, model = "MAM")
+ Forecast1 <- forecast(Result, 1)
+ Forecast.A[i, 2] <- window(omxr, start = time(omxr)[j +
+ 1], end = time(omxr)[j + 1])[[1]]
+ }

What am I doing wrong?

//Tobias