American Journal of Business and Operations Research

Seasonal Autoregressive Integrated Moving Average for Climate Change Time Series Forecasting

Basant Sameh, Mahmoud Elshabrawy
Volume 8, Issue 2, pp. 25-35 (2023)
DOI: https://doi.org/10.54216/AJBOR.080203
Online: https://americaspg.com/journal/1/article/1542

Abstract

This study investigates the application of time series models, specifically ARIMA (Auto Regressive Integrated Moving Average) and SARIMAX (Seasonal Autoregressive Integrated Moving Average with eXogenous regressors), in the context of climate change. The ARIMA and SARIMAX models are mathematical methods that can be used to forecast future values of a time series related to climate change, taking into account trends and seasonality, as well as incorporating additional information through exogenous variables. The paper also delves into the mathematical foundations of the ARIMA and SARIMAX models, including the various operators used to eliminate trends, the use of lag polynomials to represent the autoregressive and moving average components of the model, and the incorporation of exogenous variables in the SARIMAX model. The study aims to provide a better understanding of the use of these models in analyzing and predicting the effects of climate change.

Keywords: Forecasting; Time Series; ARIMA; SARIMAX; Climate Change

1. Introduction

Climate change is a critical issue that has significant impacts on the environment and human society. One of the ways to gain insight into the effects of climate change is through the use of time series models. ARIMA and SARIMAX models are widely used in time series analysis, and can be used to forecast future values of a time series related to climate change, taking into account trends and seasonality, as well as incorporating additional information through exogenous variables in the SARIMAX model. This study aims to explore the use of ARIMA and SARIMAX models in analysing and predicting the effects of climate change.

Conventional temperature forecasting techniques can be broken down into two groups: those that rely on mathematical statistics and those that use machine learning. The Kalman filter [1] and regression analysis [2] are two common examples of mathematical statistics techniques. These approaches are straightforward in theory and quick to calculate, but they can only examine one variable at a time and are highly sensitive to the most recent temperature readings. In terms of predicting future temperatures, they do a poor job. Second, the accuracy of the forecast is low since it does not consider the impact of other meteorological elements on temperature. Excellent forecasting performance can be attained with machine learning-based methods because of their ability to systematically investigate the correlational aspects of all meteorological factors. The SVM [3, 4], Genetic Algorithms (GA) [5, 6], Artificial Neural Networks (ANN) [7, 8], etc., are all examples of popular machine learning techniques. Radhika et al. [4] used SVM to predict the weather, and the results were compared to those obtained using multilayer perceptron (MLP). Compared to MLPs, the results showed that SVM performed better. The ANN model was used by Abbot et al. [6] to successfully estimate local temperatures in six regions, including the Swiss Alps, Canadian Rockies, Tasmania, and more.

Using GA, Venkadesh et al. [5] determined the best parameters for the ANN model's input variables in terms of length and resolution. Compared to the conventional GA technique, the new method significantly reduced the MAE when predicting the temperatures for the next 1, 2, 8, and 12 hours. These techniques use mathematical functions or algorithms to transform the current inputs into a set of predictions. These machine-learning techniques don't take timing dependence into account. Predicting the weather is a classic time series problem that relies heavily on time series. This means that when asked to make long-term temperature forecasts, they will continue to produce subpar results. These more conventional approaches to weather forecasting are not well suited for dealing with massive data sets. Over the past few years, DL techniques have been increasingly popular for forecasting meteorological variables, including PM2.5, wind speed, rainfall, etc. When processing time series data, LSTM performs better than more conventional approaches. Using the LSTM, Feng et al. [7] analyzed the city's surface meteorological data for many years and made accurate predictions about the weather in the future. The LSTM approach was utilized to make predictions about soil temperature Liang et al. [13]. Wu et al. [8] suggested an enhanced LSTM technique to predict PM2.5 concentrations using big data, considering air quality and meteorological data. However, the aforementioned studies only looked at data from the focus location rather than considering the impact of other regions. Researchers are paying increasing attention to the implications of spatial-temporal dependence in DL models. A region's weather is influenced by more than just its location and the passage of time. To make more precise forecasts, it is required to examine observation data from neighboring regions. For SST prediction, for instance, Qiao et al. [9] employed a 3D Convolutional Neural Network (3D CNN) to capture the spatial correlations among Sea Surface Temperature (SST) field data consisting of many observation locations in a chosen sea area. To forecast the weather for the following 14 days, Jeong et al. [10] integrated spatial information obtained from CNN processing of RDASP image data with temporal features obtained from BiLSTM processing of time series observations. Cao et al. [11] introduced an end-to-end model called ITRCN, which transforms interactive network traffic into images for use in different areas of study. CNN was utilized to capture the traffic interaction function, whereas GRU extracted temporal aspects from the data. The RMSE is reduced by 14.3% and 13.0% using the ITRCN method compared to the standard GRU and CNN methods. Both of the aforementioned methods significantly succeeded in some prediction tasks by using CNN to model spatial dependence. On the other hand, CNN can only be utilized with data in Euclidean space and is typically used to raster data. However, it isn't ideal for dealing with geographically dispersed networks with a complicated topology. As a result, it fails to accurately capture spatial dependence. CNN has been a big proponent of GCN lately because of its ability to extract local information from graphs. To acquire spatial dependency in an urban traffic prediction challenge, Zhao et al. [12] utilized GCN to capture the structure of urban road networks. As evidenced by the experiments, the prediction performs as expected. In this study, we It focused primarily on how the observation stations spread throughout the country. The GCN network is used to examine geospatial relationships between the study area and its multi-order neighbours to record spatial characteristics between nodes. Table 1 outlines the benefits and drawbacks of the various approaches currently used to estimate future temperatures.

