5
$\begingroup$

I'm trying to do multivariate time series forecasting using the forecast package in R. The data set contains one dependent and independent variable. From the cross-correlation the 0 day lag of the independent variable seems to have better correlation with dependent variable.

But I need some clarification on which function I should use - auto.arima with xreg or arimax.

  1. While using auto.arima to predict the dependent variable by using independent Variable as the xreg parameter in the auto.arima function,Do we need to have xreg values in place already for the forecast periods?

  2. Or Can we use arimax to predict the dependent variable along with a covariate even if there are no values available for the covariate on the forecast periods.

$\endgroup$

1 Answer 1

4
$\begingroup$

You need the future values of the covariate to make ARIMAX (or perhaps regression with ARIMA errors – see The ARIMAX model muddle by Rob J Hyndman) feasible. If you do not have these values, you may need to forecast them. This could be done separately or jointly with the dependent variable. In the latter case, a multivariate time series model such as VAR (vector autoregression) could be used.

$\endgroup$
4
  • $\begingroup$ Thank you Richard for the answer.. So you are suggesting I should get the future values of the independent variable using ARIMA or VAR and then use that again as a regressor to the ARIMAX or auto.arima(with xreg) to predict the dependent variable? $\endgroup$ Nov 18, 2021 at 10:08
  • $\begingroup$ @ArvindMenon, no, it is either or. Either use ARIMA for the exogenous regressor followed by auto.arima (for the dependent variable) with xreg (the forecasts of the regressor). Or use VAR for forecasting both variables simultaneously (no need for auto.arima with xreg then). $\endgroup$ Nov 18, 2021 at 10:18
  • $\begingroup$ Thank you Richard. I go with the first approach since the co-relation is not both ways i would restrain myself from using VAR. $\endgroup$ Nov 18, 2021 at 10:46
  • $\begingroup$ @ArvindMenon, you are welcome. Good luck! $\endgroup$ Nov 18, 2021 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.