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')"
Apparently the problem can be solved by reinstalling the packages again. There was probably a problem or inconsistency. I hope the answer can help others who may have the same problem. Thanks for the personal space. Goodbye.