Table 1. Comparison of temperature prediction methods
Table 1. Comparison of temperature prediction methods

This study takes advantage of the multi-meteorological element model by considering various meteorological influences, such as temperature, wind speed, and precipitation. It sets up a timesliding window to account for the temporal features of multidimensional meteorological data and the spatial features of urban areas. We combine GCN and BiLSTM to construct a temperature prediction model with the bidirectional propagation characteristics of BiLSTM, and the spatial data features extraction of GCN, taking into account the meteorological spatial features of the surrounding sites and learning the relationships of meteorological elements between different regions. The predictive power of this model will increase if the network's capacity and the model's complexity are both boosted.

3. Mathematical equations

ARIMA (Auto Regressive Integrated Moving Average) and SARIMAX (Seasonal Auto Regressive Integrated Moving with eXogenous variables) are both models that can be used to forecast future values of a time series. The main difference between the two models is that SARIMAX includes the ability to incorporate exogenous variables, also known as external variables, into the forecasting process. The ARIMA model is a univariate model that uses the past values of the series being forecasted to make predictions. The model is represented by the notation ARIMA(p,d,q), where p, d, and q are the parameters of the model. The parameter p represents the order of the autoregressive component of the model, which measures the number of past values used in the prediction. The parameter d represents the order of differencing, which measures the number of times the data is differenced to make it stationary. The parameter q represents the order of the moving average component of the model, which measures the number of past residual errors used in the prediction. The SARIMAX model is an extension of the ARIMA model that includes the ability to incorporate exogenous variables into the forecasting process. The notation for the SARIMAX model is SARIMAX(p,d,q)(P,D,Q)S, where p, d, and q are the parameters of the non-seasonal component of the model, and P, D, Q, and S are the parameters of the seasonal component. Additionally, the SARIMAX model includes the exogenous variables denoted by X, which can include external variables such as weather data, economic indicators, etc. that can affect the time series being forecasted. Both ARIMA and SARIMAX models use mathematical techniques such as differencing and the use of lag polynomials to eliminate trends and seasonality in the data, and make predictions based on the past values of the time series. The main difference between the two models is the ability of SARIMAX to incorporate exogenous variables, which can improve the accuracy of the predictions.

The equation for an ARIMA(p,d,q) model is as follows:

𝑌(𝑡) = 𝜇+ 𝜙1𝑌(𝑡−1) + ⋯… . . +𝜙𝑝𝑌(𝑡−𝑝) −θ1𝜖(𝑡−1) −⋯. . −𝜃𝑞𝜖(𝑡−𝑞) + 𝜖(𝑡)            (1)

Where:

𝑌(𝑡) : the value of the time series at time t 𝜇 : the mean value of the time series 𝜙1 … … . 𝜙𝑝 : the autoregression coefficients (p)

−𝜃1 … … . . −𝜃𝑞 : the moving average coefficients (q) 𝜖(𝑡): the error term at time t

The differencing operator (d) is not explicitly represented in this equation, but it is applied to the time series before the model is fit. The differencing operator is used to remove any trend or seasonality in the data before the model is applied. The value of d is the number of times that the raw observations are differenced

In summary, the ARIMA(p,d,q) model uses the parameters p, d and q to model the relationship between the current value of the time series and its past values, as well as the past errors. The value of d is used to account for any non-stationarity in the data, while the values of p and q are used to model the autoregression and moving average components of the time series respectively. The differencing operator (d) and the seasonal differencing operator (D) are not explicitly represented in this equation, but they are applied to the time series before the model is fit. The differencing operator is used to remove any trend in the data before the model is applied, while the seasonal differencing operator is used to remove any seasonality. The values of d and D are the number of times that the raw observations and the seasonal observations are differenced, respectively.

In summary, the SARIMAX(p,d,q)(P,D,Q)s model uses the parameters p, d, q, P, D, Q and s to model the relationship between the current value of the time series and its past values, as well as the past errors. The values of d and D are used to account for any non-stationarity and seasonality in the data

