Introduction

Global temperatures have risen, and climate warming has accelerated in recent decades. However, as global climate change accelerates, more frequent extreme weather events have an increased impact on agriculture, which heavily depends on natural resources. According to experts, climate change’s pressure on crop production is significant (Wilson et al. 2022). Food production has experienced significant adverse shocks due to the stress of climate change (such as an increase in disaster zones and a decrease in food output), which can result in hunger and malnutrition. Since then, these topics have risen to the forefront of international discourse in many countries. Indeed, scientists argue that various regions should investigate concrete remedies to the negative consequences of climate change, such as encouraging farmers to participate in adaptive behavior training (Moore and Lobell 2014), improving irrigation systems (Aragón et al. 2021), and further developing a “climate-smart agricultural system” (Wheeler and von Braun 2013).

Most economies in developing nations rely on farming, making them more susceptible to climate change and severe weather (Mendelsohn 2014). It is also expected that severe occurrences, including hot extremes, droughts, and heatwaves, may become more common and intense (Zaman et al. 2020). A variety of extraordinary events have occurred in Pakistan, just as in other countries; a dramatic change in rainfall, particularly droughts and a continuous increase in temperature over the previous 30 years, is particularly notable (Abbas 2013; Ali and Ahmad 2015; Khan et al. 2019c; Nawaz et al. 2019; Xie et al. 2013; Zahid and Rasul 2011). In most areas of Pakistan, droughts have significantly impacted the agricultural system, cropping pattern, annual production, and economy; circumstances could worsen in the future (Khan et al. 2020). Because of this type of climate variability seriously threatens Pakistan’s agricultural economy (Janjua et al. 2010). Such facts demonstrate how critical it is to understand how drought-resistant agricultural production is to develop effective policies and strategies to minimize the consequences of drought in the coming years (Zipper et al. 2016).

Over the past few years, the agricultural industry in northern Pakistan has been impacted by cyclone occurrences and a notable monsoon trend change caused by rising temperatures (Abubakar 2020). Regarding climate change vulnerability, Pakistan ranks fifth globally. Such effects of climate change will be disastrous as Pakistan’s population increases and concomitant urbanization (Anwar et al. 2020) and agriculture and livelihoods (Awan and Yaseen 2017). Over 25 million people are employed in Pakistan, a nation with a robust agricultural economy. Pakistan has the sixth-highest population density in the world, with a 2% annual population growth rate (Awan and Yaseen 2017).

The seasons of Kharif and Rabi are used for cultivating crops in Pakistan. While wheat is one of the critical yields, other Kharif crops include rice, sugarcane, turmeric, and maize. Summer is the growing season for Kharif crops, which are sown in February for maize and cotton, March for rice, June for cotton, and February for sugarcane. Crops are susceptible to temperature and water supply fluctuations in irrigated and flooded agricultural systems. Burning fossil fuels at an industrial scale is likely the primary cause, resulting in substantial greenhouse gas emissions that trap heat at high altitudes. This rise in global average temperature has hastened the repercussions of climate change, accelerating global warming. By 2040, agricultural productivity is anticipated to have decreased by 8–10% due to rising temperatures (Cradock-henry et al. 2020). Various agronomic and social factors, such as the availability of labor due to seasonal weather variations, pesticides and water, and climate change, substantially impact wheat crops. The productivity of winter (Rabi) crops depends on heavy summer and Kharif rainfall. Numerous additional studies came to the same conclusion: Changes in agricultural yield also reflect the same results. According to the International Institute for Applied Systems Analysis (IIASA), all main crops and grains will see a reduction in yield by 2080, with wheat production plummeting the greatest. Accessible through the World Bank Knowledge Portal, these ominous forecasts force Pakistan to make significant adjustments and interferences. Climate change challenges our critical agricultural production systems, including wheat, maize, cotton, rice, and sugarcane. Temperatures are forecast to climb by 5–6 °C by the end of the century, resulting in Asian countries losing up to 50% of their wheat yield due to a predicted 3 °C temperature increase by 2040. Pakistan will suffer a higher loss due to its geographical position in this situation. Wheat and rice, the two most important crops and essential food in Pakistani agriculture, have significantly declined due to climate change, shooting up market prices (Haq et al. 2021). There are still 0.793 billion people who do not have access to enough food. Due to climate change, there will be a considerable increase in malnutrition and a threat to food security (Hughes 2020).

Current circumstance of maize production

