{'fraction_non_alphanumeric': 0.02844630759441554, 'fraction_numerical': 0.014110865740914025, 'mean_word_length': 4.64982025798266, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Comparison of the Performance of the SANN, SARIMA and ARIMA Models for Forecasting Quarterly GDP of Nigeria

This research aimed at modelling and forecasting the quarterly GDP of Nigeria using the Seasonal Artificial Neural Network (SANN), SARIMA and Box-Jenkins models as well as comparing their predictive performance. The three models mentioned earlier were successfully fitted to the data set. Tentative architecture for the SANN was suggested by varying the number of neurons in the hidden layer while that of the input and output layer remained constant at 4. It was observed that the best architecture was when the hidden layer had 10 neurons and thus SANN (4-10-4) was chosen as the best. In fitting the ARIMA/SARIMA models, the Augmented Dickey Fuller (ADF) test was used to check for stationarity. Variance stabilization and Stationarity were achieved after logarithm transformation and first regular differencing. The ARIMA/SARIMA model with lowest AIC, BIC and HQIC values was chosen as the best amongst the competing models and fitted to the data. The adequacy of the fitted models was confirmed observing the correlogram of the residuals and the Ljung-Box Chi-Squared test result. The SANN model performed better than the SARIMA and ARIMA models as it had a Mean Squared Error value of 0.004 while SARIMA and ARIMA had mean squared errors of 0.527 and 0.705 respectively. It was concluded that the SANN which is a non-linear model be used in modelling the quarterly GDP of Nigeria. Hybrid models which combine the strength of individual models are recommended for further research.


Introduction
Economic growth is a sine qua non for economic development. This informs why growth dominates the main policy thrust of government's development objective. Economic growth is associated with policies aimed at transforming and restructuring the real economic sectors [1].
More than ever before, growing the economy of Nigeria has become earnestly imperative. This has become absolutely momentous especially given that the nation was plunged into recession between the third quarter of 2016 and the second quarter of 2017. Even though the National Bureau of Statistics says that based on recent statistics that the nation has come out of the period of recession, it is believed in most quarters that the effect of the economic down tone is yet to exit. In the last national elections of Nigeria, the mantra of the two major political parties of Nigeria, vis-à-vis, the All Progressive Congress (APC) and the People's Democratic Party (PDP) were "Next Level" and "Get Nigeria Working Again" respectively. Both mantras can be related to economic growth.
One of the tools to measure the health of any economy is the Gross Domestic Product (GDP). It is an important tool for determining how good the economy of a country is [2]. As an indicator of economic health of a nation, it is generally viewed as the value of a country's overall output of goods and services at market price excluding net income abroad [3]. In essence, the gross domestic product is concerned with what goods and services were produced in a particular country (irrespective of the nationality of the producers) in a given year. It answers the question: what did you produce this year as a nation?
Nigeria, the most populous black nation on earth is found in West Africa with an estimated population of about 200 million and a land mass of 923,768 sq. km. Nigeria has the third largest youth population in the world, after India and China with more than 90 million of its population under age 18 [4].
The objectives of the study include to model the GDP of Nigeria using Seasonal Artificial Neural Network, Autoregressive Integrated Moving Average and Seasonal Autoregressive Moving Average Models as well as to test which of the models considered is the best in forecasting the GDP series using Mean Square Error and Root Mean Square Error as indicators of forecasting performance.

Literature Review
Most researches in literature on modelling the GDP of Nigeria have been based on linear models. However, [5] asserts that most economic and financial time series, of which GDP is one, exhibit nonstationarity and nonlinearity. Hence, there is need to employ a different approach that can handle the nonlinear behaviour of the GDP of Nigeria. This study therefore investigates the performance of the seasonal artificial neural network (SANN) which is a nonlinear model and those of the seasonal autoregressive integrated moving average (SARIMA) and autoregressive integrated moving average models which are linear models.
Okereke and Bernard [2] used Box-Jenkins procedure to model the GDP of Nigeria. They fitted SARIMA model (2, 1, 2) × (1, 0, 1) to the quarterly GDP of Nigeria. In their work, they made use of log transformation and first order regular differencing to stabilize the variance and achieve stationarity respectively in the series.
Additionally, in the study by Onuoha et al. [6], the probability plot of the GDP series used in the work showed non-normality and heteroskedasticity. After the decomposition of the series into its component parts, they found that the GDP of Nigeria has a strong trend component with little or no seasonal component. The result of their analysis shows that the economy of Nigeria has an upward trend which indicates a positive growth rate of the economy. However, their assertion that the GDP has no or little seasonal component could be because they used annual date despite having 53 observations. Furthermore, in 2008, Akanbi et al. [1] modelled GDP of Nigeria using Bayesian Model Averaging. According to them, this model helped overcome the problem of model uncertainty. Estimates of the posterior probabilities were obtained via Markov Chain Monte Carlo which was further used as weights to model averaged estimates and predictions. Their results show that Exchange Rate is the most important variable affecting GDP of the Nigerian economy followed by Interest Rate. The best model consisted of an average of two predictors with exchange rate as one of the major contributors. The top 5 models in their work were checked and they explained 40.16% of uncertainty.
According to [7], among the selected financial indicators that they studied, Credit to Private Sector (CPS) has a positive relationship with GDP. Usoro [3] modelled Nigeria's GDP using two models which were SARIMA and BARIMA models. SARIMA model is a linear model while BARIMA model is a nonlinear model. He essentially compared the two models and observed that BARIMA performed better than SARIMA. The SARIMA Model he fitted was of the order (0, 1, 2) × (0, 1, 1) and the BARIMA model has the order (0, 2, 1, 0, 1). In doing SARIMA analysis, he employed seasonal and non-seasonal differencing whereas [2] only did non-seasonal differencing.
Ahmad and Mustapha [8] modelled monthly rainfall of Kano using ANN and a linear model; the linear regression model. In their study, ANN was observed to have lower RMSE and MSE than the linear regression model in predicting the monthly rainfall of Kano. Karthik and Arumugam [9] used SANN to predict monthly rainfall of India. In their work, the Gaussian function was used as activation function. The reason they stated was that the variable to be predicted was continuous. They further did a comparative analysis of the predictive performance of the SANN with some other models which included Hidden Markov Model (HMM), ARIMA Model, Autoregressive Moving Average (ARMA) Model and SARIMA model and found that SANN outperformed them. However, [10] has shown that the SARIMA outperformed SANN in modelling and forecasting amount of rainfall in Umuahia. Artificial Neural Network was applied to forecast the monthly prices of gold in US dollars and cents per troy ounce by [11].
Benkachcha et al. [12] opined that the choice of appropriate transfer function is related to the problem the neuron is trying to solve. According to them, for nonlinear hypothesis, a sigmoid function: ( ) = 1 1 + with range [0, 1] can be used. The hyperbolic tangent function is suitable for nonlinear problems with positive and negative values. In [13], the performance of ANN was compared to that of ARIMA and the results showed superiority of ANN over ARIMA. According to Musa and Joshua [14], ANN performs better in forecasting daily stock market returns when compared to ARIMA and a hybrid model formed by combining the ARIMA and ANN performed better than the individual models.
Nwokike et al. [15] used an ARIMA model of order (1, 0, 1) to model and forecast the incidence of neonatal mortality in Abia State of Nigeria. The study was able to show that there is a slow but steady decline in the number neonate deaths in Abia State and the forecast figures predicts further decline. Obubu et al. [16] fitted an ARIMA model in studying murder crimes in Nigeria and found a significant decline in the frequency. Projections on the matter indicated a further decline. Akpanta et al. [17] used a SARIMA model to model the frequency of monthly rainfall in Umuahia, Abia State of Nigeria. The fitted model has the order (0, 0, 0)(0, 1, 1) . Offorha et al. [18] compared the performance of the SARIMA model used by [17] with a Holt-Winters Exponential Smoothening model. The results from their study show that though the SARIMA model returned lower error indicators, there was no significant difference in the values predicted by both models. Asamoah-Boaheng [19] applied SARIMA to forecast monthly mean surface air temperature in the Ashanti Region of Ghana.
In a study conducted by [20], it was shown that non-oil exports and tourism have positive impact on the economic growth of Saudi Arabia. They advised increased investments on tourism and renewable energy in order to reduce oil dependence and thus foster sustainable economic growth. It has also been shown by [21] that reforms in educational system and climate change mitigation policies need long time to significantly influence an economy.
To conclude, a reasonable number of scholars have modelled Nigeria's GDP using different models. However, most scholars used linear models in handling this. Only few researchers have done so using nonlinear models. So far, there is no work in literature which has shown the modelling of the GDP of Nigeria using Seasonal Artificial Neural Network.

Source of data
The data used for this study was the quarterly GDP of Nigeria at 1990 constant basic prices from the first quarter of 1960 to the fourth quarter of 2014 and then the quarterly GDP of Nigeria at 2010 constant basic prices from the first quarter of 2015 to the third quarter of 2019. The data was extracted from different Statistical Bulletins of the Central Bank of Nigeria. (See Appendix I)

Methods of data analysis
The series was analysed using three models which includes the SANN, SARIMA and ARIMA models.

Seasonal artificial neural network
The Seasonal Artificial Neural Network (SANN) model is a typical ( , ℎ, ) ANN. Here, = 4 (which is the seasonal period). The optimal number of hidden neurons was determined by trial and error. The model is represented mathematically as shown below: where: = The activation function. The activation function used in this research is the sigmoid. This is because there were no negative values [11].
The errors were retrieved by subtracting the predicted values from the actual observed values. Mathematically, it is given by: The work flow used for training the model is as follows: 1. Data was arranged on quarterly basis. That is, put in Excel with four columns, each for each quarter since the seasonal period of the series is four. 2. Input and Target data were set up. 3. Data was divided into training, validation and test set. The test set was not used in training the model. 4. Network was created. This involved setting number of neurons in the input, hidden and output layers. For this research, the number of input and output neurons was already predetermined and fixed to be same with the seasonal period which is four. Only the number of hidden neurons was alternated until optimal index was obtained. 5. The network so created in step 4 was thereafter trained. Before training proper, certain parameters were set up. The momentum term (m) was set at 0.9, learning rate (lr) was 0.01, maximum failure (max-fail) was 100, epoch was 1000 and minimum performance gradient was set at 0.00001. Also, the training algorithm selected was feed-forward back propagation (FFBP), the training function was Gradient Descent with Momentum (TRAINGDM) and adaptation learning function was LEARNGDM.
Additionally, the performance function selected was Mean Squared Error (MSE) and the transfer function used was Sigmoid function (LOGSIG). 6. The network's results was validated by the use of the MSE and Correlation Coefficient, .

Autoregressive integrated moving average/seasonal autoregressive integrated moving average models
The Autoregressive Integrated Moving Average (ARIMA (p, d, q)) model is a linear nonstationary time series model made popular by G. E. P. Box and G. M. Jenkins. It essentially describes how a time series is statistically related to its previous observations and it is especially suited for short term forecasting. Mathematically, the ARIMA (p, d, q) model is represented thus: In (2), ( ) is a characteristic polynomial with as the order, (1 − ) is a differencing operator, is the order of regular differencing, is the observed value at time . In this study, this is simply the GDP value at a particular time.
is a constant term, ( ) is also a characteristic polynomial of order and is the error term which is a white noise process.
The seasonal autoregressive integrated moving average model (SARIMA (p, d, q) × ( , , ) is an extension of the ARIMA model which improves the performance of the ARIMA model in modelling and predicting seasonal time series. It is a multiplicative model. The mathematical representation of the SARIMA model is as stated below: where ( ) and ( ) are the regular autoregressive and moving average polynomials of orders and respectively. Φ ( ) and Θ ( ) are the seasonal autoregressive and moving average polynomials of order and respectively. is the periodicity, is the observed value at time , is a constant term, is the error term, is the order of regular differencing while represents the order of seasonal differencing. Lastly, (1 − ) and (1 − ) stand for non-seasonal and seasonal differencing operators respectively.
Box and Jenkins postulated a four step iterative procedure for conducting ARIMA/SARIMA modelling. They are:

(a) Identification of a suitable model
Here, by plotting the time series plot and obtaining the graph of the autocorrelation and partial autocorrelation function, their behavior suggested a tentative model to be fitted to the data set. However, to ensure parsimony, other tentative models were suggested and the one with lowest value of the Akaike Information Criterion (AIC), Bayesian Information Criterion (BIC) and Hannan-Quinn Information Criterion (HQIC) is selected as the most suitable model. The graphs also helped to ascertain whether the series is stationary or non-stationary as well as whether appropriate transformation may be required. The ACF of a non-stationary process decays very slowly and will need regular differencing to be made stationary. The Augmented Dickey-Fuller (ADF) Unit Root Test was used to confirm stationarity. For stationarity, the zeros of the characteristic polynomial are expected to lie outside the unit circle.

(b) Estimation of the parameters of the selected suitable model
At the stage, the parameters of the chosen suitable model were estimated.

(c) Adequacy checks on the selected suitable model
It is imperative to conduct diagnostic checks to confirm that the fitted model is adequate. At this stage, the residuals from the ARIMA and SARIMA model was observed. If the model is adequate, the residuals are expected to exhibit the properties of the white noise process. The correlogram of the residuals should show that the residuals are serially correlated. The Ljung-Box test is an objective test used to confirm this as it checks for the absence of serial autocorrelation amongst the residual values.

(d) Forecasting
If the model is found to be adequate, then making forecast with it is appropriate. At this stage, future values of the GDP are predicted. In most work in the literature, this last step is usually omitted. This could be because the aim of most time series analysis is to predict future values which can guide policymakers and decision makers in formulation of policies and programs.
To ensure that the seasonal artificial neural network would converge quickly [22] the input and target variables were scaled. The input and target variables were scaled using the Min-Max normalization approach thus: where is the scaled variable, is the GDP observed at time . is the smallest observed GDP value in the series and stands for the highest observed value in the GDP series.
Logarithm transformation was used to transform the data used for the ARIMA/SARIMA modelling following the approach of [23].
The MATLAB R2014b was used to fit the Seasonal Artificial Neural Network Model where as Gnu Regression Econometric and Time Series Library (GRETL) was used to do the ARIMA and SARIMA model fitting as well as the regression analysis to determine the value of β.

Results from SANN
Once the input and target variables have been imported into the MATLAB working environment, different network architectures were tentatively considered by experimentation to obtain optimal network. The number of input and output neurons are already predetermined by the periodicity of the series and in this research, it is four. The only parameter left to consider is the number of hidden neurons. One hidden layer was used in this study and Table 1 summarizes the different network architectures considered with their associated MSE and values. The network architecture with the least MSE in the validation set and highest was chosen as the best and used for modelling. The best architecture is in bold prints. Since the architecture with 10 hidden neurons had the least MSE value (0.004) and highest correlation coefficient (0.96), it was selected and used for modelling. The performance and regression plots for the selected model are as shown in Fig. 1 and Fig. 2 respectively. The model's parameters are presented in Appendix III.

Fig. 1. Performance plot for the SANN Model of order (4-10-4)
In Fig. 1, the red line represents error in the test data set which is an indicator of how well the network will approximate the new data, the blue line represents the error in the training data set while the green line represents error in the validation set. The training stopped when error in the validation stopped decreasing and that occurred at epoch 559.
The regression plot sheds light on the strength of similitude between the observed values and the predicted values of the network. An overall value of 0.96 indicates a strong correlation between the two sets of data.

Results from SARIMA
While fitting a SARIMA model to the data set, 85% of the data (203 observations) from the first quarter of 1960 to the third quarter of 2010 were used for model building while 15% (36 observations) from the fourth quarter of 2010 to the third quarter of 2019 were set aside for testing. Fig. 3 is the time plot of the series. From Fig. 3, it is obvious that the series is not stationary and not stable in variance. The non-stationarity claim is further confirmed by the ACF and PACF plots in Fig. 4 as the ACF of the series showed evidence of very slow decay and by the ADF test as summarized in Table 2. The ADF test returned a test statistic value of 2.07979 and a pvalue of 0.9999. Since the p-value is greater than 0.05, we fail to reject the null hypothesis that the series is not stationary. Fig. 3 also indicates presence of seasonality in the series.  Since the series appears not to be stable in variance, the data was transformed in order to stabilize the variance.
In order to achieve this, Akpanta and Iwueze's [23] method of using Bartlett's transformation [24] was used. The regression line obtained was = 1.07602 − 3.99102 (See Appendix II for full result of the regression analysis). Since is 1.07602 which is approximately 1, logarithm transformation was used to transform the series.
The plot of the logarithm transformed series is as shown in Fig. 5. It can easily be seen from the graph that the series is now stable in variance. Stationarity, however, was still unattained as the ADF test as this point returned a test statistic value of -1.13115 and a p-value of 0.7057. Consequently, the logarithm transformed series was subjected to first regular differencing. After differencing, the ADF test was conducted again and this time, stationarity was reached since the test returned a statistic value of -6.02878 and a p-value of 1.021 × 10 . The test information is summarized in Table 3. Furthermore, in order to remove the seasonality in the series, the logarithm transformed and first regular differenced series was subjected to seasonal differencing. Figs. 5, 6, 7 and 8 are the time series plot of the logarithm transformed series, time plot of the logarithm transformed and first regular differenced series, time plot of the logarithm transformed, first regular differenced and seasonally differenced series and the ACF and PACF plots of the log-transformed, first regular differenced and seasonally differenced series respectively.

Fig. 5. Time Plot of the Series after logarithm transformation
From the behavior of the PACF in Fig. 8, it can be seen that there are no significant spikes at non-seasonal lags.
In contrast, there are significant spikes at seasonal lags. An observation of the ACF shows no significant spike at any non-seasonal lag while there are significant spikes at the first seasonal lag and other seasonal lags. This behavior suggests that SARIMA (0, 1, 0)(6, 1, 1) be fitted to the series. However, to ensure parsimony, three other tentative models are suggested and the model with least AIC, BIC and HQIC values was selected as the optimal model. Table 4 is a cross tabulation of these tentative models with their associated AIC, BIC and HQIC values. The model with the least value of these indicators is considered the optimal amongst the competing models and is presented in bold prints for easy identification.  Consequent upon the results as summarized in Table 4, SARIMA (0, 1, 0)(0, 1, 1) was fitted to the series. The estimates of the parameters of the fitted model are as shown in Table 5.
Next, the adequacy of the fitted model was confirmed by observing the plot of the ACF and PACF of the residuals as presented in Fig. 9. As can be seen in the plots, spikes are absent, which is an indicator that there is no autocorrelation between adjacent observations. Furthermore, a portmanteau test; the Ljung-Box test was conducted to confirm the absence of autocorrelation between adjacent observations in the residuals. The test returned a test statistic value of 4.69757 and a p-value of 0.8598. Since the p-value is greater than 0.05, the absence of autocorrelation is confirmed and model was deemed adequate.

Results from ARIMA analysis
All the steps applied to achieve stability in variance and stationarity in the series as done in the SARIMA analysis was still applied to the ARIMA modelling with the exception of the seasonal differencing. Hence, an observation of the ACF and PACF plots of the series after the first regular differencing. The correlogram is Fig. 10.
Seven tentative ARIMA models were fitted to the series and the model with the lowest value of AIC, BIC and HQIC was selected as the best model amongst the competing. The competing models and their respective values for the selection criteria are as summarized in Table 6. The best model is in bold print for the purpose of ease of identification. From the results shown in Table 6, it can be seen that ARIMA (2, 1, 2) model had the least value across the stipulated selection criteria and hence it was fitted to the model. The parameters of the model, as estimated, are given in    The residuals of the ARIMA (2, 1, 2) model are all within bound and as such, there is no evidence of serial correlation between adjacent observations of residuals. Also, from Fig. 11, it can be seen that the residuals snap around 0 which is indicative of the fact that the residuals have mean to be zero and a constant variance. This attribute is expected of a white noise process. Lastly, a Ljung-Box Chi-Squared test was conducted to corroborate the claims reached on the basis of the visual inspections of Figs. 11 and 12. The test returned a statistic value of 3.64675 and a p-value of 0.7244. Since the p-value returned is greater than 0.05, the absence of autocorrelation amongst the residuals was affirmed.

Comparison of the performance of the three models
In this segment, the performance of the three models is compared. To facilitate that, Table 8 and Fig. 13 are presented below. From Table 8, it is clear that the seasonal artificial neural network model performed better than the SARIMA and ARIMA Models since it has the least value of MSE and RMSE. Also, an inspection of figure  13 shows that while SARIMA and ARIMA Models are directional, the SANN is more inclined towards value forecasting.

Conclusion and Recommendation
In this research, the modelling and predictive ability of three models vis-à-vis seasonal artificial neural network (SANN), seasonal autoregressive integrated moving average (SARIMA) and autoregressive integrated moving average (ARIMA) models were investigated and hitherto compared. The study revealed that the SANN model had the least MSE and RMSE and is thus a better model for modelling and forecasting quarterly GDP of Nigeria than the other models.
Given that SANN has outperformed the Box-Jenkins methods in the modelling and forecasting of the GDP of Nigeria, it is therefore advised that SANN model should be the first choice of the government agencies (like CBN, Commercial banks, National Bureau of Statistics), private organizations and NGOs in time series modelling of the GDP of Nigeria.
It is recommended that future studies develop hybrid models which combines strength of individual models to forecast the GDP of Nigeria and thus help decision makers take informed actions. The hybrid models have been shown to outperform modelling done with single models [13,25]. Furthermore, subsequent research may consider other Machine Learning models such Support Vector Machines, Fuzzy time series method, etc.