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)