How to convert a forecast object into a matrix? so that I can use the forecast output as a co-variate to the auto.arima function.
When I use the forecast output as one of the co-variate to my auto.arima function it throws an error- Error in forecast.forecast_ARIMA(bestfit, xreg = cbind(fourier.bestfit, :
xreg should be a numeric matrix or a numeric vector)
this is my forecast code
forecast.final<-forecast(bestfit,xreg = cbind(fourier.bestfit,forecast.1),h=30)
where the forecast.1 is the forecast object im trying to convert to a matrix in order to use that as a co-variate to my above forecast code.