One of Pakistan’s agricultural sector’s food and cash crops, maize, is also used for fodder and feed. Maize (Zea mays L.), sometimes known as corn or Indian corn, is an essential food crop that is representative of the Poaceae family plant (Gramineae) (Piperno and Flannery 2001). It is mainly used as human, poultry, and livestock food. In Pakistan, it is the third most important cereal crop after rice and wheat. It is a high-yielding crop throughout the world. Khyber Pakhtunkhwa (KPK) and Punjab, mainly two provinces, produce most of the world’s maize, with Sindh and Balochistan contributing a small fraction. The Pakistani government imposes 10% customs fees and 30% regulatory duties on corn imports. However, domestic maize costs in Pakistan are higher than those found worldwide (Rehman et al. 2016a, b). Production of maize makes up 2.9% of total agricultural output and 0.6% of GDP, per the Pakistan Economic Survey (GOP 2020). However, due to global climate change’s profound effects, maize production is falling everywhere. Their study (Ammani et al. 2012) looked into the consequences of drought stress and high temperatures on maize harvests during the 1990–2005 period in Kaduna State, Nigeria (Khan et al. 2019b). There are effects of the global climate on five districts in Pakistan’s Punjab province (Mansehra, Swat, Chitral, Dera Ismail Khan, and Peshawar) between 1996 and 2015. The preliminary results showed that higher temperatures harmed maize output, while higher rainfall amounts had a markedly favorable effect.

Twice a year, maize is planted in the spring and again in the fall (locally known as Kharif). Meanwhile, summer maize is planted in July and August and harvested in September and December. Drought stress during the reproductive or mature stages of the maize crop might affect yields since water is crucial to the plant’s life cycle. The pre-flowering, flowering, and post-flowering periods are all vulnerable to a 21%, 25%, and 50% loss in yield if water is not provided (Sah et al. 2020). An estimate shows that between 1980 and 2010, climate change reduced world maize yield by 3.8% (Lobell et al. 2011). To mitigate the negative consequences of future droughts, it is necessary to understand the spatial and temporal variation of drought effects on maize crop output. The timing (i.e., the time of year when drought occurs) and chronology of drought are two of the most crucial factors in determining its impact on crop productivity (i.e., duration of drought). Government agencies and interested parties can use this information to create strategies to lessen the impact of drought. In addition, stakeholders can better prepare for regional changes in actual and realized crop output under the stress of future climate change by understanding the spatial pattern of crop drought sensitivity and fluctuations in those patterns over time (Zipper et al. 2016). A plethora of studies have been conducted in Pakistan to investigate the effects of climate change on the productivity of maize crops (Li et al. 2011; Xiao et al. 2020), climate change adaptive approaches (hybrid cultivar) for productions (Cabezas et al. 2020; Miller et al. 2018; Rehman et al. 2019) as well as climate change technology adoption (Lybbert and Sumner 2012; Rehman et al. 2016a, b).

Kharif and Rabi are two distinct cropping seasons in Pakistan and other South Asian countries that are determined by the monsoon season. During the Kharif season, farmers typically cultivate crops that are adapted to the rainy weather and require a lot of water to grow, such as rice, maize, sugarcane, cotton, and jute. On the other hand, during the Rabi season, farmers typically cultivate crops that can withstand the dry and cold weather, such as wheat, barley, peas, chickpeas, and mustard (Pakistan-Agricultural Research Project 2018).

Here is a list of some common crops grown during each season: Kharif crops like rice, maize, sugarcane, cotton, jute, groundnut, bajra (pearl millet), tur (pigeon pea), moong (mung bean), urad (black gram), guar, and sesame, rabi crops like wheat, barley, mustard, chickpea (bengal gram), peas, oats, linseed, cumin and coriander (Pakistan-Agricultural Research Project 2018).

These seasons are crucial for Pakistani agriculture, as they allow farmers to grow different crops in different seasons, which help to maintain soil fertility, conserve water resources, and maximize crop yields. In recent years, climate change has had an impact on the Kharif and Rabi seasons in Pakistan, leading to changes in the timing and intensity of the monsoon season and affecting crop yields (Syed et al. 2022).

This study is multifold in that it provides hypothetical stochastic outcomes. First, evaluate the short- and long-run province and how meteorological factors and fertilizer consumption impact maize production in Pakistan. Second, based on various meteorological factors, the developed statistical approach is used to estimate the benefits and drawbacks of maize production. Third, the study’s outcomes will benefit critical stakeholders, such as farmers, agronomists, and disaster agencies, in planning appropriate contingency plans for sustainable growth in Pakistan’s agricultural provinces.

The following are the specific objectives:

To examine the association between meteorological factors and consumption of fertilizer that influence maize production in Pakistani provinces from 2001 to 2020.

To identify significant factors for evaluating climate dissimilarity that deteriorates maize production in the short and long term.

Recommend adaptation strategies for improving food security and climate change adaptation strategies.

Several econometric methods, such as the breakpoint unit root tests and the ARDL bound testing strategy for cointegration, are used to arrive at the findings of the present investigation; the parametric stability approach is validated by utilizing Cumulative sum (CUSUM) and CUSUM of squares (CUSUMSQ) tests, and various diagnostic tests are used to ensure the validity of the results. This research is divided into five sections. Following the “Introduction” section introduction and presentation of the current condition of maize production, “Literature review” section reviews the literature on maize production in the provinces of Pakistan. “Study methods and data sources” section summarizes the information and explains the variables. “Results and discussions” section discusses the results of the econometric models. “Conclusion and policy recommendations” section of the study concludes with a conclusion and recommendations.

Literature review

