James Taylor
James Taylor

Reputation: 494

Forecast in R - auto.arima with external regressors

Further to this discussion regarding fitting arima model using external regressors.

From Auto.arima to forecast in R

I was able to forecast perfectly for next 5 months given that I had future values for the predictors explaining my response variable (churn_rate).

arima_model_churn_rate <- auto.arima(tsm_churn_rate, stepwise = FALSE,
                                 approximation = FALSE, 
                                 xreg = xreg_in_out_p_month_1)


number_of_future_month <- 5
forecast_churn_rate <- forecast (arima_model_churn_rate,
                             xreg = xreg_fut_in_out_p_month_churn_rate, 
                             h = number_of_future_month)
plot(forecast_churn_rate)

I am kind of confused with this whole scenario as discussed in the blog. For arima model with external regressor we need future values. Its perfectly worked for example case where I just trained my model on 2 years data and I used next 5 months measurements for predictors as future value.

But what If I want to predict for future 3/6/ or even year and If I have to wait for future values then I am already in that time point. Then prediction does not make any sense.

Can someone explain this whole concept to me please. Sorry if I could not explain this whole scenario really well. I tried my level best to get around though.

Thanks in advance !!

enter image description here

Upvotes: 0

Views: 3485

Answers (1)

Rob Hyndman
Rob Hyndman

Reputation: 31800

If you don't have values for your future predictors, then you need to either forecast them first, or use a different model.

You could try a model without those predictors, or you could include lagged values of the predictors where the lag is at least as long as the forecast horizon.

Upvotes: 2

Related Questions