4. Proposed work

First Data Preparation Stage I Get The Data From The Nasa Website as Shown in figure 1.

Figure 1. Used Data
Figure 1. Used Data

And Got Data For Co2 In The Same Time That I'll Work In Climate Change In China as shown in figure 2. Then I Got to choose my own feature "Feature Selection "that would affect my Results In My Two Fields That I Gonna Work in them (Year, Value "Change in Temperature Value ", Area) From Climate Change Data And Only (Value and Time ) From CO2 Data And Convert The Data In Time Series In Index Column I Cleared My Data Using Simple Imputer Model And My Strategy Is Medium So I Used Medium because The Data Is ordinal And I linked Two Data Frame Together In The Time

Figure 2. Co2 in China
Figure 2. Co2 in China

Now Visualization The Data: Lets Show The Mean Distribution Of CO2 In Curve in figure 3 and And Scatter The Data Of CO2 In Label Value With Time in figure 4.

Figure 3. Mean distribution of Co2
Figure 3. Mean distribution of Co2
Figure 4. Scatter the data of Co2
Figure 4. Scatter the data of Co2

In The Data Of Climate Change I Just Worked In region Which include China Country an Shown Figure 5 See. That The Rate Of Climate Change Per Year Now U See The Trend Of Data And its Residual And The Seasonality Of Data as shown in figure 6.

Figure 5. Amplitude of climate change per year
Figure 5. Amplitude of climate change per year
Figure 6. The Trend Of  Data And its Residual And The Seasonality
Figure 6. The Trend Of Data And its Residual And The Seasonality

A lag plot, also known as a scatter plot of lag, is a scatter plot used to check for pattern or correlation in a time series data set is shown in figure 7.

Figure 7. Scatter plot of lag
Figure 7. Scatter plot of lag

The plot can be used to identify patterns such as autocorrelation or non-randomness in the data. If the points on the plot form a diagonal line, it suggests a positive correlation, while a scattered plot suggests no correlation. A lag plot is a scatter plot of a time series against a lagged version of itself. Mathematically, this can be represented as:

𝑦(𝑖) = 𝑥(𝑖)                                                                                                                                    (2)
𝑥(𝑖) = 𝑥(𝑖−𝑘)                                                                                                                            (3)

Where 𝑦(𝑖) is the original time series, 𝑥(𝑖) is the lagged time series, and k is the lag value. The lag value determines the number of time steps by which the original time series is shifted to create the lagged time series. For example, if the lag value is 2, the first data point of the lagged time series will be the third data point of the original time series. The purpose of a lag plot is to check for patterns or correlation in the data. If the points on the plot form a diagonal line, it suggests a positive correlation between the original and lagged time series, while a scattered plot suggests no correlation. In addition, by comparing the lag plot of the original time series with different lag values, we can get an idea of the temporal relationship between the data points and can detect patterns such as seasonality or trend in the time series.

The Autocorrelation Function (ACF) is a measure of the correlation between a time series and a lagged version of itself. It is used to determine the amount of correlation between a given time series and a shifted version of itself over different lag values. Mathematically, the ACF is defined as

𝐶𝑜𝑛𝑣(𝑥(𝑡),𝑥(𝑡−𝑘)) 𝑉𝑎𝑟 (𝑥(𝑡)) (4) 𝐴𝐶𝐹(𝑘) =

Where x(t) is the original time series and k is the lag value. The numerator of the equation is the covariance between the original time series and the lagged time series, and the denominator is the variance of the original time series. The resulting value is a correlation coefficient between -1 and 1, where -1 represents negative correlation, 0 represents no correlation and 1 represents positive correlation as seen in figure 8.

Figure 8. Autocorrelation function
Figure 8. Autocorrelation function

The Partial Autocorrelation Function (PACF) is a measure of the correlation between a time series and a lagged version of itself, after removing the correlation due to the intermediate lags. It is used to determine the amount of correlation between a given time series and a shifted version of itself, after accounting for the correlation already explained by the other lags

Mathematically, the PACF is defined as

𝑃𝐴𝐶𝐹(𝑘) = 𝑐𝑜𝑟𝑟(𝑥(𝑡), 𝑥(𝑡−𝑘)|𝑥(𝑡−1), 𝑥(𝑡−2), … … … . . 𝑥(𝑡−𝑘+ 1))               (5)

Where x(t) is the original time series and k is the lag value. The numerator of the equation is the correlation between the original time series and the lagged time series, after accounting for the correlation already explained by the other lags. The resulting value is a correlation coefficient between -1 and 1, where -1 represents negative correlation, 0 represents no correlation and 1 represents positive correlation figure 9.

Figure 9. The partial Autocorrelation function
Figure 9. The partial Autocorrelation function