Climate change and agricultural dissimilarity have attracted experts worldwide to contribute to human well-being by securing agricultural production via various approaches and techniques. Previous studies have shown that climate variation not only causes temperature rises and impacts cultivated efficiency, but also impacts crop quality. Multiple types of research on the effects of climate change on agricultural productivity have been conducted in Pakistan (do Prado Tanure et al. 2020; Meijl et al. 2018; Wang et al. 2013). Prior research from a background review revealed that meteorological variation causes temperature increases and non-periodic rainfall patterns, which harms major grain crops and reduces crop quality and productivity (Amponsah et al. 2015). Using the ARDL technique, Gul et al. (2022a) assess the impact of climatological and non-climatic influences on rice cultivation in Pakistan (1970–2018). The annual temperature harmed the rice crop harvest, but long-term carbon dioxide emission had a positive effect. Like labor force, rice crop acreage, fertilizer use, and water availability, non-climatic elements positively impact rice output. Thapa et al. (2022) conducted a study to predict Nepal’s vegetable crop acreage, production, and productivity, while area and production values were rising, the Box-Jenkins method revealed that productivity projection had lower values. From 1989 to 2018, Kabir et al. (2021) used the Cob-Douglas manufacturing process and the ARDL approach in the Humania province of the Netherlands to confirm the long- and short-run causal links among global climatological factors with the average global temperature, CO2 emissions, and precipitation rate and rice crop yields. According to the study, a 1% increase in CO2 production negatively influences rice food crop yield, a 1% surge in temperature decreases rice crop output by 1.60%, and a one percent upsurge in rainfall enhances rice crop yield by 0.80%. Gul et al. 2022b examined the climate variation (rainfall and global temperature) as well as non-environment change variables (loan disbursement, area under rice agriculture crop, and consumption of fertilizer use). The researcher used the Granger causality examination and the ARDL method to validate his findings and the existence of causal relationships among the parameters under examination. The outcomes demonstrate that the causative relationship between the variables was discovered. Chandio et al. (2020a, b) studied how climate conditions affected the production of cereals in Turkey from 1968 to 2014. According to the study, rainfall positively influences cereal production; however, the long-term and short-term effects of CO2 emissions and temperature are negative. Sarkar et al. (2020) evaluated the effects of climate change on oil palm yield in Malaysia using multiple regression techniques from 1980 to 2010. The results depict that oil palm invention rises from 10.0 to 41.0% due to a temperature rise of 1.0–4 °C. Data from 1982 to 2014 in China (Chandio et al. 2020a, b) used the ARDL method to study the relationship between climate variability and agricultural crop productivity. They found that CO2 emissions had both a long-term and short-term, considerably positive impact on crop yield. They also stated that while temperature and precipitation harm crop harvest, it has a short-term positive impact in the long run. The influence of yearly temperature and precipitation on cereal crops was examined by Elahi et al. (2020). Using the Cob-Douglas production function, the author determined that a rise in the minimum and average temperatures brings on the decline in wheat, rice, and maize yields in India. Increasing agricultural output while safeguarding our food crops from the detrimental consequences of climate change is possible (Rahman et al. 2019). Using the ARDL model, Khan et al. (2019b) assessed the global climatic effects on five districts in Pakistan’s Punjab province (Mansehra, Peshawar, Chitral, Dera Ismail Khan, and Swat) from 1996 to 2015. The major results show that temperature negatively interacts with maize output, whereas precipitation has a favorable and considerable impact on maize productivity. The effect of the climate on Bangladesh’s irrigation- and rain-fed rice yields was evaluated by Gorst et al. (2018). The study discovered that rice food crop yield decreased by 11.0% and 7.0%, respectively, in Bangladesh’s irrigated water areas and rain-fed areas. From 1980 to 2014, Abbas et al. (2017) looked at the effects of the world’s climatological system on the phenology and maize crop agriculture in Pakistan’s Punjab province. The study found that climate change has negatively impacted spring, summer, and fall maize phenology. Similarly, Zaied and Zouabi (2016) used the fully modified OLS (FMOLS) method to investigate how the climatic change affected olive production in Tunisia between 1980 and 2012. According to the findings, olive production decreases as temperature increases. According to Janjua et al. (2014), the invention of Pakistan’s main crops (maize, wheat, and rice) is positively impacted by CO2 emissions, yearly temperature, and annual rainfall both in the long run and the short term. In a different study, using long-run experimental data from 1965 to 2005, Traore et al. (2013) looked into the impacts of climate change on Mali’s food and non-food crops. The results showed that cotton production is negatively impacted by seasonal rainfall and the greatest temperature but that corn yield is positively impacted by rainfall. Ammani et al. (2012) used multiple regression techniques to observe the effects of rainfall, fertilizer use, and planted area on maize food production in Nigeria from 1990 to 2005. The conclusions supported the hypothesis that rainfall had a significant and favorable effect on Nigerian maize.

Study methods and data sources

Area of study

Pakistan spans the coordinates 24°–37° north and 61°–76° east in South Asia. In Pakistan, the agricultural industry is still the most significant economic sector; almost 38% of the population’s livelihoods are directly or indirectly related to the sector (Jan et al. 2020). Pakistan’s population, which represents 2.83% of the world’s population and has a poverty rate of 32%, faces a severe challenge. As a side effect of declining agricultural output, the poor’s susceptibility to food insecurity will rise. With multiple threats, including resource depletion, pollution, insufficient rainfall, and temperature rise, Pakistan’s agriculture sector is less productive than in the past (Kabir et al. 2021; Shakoor et al. 2015).

