**3. Methodology**

This paper analyses past Composite Indexes in Agriculture ranges from 1961–2016: crops production, cocoa production, livestock production, cereal production, and food production in Ghana. The data also consider records of maximum rainfall, maximum temperature, and minimum temperature value as weather indicators from January 1965 till July 2016. We sourced the data from the Ghana Meteorological Agency for climate data, and agriculture production indexes from the Food and Agriculture Organization also in Ghana. Rainfall and temperature are assumed to be the primary determinants of weather in Ghana as seen in Figure 1. The first task was to check for stationarity of the weather variables using Augmented Dickey-Fuller (ADF) unit root test and then the Mann-Kendall Trend Test of seasonality. It was necessary to apply methods that explicitly allow for testing non-stationarity in the distribution parameters of climate variables [20].

Next step was to model from the dataset of the weather indicators employing the Block Maximum Method for the weather extremes under Generalized Extreme Value Distribution (GEVD). There were two approaches to the modelling of Block minima data for the minimum temperature. Either the GEVD for minima fitted to this data or the data negated and the GEVD for maxima fitted [20]. The latter approach was adopted since the Extremes Toolkit does not include a routine to estimate the GEVD for minima directly. The block maxima method is a parametric approach to Extreme Value Theory. It entails fitting the GEVD to a specific group of maximum values chosen in a given sample of data. It focuses on the statistical behaviour of the largest or smallest value in a sequence of independent random variables. Assume that the sequence is grouped into blocks of size *N* (with a reasonably large number) and that only the maximum score *Mi* (*i* = 1, 2, 3, . . . , *n*) of each block extracted. Each *Mi* (*i* = 1, 2, 3, . . . , *n*) of the weather indicators is then used to estimate the relationship between the composite indexes of agriculture production.

