*2.7. Diagnostic Checking*

The final step in the development of model is diagnosing the ARIMA model. It is one of the significant steps of model development it point towards the appropriateness of model that inspects the assumptions of model unquestionably. The acceptability or appropriateness of model guarantees that the time series is in the time with model assumptions and that the prophecy of values is well founded. To examine the correlation of residuals with error terms, various diagnostic statistics and plots of residuals have been inspected to make it sure that whether these residuals correspond with error terms or not.

$$\text{MAE} = \frac{1}{N} \sum\_{i=1}^{N} |(X\_m)\_i - (X\_s)\_i| \tag{7}$$

$$\text{RMSE} = \sqrt{\frac{1}{N} \sum\_{i=1}^{N} [(X\_m)\_i - (X\_s)\_i]^2} \tag{8}$$

where *N* is the number of forecasting events, *Xm* the observed SPEI and *Xs* the predicted SPEI [49].

$$\text{MAE} = \frac{1}{N} \sum\_{i=1}^{N} |\mathbf{x}\_i - \mathbf{\hat{x}}\_i| \tag{9}$$

$$\text{MPE} = \frac{100\%}{N} \sum\_{i=1}^{N} \left( \frac{\mathbf{x}\_i - \mathbf{x}\_i}{\mathbf{x}\_i} \right) \tag{10}$$

$$\text{MAPE} = \frac{100\%}{N} \sum\_{i=1}^{N} \left| \frac{\mathbf{x}\_i - \hat{\mathbf{x}}\_i}{\mathbf{x}\_i} \right| \tag{11}$$

$$\text{MSE} = \frac{1}{N} \sum\_{i=1}^{N} |\mathbf{x}\_i - \mathbf{\hat{x}}\_i|^2 \tag{12}$$

where <sup>1</sup> *N N* ∑ *i*=1 is test set, *xi* predicted value and *x*ˆ*<sup>i</sup>* is actual value. (*N* is the number of total data points).

In this research, all of the SPEI forecasting ARIMA models have been developed using the forecasting packages already available in R-programming language. Packages used are t series, forecast, SPEI and Uurca [50].

#### **3. Results and Discussion**