Data framework

In this study, the researchers converted annual data into quarterly periods using a technique proposed by Shahbaz et al. (2013). This technique allowed them to capture seasonal time variations and convert low-frequency data into high-frequency data. The research analyzed quarterly data from 2000Q1 to 2020Q4 for four provinces of Pakistan—Sindh, Punjab, Balochistan, and Khyber-Pakhtunkhwa. By using quarterly data, the researchers were able to better understand the economic trends and fluctuations in these provinces over the past two decades.

The studied variables, including maize production as a response variable and non-climatological and climatological factors, are independent: fertilizer consumption, evapotranspiration, relative humidity at the surface, rainfall, and surface air temperature. Data for maize production and fertilizer consumption are taken from the Pakistan Statistical Year Book publications (PBS), while climatological factors from GIOVANNI (https://giovanni.gsfc.nasa.gov/giovanni/) have been used to download. The list of research instruments and the number of observations (Obs.) is shown in Table 1.

Table 1 List of research instruments

Climate and non-climate variables plot of time series

Climatological and non-climate factor plots are shown in the figures below, illustrating the trend in Pakistan provinces over the last few decades from 2000 to 2020.

Time series plot of maize production

Figure 1 depicts the evolution of maize production in Pakistan’s provinces over time. The production of maize in Punjab and KPK is shown on the left y-axis; it is trending upward in Punjab, while it was nearly constant in KPK from 2000 to 2020. The right y-axis displays the production of maize formed in Sindh and Balochistan. It reveals that the trend line increases and decreases for a specific period of time in both of these provinces.

Fig. 1
figure 1

Provinces-wise maize production (thousand metric tonnes)

Time series plot of fertilizer consumption

The provinces of Pakistan’s consumption of fertilizer over time are shown in Figure 2. On the left y-axis, the consumption of fertilizer in Punjab and Sindh is depicted; while it is trending upward in Punjab from 2000 to 2020, it was nearly constant in Sindh. The fertilizer consumption in KPK and Balochistan is shown on the right y-axis. It demonstrates that the trend line in both of these provinces increases and decreases for a specific period of time. The consumption of fertilizer in Punjab, KPK, and Balochistan has decreased in 2016, as shown by structural fractures in the time series plot. Some of these breaches may be related to the implementation of economic and environmental regulatory frameworks in these regions.

Fig. 2
figure 2

Provinces-wise fertilizer consumption (thousand nutrient tonnes)

Time series plot of surface air temperature

The air temperature in Pakistan’s provinces is shown in Figure 3 for the period 2000–2020. On the left y-axis, the air temperature in Sindh and KPK is displayed. In both of these provinces, it has experienced some waves or environmental regulatory frameworks before declining in recent years. The air temperature in Punjab and Balochistan is shown on the right y-axis. It reveals that the trend line in both of these provinces goes upward and downward for a particular duration of time and then decreases after 2017.

Fig. 3
figure 3

Provinces-wise surface air temperature (C)

Time series plot of evapotranspiration

Figure 4 displays the evapotranspiration for the provinces of Pakistan from 2000 to 2020. The evapotranspiration graph shows that there is an irregular pattern in all of the provinces, but that some abruptly changed to a decreasing trend from 2017 to 2018.

Fig. 4
figure 4

Provinces-wise evapotranspiration (kg m−2 s−1)

Time series plot of rainfall

The annual rainfall that recorded across all of Pakistan’s provinces is depicted in Figure 5 for the years 2000–2020. As can be observed from the time series plot, Punjab and Sindh are located on the left y-axis, and KPK and Balochistan are located on the right y-axis. All of the provinces have an uneven pattern with increasing and decreasing rainfall, while Punjab has exhibited a steady variation over the entire time period. On the other side, the plot demonstrates that Sindh, KPK, and Balochistan province all had a substantial turn toward a decreasing trend during 2017 and 2018.

Fig. 5
figure 5

Provinces-wise rainfall (kg m−2 s−1)

Time series plot of relative humidity

Figure 6 shows the relative humidity that was observed across all of Pakistan’s provinces. Similar to the other parameters, the plot shows that all of the provinces saw a significant change toward a declining trend during 2018, followed by an increase. All of the provinces have a fluctuating pattern with increasing and decreasing relative humidity.

Fig. 6
figure 6

Provinces-wise relative humidity (%)

Research workflow

Figure 7 depicts a graphical representation of research methodology. This exemplifies the research workflow in this study.

Fig. 7
figure 7

Research workflow

Econometric technique

A time series is viewed as stationary once statistical parameters like mean, variance, and auto-correlation remain constant over the period. A timeline with a unit root denotes an unpredictable, unexpected orderly pattern. Non-stationary data are often involved in time series analysis. As an illustration, using Ng and Perron (2001), P–P (Phillips and Perron 1988), and KPSS (Kwiatkowski et al. 1992) are used to address the stationary problem. Recent research has utilized Zivot and Andrews (1992) breakpoint augmented Dickey–Fuller (ADF) to examine the series’ stationarity; this test is preferable to others because it can handle more sophisticated scenarios (Mehmood et al. 2021). The ADF unit root test equation is as follows:

$$\Delta x_{t} = \alpha x_{t - 1} + \mathop \sum \limits_{i = 1}^{p} \beta_{i} \Delta x_{t - i} + \left( {{\text{constant}}, {\text{time}} \;{\text{trend}}} \right) + \mu_{t,}$$
(1)

where \(x_{t - 1}\) is the first lag of x, whereas \(\Delta x_{t}\) is the first difference of x, the lag-differenced form of x is \(\Delta x_{t - i}\). ‘\(i\)’ is the random variable with a range is \(i\) = 1, 2,…, \(p\), whereas \(P\) is the lag order of the autoregressive process. βi shows the coefficient values. The term \(\mu_{t}\) denotes the serial correlation error term. The ADF test’s null hypothesis is that series have a unit root, i.e., (\(\alpha = 0\)), while the alternative is that series does not have a unit root, i.e., (\(\alpha < 0\)).

ARDL cointegration technique

The unit root test is previously used to establish the variables’ integration order; however, it is found to be unstable; therefore, the ARDL method is created to sidestep these prerequisites (Duasa 2007). ARDL’s technique is developed by Pesaran et al. (2001) and excludes the same co-integrating series patterns that are manually differentiated into I(0) or I(1) (Ibrahim and Law 2016; Meo et al. 2018). The lag length of both exogenous and endogenous variables is considered by one of the most critical long-term ARDL methods, which eliminates endogeneity issues and generates exact outcomes (Uzar 2020). The lower and upper bounds are the two essential values. The null hypothesis of no cointegration is rejected if the F-statistic result exceeds the upper bound and it is discovered that the variables have a long-term interaction; whenever the projected F-statistic is less than the lower bound, the null hypothesis is not rejected; however, when it is in between the lower and as well in upper bounds, it is decided that there is no long-term link and whether or not conclusive evidence of cointegration between the variables is found (Pesaran et al. 2001).

Specification of the model

According to the null hypothesis, climate change has not impacted maize output in Pakistani regions. An estimate of the hypothesis has been made by using ARDL cointegration methods to the resulting equation. It illustrates how maize can be used in both food production and vital scientific methods, defined as follows:

$${\text{Maize production}} = \beta_{0} + \beta_{1} {\text{FC}} + \beta_{2} {\text{SAT}} + \beta_{3} {\text{ET}} + \beta_{4} {\text{RH}} + \beta_{5} {\text{RF}} + \varepsilon_{{t^{\prime}}} .$$
(2)

The ARDL method evaluates the long- and short-term interaction between the selected study tools as follows:

$$\begin{aligned} \Delta {\text{MP}}_{T} = & \beta_{0} + \mathop \sum \limits_{i = 1}^{p} \beta_{1i} \times \Delta {\text{FC}}_{t - i} + \mathop \sum \limits_{i = 1}^{p} \beta_{2i} \times \Delta {\text{SAT}}_{t - i} + \mathop \sum \limits_{i = 1}^{p} \beta_{3i} \times \Delta {\text{ET}}_{t - i} + \mathop \sum \limits_{i = 1}^{p} \beta_{4i} \times \Delta {\text{RH}}_{t - i} + \mathop \sum \limits_{i = 1}^{p} \beta_{5i} \times \Delta {\text{RF}}_{T - i} \\ & \, + \theta {\text{FC}}_{t - 1} + \theta {\text{SAT}}_{t - 1} + \theta {\text{ET}}_{t - 1} + \theta {\text{RH}}_{t - 1} + \theta {\text{RF}}_{t - 1} + \varepsilon_{t} . \\ \end{aligned}$$
(3)

The short-run relationships between maize production are also examined using an error correction model (ECM) technique can be written as follows:

$$\Delta {\text{MP}}_{T} = \beta_{0} + \mathop \sum \limits_{i = 1}^{p} \beta_{1i} \times \Delta {\text{FC}}_{t - i} + \mathop \sum \limits_{i = 1}^{p} \beta_{2i} \times \Delta {\text{SAT}}_{t - i} + \mathop \sum \limits_{i = 1}^{p} \beta_{3i} \times \Delta {\text{ET}}_{t - i} + \mathop \sum \limits_{i = 1}^{p} \beta_{4i} \times \Delta {\text{RH}}_{t - i} + \mathop \sum \limits_{i = 1}^{p} \beta_{5i} \times \Delta {\text{RF}}_{t - i} + {\text{ECT}}_{t - 1} + \varepsilon_{t\prime } .$$
(4)

The parameter βi specifies the short-run dynamic coefficient (\(i\) = 1, 2,…, k + 1), and the speed at which the underlying ARDL model transitions from the short to the long run is specified by \({\text{ECT}}_{t - 1}\).

Diagnostics test for ARDL model

Pesaran (1974) exemplified that the method can only be regarded as an accurate model after it must fulfill all classical linear regression models (CLRM) presumptions. The two primary diagnostic assumptions of the ARDL model are that the error terms are accurate and that the endogenous variable’s residuals must be uncorrelated (Menegaki 2019). There is no heteroscedasticity since homoscedasticity assumes that the residual variability in the response variable stays consistent. To assess how closely this model resembles the appropriate model for valid and trustworthy inferences, this study examines additional assumptions such as the absence of serial correlation, heteroscedasticity, and normality of the response variable. CUSUM and CUSUMSQ results are used in stability testing to evaluate a developed model’s effectiveness.

Results and discussion

Summarize the descriptive

Environmental challenges in Pakistan’s provinces are being evaluated by studying the effects of climate change on maize agricultural productivity. Table 2 summarizes the descriptive statistics, which demonstrates that there are constant variances and no significant outliers.

Table 2 Summary statistics of maize production and climatological factors

Test for unit roots trends

None of the components is stationary at the second differential, according to the unit root test results, shown in Table 3. With structural fractures, however, all factors remain constant. Certain breaches could be linked to establishing economic and environmental regulatory frameworks in these areas of the economy. Constant variation at the mixed level via I(0) or I(1) integration demonstrates a long- and short-term relationship between the factors for the model of ARDL.

Table 3 Trends of ADF unit root test

ARDL long-run bounds test

It is employed that the cointegration bound test is used to evaluate the long-term equilibrium, and the outcomes are presented in Table 4. F-statistics exceed upper critical value, which ranges at the 5% significance level, indicating that factors are cointegrated. The R2 and adjusted R2 also demonstrate the ARDL approach’s validity.

Table 4 ARDL long-run bounds test

This suggests that the production of maize food crops and long-term equilibrium is related to fertilizer consumption, surface air temperature, evapotranspiration, relative humidity, and rainfall. This outcome is comparable to maize food efficiency (Li et al. 2011; Xiao et al. 2020; Srivastava et al. 2021), indicating that maize food crop has a long-term relationship with climatological factors.

Consequently, validating long-term relationships, Table 5 represents the dynamics study outcomes to investigate both short- and long-term relationships.

$$\begin{aligned} {\text{Maize Production}}_{{({\text{Punjab}})}} = & 12.89 + 1.01{\text{FC}}_{{\left( {t - 1} \right)}} - 4.16{\text{ SAT}}_{(t - 1)} + 1.835{\text{ ET}}_{{\left( {t - 1} \right)}} + 0.13{\text{ RH}}_{{\left( {t - 1} \right)}} \\ & \,{-}1.55{\text{ RF}}_{{\left( {t - 1} \right)}} + 0.822\Delta {\text{FC}}_{(t - 1)} {-}1.052 \, \Delta {\text{SAT}}_{(t - 1)} + 0.547 \, \Delta {\text{ET}}_{{\left( {t - 1} \right)}} \\ & \, + 1.263 \, \Delta {\text{RH}}_{{\left( {t - 1} \right)}} {-}0.934 \, \Delta {\text{RF}}_{{\left( {t - 1} \right)}} {-}0.459{\text{ ECT}}_{(t - 1)} + \varepsilon_{i.} \\ \end{aligned}$$
(5)
Table 5 Trends to estimate both short- and long-term factors

In the long run, surface air temperature is the most crucial factor in Punjab maize food production, whereas, in the short run, relative humidity is an essential factor. Speed of adjustment (\({\text{ECT}}_{ - 1}\)) demonstrates a highly significant and negative relationship, indicating that after a 1-unit increase in the period, maize production will approach the long-run balance point at a rate of 0.46%. Fertilizer consumption, evapotranspiration, and surface air temperature have considerable and positive interaction with maize food crop outcome in Punjab, except for rainfall, which has a negative relationship and relative humidity, which has an insignificant relationship. According to the previous study, Waseem et al. (2022) demonstrate that Punjab is becoming more vulnerable to drought events, with significant random patterns in drought effects and sensitivity over the period. Pakistan’s average annual temperature has risen by 0.5 °C during the previous 20 years, causing a decline in agriculture yields (Gul et al. 2022a). The background study also showed that such results are noted by (Zaied and Cheikh 2015). They have discovered that cereal crop yield is declining due to a rise in the country of Pakistan’s highlands’ annual temperature. In Pakistan’s Punjab province, Elahi et al. (2020) looked into how high temperatures affected the yield of grain crops.

$$\begin{aligned} {\text{Maize Production}}_{{({\text{Sindh}})}} = & \, 0.015{-}1.529{\text{ FC}}_{{\left( {t - 1} \right)}} {-}2.888{\text{ SAT}}_{(t - 1)} + 0.845{\text{ ET}}_{{\left( {t - 1} \right)}} \\ & \, + 0.938{\text{ RH}}_{{\left( {t - 1} \right)}} {-}0.768{\text{ RF}}_{{\left( {t - 1} \right)}} {-}0.710\Delta {\text{FC}}_{(t - 1)} + 11.831 \, \Delta {\text{SAT}}_{(t - 1)} \\ & \, + 1.092 \, \Delta {\text{ET}}_{{\left( {t - 1} \right)}} + 0.901 \, \Delta {\text{RH}}_{{\left( {t - 1} \right)}} {-}0.671 \, \Delta {\text{RF}}_{{\left( {t - 1} \right)}} {-}1.011{\text{ ECT}}_{(t - 1)} + \varepsilon_{i.} \\ \end{aligned}$$
(6)

Fertilizer consumption has the most significant long-term impact, whereas surface air temperature has the highest short-term impact on Sindh maize food production. Speed of adjustment (\({\text{ECT}}_{ - 1}\)) shows a highly significant and negative connection, which indicates that after a 1-unit increase in the period, Sindh maize food production will go toward long-run equilibrium with the rate of 1.01%. Fertilizer consumption, evapotranspiration, and rainfall have a meaningful correlation with maize production, whereas air temperature and relative humidity have a negligible relationship with maize crop in the long- term. Just like consumption and rainfall have a negative impact on Sindh maize production, previous research by Ahmed and Schmitz (2011) revealed that as a result, researchers could expect lower levels of productivity in arid zones with increased climatic pressure, as well as adverse effects on food security due to lower agricultural yields.

$$\begin{aligned} {\text{Maize Production}}_{{({\text{KPK}})}} = & \, 0.001 + 0.187{\text{ FC}}_{{\left( {t - 1} \right)}} {-}0.590{\text{ SAT}}_{(t - 1)} + 2.208{\text{ ET}}_{{\left( {t - 1} \right)}} {-}1.725{\text{ RH}}_{{\left( {t - 1} \right)}} \\ & & \,{-}1.725{\text{ RF}}_{{\left( {t - 1} \right)}} + 0.198\Delta {\text{FC}}_{(t - 1)} {-}0.912 \, \Delta {\text{SAT}}_{(t - 1)} + 1.430 \, \Delta {\text{ET}}_{{\left( {t - 1} \right)}} \\ & \,{-}0.889 \, \Delta {\text{RH}}_{{\left( {t - 1} \right)}} {-}0.975 \, \Delta {\text{RF}}_{{\left( {t - 1} \right)}} {-}1.00{\text{ ECT}}_{(t - 1)} + \varepsilon_{i.} \\ \end{aligned}$$
(7)

Evapotranspiration has the most significant long-term and short-term impact on KPK maize food production. The adjustment speed (\({\text{ECT}}_{t - 1}\)) shows a highly significant and negative relationship, denoting that maize production will reach long-run equilibrium at a rate of 1% after a one-unit increase in the period. All variables have a long-term relationship with KPK maize production except for relative humidity. The current observations are noted from previous research by Jan et al. (2021; Khan et al. (2019a), which is found that air temperature application has a significant negative connection to maize crop production in KPK. According to Haidar et al. (2016), climate parameters negatively impact Rabi and Kharif crops in KPK.

$$\begin{aligned} {\text{Maize Production}}_{{({\text{Balochistan}})}} = & {-}0.007 + 0.004{\text{ FC}}_{{\left( {t - 1} \right)}} + 6.552{\text{ SAT}}_{(t - 1)} + 1.033{\text{ ET}}_{{\left( {t - 1} \right)}} {-}0.572{\text{ RH}}_{{\left( {t - 1} \right)}} \\ & \,{-}0.573{\text{ RF}}_{{\left( {t - 1} \right)}} {-}0.220\Delta {\text{FC}}_{(t - 1)} + 2.478 \, \Delta {\text{SAT}}_{(t - 1)} + 0.753 \, \Delta {\text{ET}}_{{\left( {t - 1} \right){-}}} 0.861 \, \Delta {\text{RH}}_{{\left( {t - 1} \right)}} \\ & \,{-}0.781 \, \Delta {\text{RF}}_{{\left( {t - 1} \right)}} {-}1.004{\text{ ECT}}_{(t - 1)} + \varepsilon_{i} . \\ \end{aligned}$$
(8)

In both the long and short term, the surface air temperature significantly impacts Balochistan maize food production. The adjustment rate shows a highly significant and negative relationship, suggesting that after an increase of 1 unit in the time frame, maize production is approaching long-run equilibrium at a rate of 1%. Surface air temperature, evapotranspiration, and rainfall show a significant long-run relationship with maize production in Balochistan province, whereas fertilizer consumption and relative humidity show no relationship. According to the background study, Khan et al. (2022) also show that rainfall negatively impacts crop yield in Balochistan, which is primarily affected by climate change. The rates of loss percentage during the shelling process for maize food varieties are lowest when the humidity is low, according to AL-Aaty and Al-Jomaily (2021).

Previous studies by Chandio et al. (2018, 2019); Janjua et al. (2014), which discovered that fertilizer application had a considerable impact on maize crop productivity throughout Pakistan, support the current findings. Prior studies have also discovered that evapotranspiration remains high in Pakistan throughout the year. The monsoon alleviates moisture stress in these areas, meeting crop water demand (Ohana-Levi et al. 2020; Rasul 2003). Prior studies confirm (Leng and Huang 2017) finding that rainfall negatively influences the maize food crop.

The consistency of model results for all provinces is shown in Table 6. It demonstrates the heteroscedasticity value, which is highly insignificant, indicating that there is no proof of heteroscedasticity. To ascertain whether or not residuals exhibit serial correlation, the Breusch–Godfrey test is performed. This finding indicates no evidence of serial correlation in the residuals. Ramsey RESET shows that the functional form defined by the calculated model is correct. CUSUM and CUSUMSQ model stability and efficiency assume constant residual variance throughout the investigation.

Table 6 Diagnostic tests for ARDL model

Conclusion and policy recommendations

Pakistan’s position is the seventh-largest agriculture producer in the world, while also being the fifth-most vulnerable country to climate change. The vulnerability can be attributed to Pakistan’s rapid economic expansion, geographical location, and outdated agricultural practices. This study is conducted to investigate the effects of climate change on Pakistan’s primary food crop, maize production, using quarterly data from 2000 to 2020. The study utilized breakpoint unit root tests to confirm the stationary properties of the variables. The results indicated that all variables remained consistent with structural breaks and could be attributed to establishing environmental and economic policies for the industry. The constant variation at the maximum first integration level demonstrated a long- and short-term relationship between the elements of the ARDL model. It is unclear whether this time period is sufficient to capture the long-term effects of climate change on agriculture. Future research may consider using longer time periods or incorporating historical data to better understand the impact of climate change on agriculture.

The fertilizer consumption plays a critical role in increasing maize production in Pakistan’s provinces, with a positive correlation observed between fertilizer consumption and maize production in Punjab and KPK, while a negative correlation is found in Sindh. The study’s long-term estimates indicate that maize production will decrease in Punjab and KPK provinces due to rising air temperatures, while maize production in Balochistan and Sindh will increase. Moreover, long-term estimates show that maize production increases with a rise in evapotranspiration in all provinces, while relative humidity has no significant long-term relationship with maize food crops. Furthermore, rainfall estimates reveal that increased rainfall will cause a decline in maize production in all provinces of Pakistan, and there may be a negative impact on maize yields due to a slight increase in rainfall over time. This study found that chemical fertilizers are crucial to raising the production of food crops, and it does not address potential negative environmental impacts of fertilizer use, such as pollution of water sources or soil degradation. Future research may consider exploring sustainable agriculture practices that can help mitigate these negative effects.

Policy recommendations are based on scientific evidence due to a solid bidirectional consequential link between maize output, fertilizer consumption, and climatic parameters. Improving the flexibility of climate-resistant technology is urgently required to raise the production of vital food crops. The excessive demand and supply of energy sources harm the environment and release greenhouse gases (GHGs). As a result, there needs to be stringent regulation of climate-altering practices by the government. Suppose, it is wanted to lower greenhouse gas emissions. In that case, the government must implement policies that encourage the use of renewable energy sources like wind and solar, as well as the expansion of hydropower and the supply of subsidies to farmers so they may invest more in biomass projects. The government must encourage food producers to use green fertilizer because it has a high concentration of organic matter that fixes nitrogen, preserving soil fertility and reducing the negative effects of high temperatures on agriculture production. However, this policy needs to provide specific recommendations on achieving this or incentivizing farmers to invest more in biomass projects. Further research may explore potential policy options and their feasibility.

It is also recommended that enhanced grain production types resistant to heat and drought be developed and employed to assist in securing the country’s food and nutrition security in the face of the adverse consequences of climate change. Further to that, government agricultural officers should focus more on farm management about climate change adaptation strategies such as changing sowing dates, plant rotational movement, plant diversification, mulching, and so on, as well as various meteorological government agencies, might also establish direct contact with agricultural producers by phone and provide timely updates for accelerating progress. Eventually, this study opens up new research avenues by focusing on fertilizer consumption and climate change’s impact on critical maize food crops in Pakistan’s four provinces. The study highlights the importance of developing grain production types resistant to heat and drought. However, it needs to address potential challenges associated with farmers’ adoption of new technologies, such as lack of access or affordability. Future research may explore barriers to technology adoption and how to overcome them.

Like other studies, this one has some limitations as well. As an illustration, some agro-environmental and financial development factors are left unexplored in this study as a result of which overall weather patterns need to be taken into account in this study. Future research should utilize panel data at the state or agro-environmental area level to further understand how weather patterns affect the value added to agricultural products. Since there are other relevant and significant variables, financial development variables are not included in the current study’s non-climatic components. However, further research suggests that financial development positively impacts the yield of maize crops and agronomic value-added. Because it enables farm owners to buy critical agricultural inputs for growing crops, financial development is crucial for expanding agricultural productivity. According to some academics, achieving financial success is crucial for farmers who want to develop their land for a living. The study has some limitations, such as leaving out agro-environmental and financial development factors and not considering overall weather patterns. Future research may address these limitations and explore other relevant and significant variables that can impact agriculture productivity.

The study recommends that government agricultural officers should focus more on farm management about climate change adaptation strategies. However, it needs to address potential challenges associated with implementing these strategies, such as lack of knowledge or resources. Future research may explore how to effectively communicate and implement climate change adaptation strategies to farmers.