0

I am using the forecast package and implementing auto.arima with xreg. Here I want to forecast only for 1 year ahead but I am unable to use 'h' parameter in the 'forecast function', below is the reason for that:

Defination given in manual(F1 check):

h = "Number of period of forecast but if xreg is used h is ignored and the forecast period will be number of rows"

Please suggest me an alternate way to use h for the specific period forecast.

Zuber
  • 1
  • 1
  • Possible duplicate of [ARIMA forecasting with auto.Arima() and xreg](https://stackoverflow.com/questions/34249477/arima-forecasting-with-auto-arima-and-xreg) – Simon Müller Jun 21 '19 at 12:50
  • When using `xreg` you have to use also `xreg` with future values in the `forecast` function. You find here [ARIMA forecasting with auto.Arima() and xreg](https://stackoverflow.com/questions/34249477/arima-forecasting-with-auto-arima-and-xreg) an example. – Simon Müller Jun 21 '19 at 12:52
  • Thanks @SimonMüller , your right, I was not using future values in forecast function but now its clear. – Zuber Jun 24 '19 at 14:30

0 Answers0