The mean return period defines the amount of time (e.g., years) that is expected to pass on average before a new extreme with the same or increased intensity. Given the likelihood that events past a certain threshold will follow an extreme of a particular security at any given time (year) is defined as *p*, then the mean return period T can be calculated as *T* = 1/*p*.

Food production index includes food crops that are considered edible, and that contain nutrients with the exclusion of coffee and tea because they have no nutritive value although edible (FAO). Figure 3 shows the primary crop food calendar.

Finally, we investigated the relationship between extreme weather events and agriculture production using SEM software to evaluate the potential impacts of weather extremes on Agriculture production. We used SEM regression for the paths equation modelling analysis with the partial least squares (SEM) estimation technique [73]. SEM is a modelling approach with a flexible procedure, which can handle data with missing values, strongly correlated variables, and small samples. SEM-regression works with both continuous and discrete observed variables as indicators. The SEM estimates loading and path parameters between variables and maximises the variance explained for the outcome variables [73].

**Figure 3.** Major food crops calendar in Ghana.

## **4. Results and Discussion**

#### *4.1. Stationarity Test for the Weather Indicators*

The ADF test is captured in Table 4 indicating the significance of the *p*-value statistics. The premise of non-stationary at 1%, 5%, and 10% rejected, and therefore we conclude the stationarity of the weather indicators.

It is reported by scholars that, Mann-Kendall Trend Test of stationarity is reliable and efficient. In line with this, analysing environmental data demands the exposure of movements of events on separate points [74]. Based on this, the test outcome illustrates high or low trends in weather conditions of a particular jurisdiction.


**Table 4.** Stationarity and Seasonality test.

95% confidence interval in parenthesis.

In Table 4, the estimated annual trend is 0.0044 mm/year, a yearly increase in the maximum annual rainfall. The *p*-value based on the Kendall seasonal trend test is *p* = 0.6640, which shows no importance. The 95% confidence interval on both sides for the trend ( −0.014,0.0307), the chi-square test for heterogeneity (Het) gave a *p*-value of 0.0216. Therefore, there is a difference in the level of a trend in the different seasons of the maximum annual rainfall. As shown in Table 4, the estimated annual trend is 0.0318 degrees Celsius (◦C)/year, which is a yearly increase in the yearly maximum temperature. The *p*-value corresponds to the Kendall seasonal test for the *p* < 0.001 trends, indicating that it is statistically significant. The 5% level of significance on both sides for the trend is (0.0286, 0.0346). The chi-square heterogeneity test (Het) provides a *p*-value of 0.9410, so there is no evidence for different sets of stresses at different times of the maximum annual temperature. The estimated annual trend is 0.0231 degrees Celsius (◦C)/year, a yearly increase in the maximum annual temperature. The *p*-value of the Kendall seasonal trend test, *p* < 0.001, indicating that it is statistically significant. The 5% level of significance on both sides for the trend is (0.0212,0.0250). The chi-square test for heterogeneity (Het) gives a *p*-value of 0.1318, i.e., no indication of the different trend in different seasons of the minimum annual temperature.

#### *4.2. GEVD Model for Extreme Maximum Rainfall*

In Table 5, the estimated return periods of maximum rainfall likely to occur over the next 5, 10, 20, 50 or even 100 years fitted by GEVD. The estimated results are (*μ* , *σ* , *γ*) (149.03,23.98,0.0024), with standard errors (3.758, 2.718, 0.1002). The approximate 95% confidence intervals for the parameters are thus (141.67, 156.39) for *μ*, (18.65, 29.31) for *σ*, and ( −0.193,0.198) for *γ*.


**Table 5.** Generalised extreme value estimates of maximum rainfall.

The validity and reliability of the extrapolation of GEVD fit is assessed base on the observed data. Four graphical analyses assist with model checking [20,75]. Figure 4 shows diagnostic plots assessing the accuracy of the GEVD model fitted. Neither the quantile plot nor the density plot has any reason to doubt the validity of the fitted model: each drawn set of points is almost linear. The return level plots asymptotically converge to a determinate value due to the positive estimates, with the curve approaches a straight line. The sample variable under consideration provides an adequate representation graphically of the empirical estimates. Finally, the corresponding density estimate appears to be consistent with the density curve. As a result, all four diagnostic diagrams support the GEVD model as in Figure 4 (Top-left: empirical plot; Top-right: empirical quartile plot; Bottom-left: density plot; Bottom-right: return level plot).

The determination of the limiting distribution by maximising the GEV negative log-likelihood for annual maximum rainfall leads to the following function in Equation (8):

$$G(z) = \exp\left\{-\left[1 + 0.00243 \left(\frac{z - 23.98}{149.03}\right)\right]^{\frac{-1}{0.00243}}\right\} \tag{8}$$

Equation (8) gave estimates of return levels for 5, 10, 20, 50, and 100-years and their 5% significant level as shown in Table 3. Thus, based on the data from 1965 to 2016, once in 50 years we should expect to see an extreme annual maximum rainfall hit between 206.5 and 279.6 mm. The upper bound of the model prediction for the 50-years Return level of 279.6, but 510 mm extreme rainfall recorded in 1968. Of course, this is undoubtedly extreme beyond regular extreme events, which is not expected based on the model's predictions. Results from Table 2, indicates that extreme maximum rainfall is steadily increasing significantly over the 100 years.

**Figure 4.** Diagnostic annual maximum rainfall plots.

```
116
```
#### *4.3. GEVD Model for Extreme Maximum Temperature*

As shown in Table 6, the estimated return level of maximum temperature likely to occur over the next 5, 10, 20, 50, or even 100 years by fitting these data to the GEVD. The maximum rainfall data yield estimates for (*μ* , *σ* , *γ*) of (41.933,0.892, 0.203), with standard errors (0.137,0.105,0.079). The approximate 95% confidence intervals for the parameters are thus (41.66,42.20) for *μ*, (0.686,1.098) for *σ*, and (0.0463,0.359) for *γ*.


**Table 6.** GEVD estimates of maximum temperature.

Analytic plots used in estimating the accuracy of the GEVD model fitted to the annual maximum temperature data shown in Figure 5 (Top-left: empirical plot; Top-right: empirical quartile plot; Bottom-left: density plot; Bottom-right: return level plot). All four diagnostic schemes provide support for fitting the GEVD to the maximum annual temperature.

**Figure 5.** Diagnostic annual maximum temperature plots.

*Climate* **2018**, *6*, 86

The determination of the limiting distribution by maximising the GEV negative log-likelihood for annual maximum temperature leads to the following function, Equation (2): (*μ* , *σ* , *γ*) of (42.081, 0.826, −0.292)

$$G(z) = \exp\left\{-\left[1 + 0.826 \left(\frac{z - 0.892}{42.08}\right)\right]^{\frac{-1}{-0.892}}\right\} \tag{9}$$

From Equation (9), estimates of return periods for 5, 10, 20, 50, and 100-years and their confidence intervals at 95% as shown in Table 6. Thus, based on the data from 1965 to 2016, once in 100 years we should expect to see an extreme annual maximum temperature hit between 43.6 ◦C and 44.4 ◦C maximum temperature. The upper bound of the model prediction for the 100-years return is 44.4 ◦C, but 65 ◦C extreme annual temperature recorded in 1989. Of course, this is also undoubtedly extreme beyond regular extreme events, which is not expected based on the model's predictions. It is revealed by Table 6, that extreme maximum temperature consistently increasing marginally over the 100 years.

#### *4.4. GEVD Model for Extreme Minimum Temperature*

In Table 7 below, the estimated return periods of minimum rainfall likely to occur over the next 5, 10, 20, 50 or even 100 years fitted to the GEVD. The maximum rainfall variable yields estimates for (*μ* , *σ* , *γ*) of (6.408, 5.261, <sup>−</sup>0.632), with standard errors (0.817, 0.758, 0.148) respectively. Approximate 95% confidence intervals for the parameters are thus (4.806, 8.011) for *μ*, (3.774, 6.747) for *σ*, and (−0.922, −0.342) for *γ*.


**Table 7.** GEV estimates of Minimum Temperature.

Equation (10) is the determination of the limiting distribution by maximising the GEV negative log-likelihood for annual minimum temperature leads to the following function:

$$G(z) = \exp\left\{-\left[1 - 0.632\left(\frac{z - 5.261}{6.408}\right)\right]^{\frac{-1}{(-0.632)}}\right\} \tag{10}$$

Supposing the relative stability of the GEVD process producing estimates for annual minimum temperature in degree Celsius (◦C), the model estimates that the 5-year return level is 11.5 ◦C with 95% confidence interval (10.4, 12.7). For ten years it is a 12.7 ◦C extreme minimum temperature with 95% confidence interval (11.9, 13.6), and for 50 years it is 14.0 ◦C extreme minimum temperature with 95% confidence interval (13.2, 14.8). Thus, based on the data from 1968 to 2016, once in 100 years we should expect to see an extreme annual minimum temperature hit between 13.3 ◦C and 15.2 ◦C. For the period under annual extreme minimum temperature, there was no extreme beyond normal extreme events. In Table 7, the extreme minimum temperature is consistently increasing over the 100 years' duration. In Figure 6 (Top-left: empirical plot; Top-right: empirical quartile plot; Bottom-left: density plot; Bottom-right: return level plot), all four diagnostic schemes provide support for fitting the GEVD to the minimum annual temperature.

**Figure 6.** Diagnostic annual minimum temperature plots.
