I am trying to use the forecast() function in R on different ETS objects or NNTAR. I get the same error message everytime.
ets_model <- ets(trainingdata)
ets_forecast.pred <- forecast(ets_model, h=10)
I get the following error message:
"Error in UseMethod("forecast") : no applicable method for 'forecast' applied to an object of class "ets""
The same problem occurs with nntar object to neural network and I use auto.arima function:
no applicable method for 'forecast' applied to an object of class "c('forecast_ARIMA', 'ARIMA', 'Arima')"