I am working on time series forecasting of monthly averaged rainfall data (from a rainfall subdivision in India) using ARIMA methodology in R. But, in order to improve the forecast result, I want to include the (time series) data from El Niño Sea Surface Temperature (SST) data as an exogenous input in ARIMA model. Currently, I have the SST time series data with me, but I'm struggling with how to incorporate these data inputs as "xreg" in my ARIMA model i.e can I directly use the SST anomaly data values in "xreg"?

This is my data:-

    ts.rain1 <- ts(RData$Rainfall, frequency = 12, start = c(1950,1))
    ts.nino <- ts(NData$SST, frequency = 12, start = c(1949,1))

Training and Test sets:-

    data.train <- window(ts.rain1, start = c(1950,1), end = c(1995,12))
    data.test <- window(ts.rain1, start = c(1996,1))
    ninodata.train <- window(ts.nino, start = c(1949,4), end = c(1995,3))
    ninodata.test <- window(ts.nino, start = c(1995,4))

And the arima code:-

    arima2 <- Arima(data.train, order = c(4,0,4), seasonal = list(order = c(2,0,1)), xreg = ninodata.train)

Yes, you can do that. If you simply feed the data into xreg, then Arima() will fit a regression on your predictor with ARIMA errors. (This is not an ARIMAX model. See here.)

I would recommend that you use auto.arima() from the forecast package, which will try to automatically find the best model. An ARMA(4,4) model looks rather large to me.

We have quite a few related threads here at CV. I'd recommend you browse through them.

  • $\begingroup$ Hello Sir, can you please explain to me what is "fit a regression on your predictor with ARIMA errors". $\endgroup$ – Karan Chaudhary Mar 19 '18 at 14:34
  • 1
    $\begingroup$ Arima() will fit a regression of your dependent variable on the predictor(s) you feed into xreg. After that, it will fit an ARIMA model to the residuals of the regression. $\endgroup$ – Stephan Kolassa Mar 19 '18 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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