For Select the Model That I got the Predictions I used auto_arima from pmdarima as shown in figure 10.

Figure 10. The prediction using ARIMA model
Figure 10. The prediction using ARIMA model

From figure 10 "The Best Model is SARIMAX and The Value of

(p, d, q), (P , D , Q ) is (1 , 1 , 2 ) , ( 0 , 0 , 0 ) and the Total fit Time = 1.248 Sec

Then I split The data That was transmitted For The Training and Testing Like And Used SARIMAX With Order (1 ,1,2) and The We Got The Summary After Training Then we Got The Predictions in figure 11

Figure 11. Summary of prediction using ARIMA model in different years
Figure 11. Summary of prediction using ARIMA model in different years

Then We Gonna Show If the Model Is Suitable for Data or No from Mean Absolute Error and Mean Squared Error as shown in figure 12.

Figure 12. Absolute and mean square error
Figure 12. Absolute and mean square error

5. Conclusion

This study demonstrates the utility of using SARIMAX models in analyzing and predicting the effects of climate change. SARIMAX models are powerful tools that can be used to forecast future values of a time series related to climate change, taking into account trends, seasonality, and incorporating additional information through exogenous variables. The mathematical foundations of the SARIMAX model were also discussed, including the various operators used to eliminate trends, the use of lag polynomials to represent the autoregressive and moving average components of the model, and the incorporation of exogenous variables in the model. The study provides a better understanding of the use of this model in analyzing and predicting the effects of climate change, which can aid in effective policy making and adaptation.

Funding: “This research received no external funding”

Conflicts of Interest: “The authors declare no conflict of interest.”

References

[1]  Federico, C., Massimiliano B., Wind speed and wind energy forecast through Kalman filtering of  Numerical Weather Prediction model output. Appl. Energy, 99, 154-166, 2012. 

[2]  Wang H,  Huang J.,  Zhou H.,  Zhao L.,  Yuan Y.,  An integrated variational mode decomposition  and ARIMA model to forecast air temperature. Sustainability, 11(15), 2019.

[3]  Kisi,  O.,  Cimen  M.,  Precipitation  forecasting  by  using  wavelet-support  vector  machine  conjunction model. Eng. Appl. Artif. Intell., 25, 783-792, 2012.

[4]  Radhika Y., Shashi M., Atmospheric temperature prediction using support vector machines.  Int.  J. Comput. Theory Eng. , 1(1), 55-58,2009.

[5]  Venkadesh S., Hoogenboom G., Potter W., McClendon R., A genetic algorithm to refine input  data selection for air temperature prediction using artificial neural networks. Appl. Soft Comput.,  13, 2253-2260, 2013.

[6]  H. Nasser AlEisa, E. M. El-kenawy, A. Ali Alhussan, M. Saber, A. A. Abdelhamid et al., Transfer  learning  for  chest  x-rays  diagnosis  using  dipper  throated algorithm. Computers,  Materials  &  Continua, 73(2), 2371–2387, 2022.

[7]  Abdelhamid AA, El-Kenawy E-SM, Khodadadi N, Mirjalili S, Khafaga DS, Alharbi AH, Ibrahim  A, Eid MM, Saber M., Classification of Monkeypox Images Based on Transfer Learning and the Al-Biruni Earth Radius Optimization Algorithm. Mathematics, 10(19):3614, 2022.

[8]  Mohamed  Saber,  A  novel  design  and  Implementation  of  FBMC  transceiver  for  low  power  applications, IJEEI, 8(1), 83-93, 2020.

[9]  Qiao B., Wu Z., Tang Z., Wu G., Sea surface temperature prediction approach based on 3D CNN  and LSTM with attention mechanism. In Proceedings of the 2022 24 th International Conference  on Advanced Communication Technology (ICACT), PyeongChang Kwangwoon_Do, Republic  of Korea, 342-347, 13–16 February 2022.

[10]  Jeong S., Park I., Kim H., Song C., Kim H., Temperature prediction based on bidirectional long  short-term memory and convolutional neural network combining observed and numerical forecast  data. Sensors, 21, 2021.

[11]  Cao  X.,  Zhong  Y.,  Zhou  Y.,  Wang  J.,  Zhu  C.,  Zhang  W.,  Interactive  temporal  recurrent  convolution network for traffic prediction in data centers. IEEE Access, 6, 5276–5289, 2017.

[12]  Zhao L., Song Y., Zhang C., Liu Y., Wang P., Lin T., Deng M., Li H., T-gcn: A temporal graph  convolutional  network  for  traffic  prediction. IEEE  Trans. Intell.  Transp.  Syst., 21,  3848–3858,  2019.

[13]  Liang S., Wang D., Wu J., Wang R., Wang R., Method of Bidirectional LSTM Modelling for the  Atmospheric Temperature. Intell. Autom. Soft Comput., 30, 701–714, 2021.