Introduction

Agriculture has been a key economic sector in Africa’s most populous country (Nigeria), as it covers about 23% of real GDP and has maintained this position over the past decade (Jayne et al. 2017; Thomas and Turk 2023). The development of agriculture in Nigeria is increasingly becoming more challenging due to climate change and unpredictable weather patterns. The frequency of extreme weather events (like flooding, heat waves, gully erosion, and drought) has been one of the underlying causes of declining agricultural capacity (The Global Alliance for Improved Nutrition 2022; Food and Agricultural Organization of the United Nation (FAO) 2023). Given high levels of undernourishment and food insecurity, Nigeria is regarded as a food deficit country with Global Food Security Index of the country worse than in comparator countries such as Angola, Ghana, Cote d’Ivoire, Indonesia, and Malaysia, coupled with its deteriorating position since 2019 (Thomas and Turk 2023). The existing grave food insecurity could be further compounded by the devastating consequences of changing weather, since Nigeria falls in the category of the top 10 countries vulnerable to climate change (The Global Alliance for Improved Nutrition 2022). As most Nigerian farmers depend primarily on rain-fed agriculture, the occurrence of the severity of weather events would not only destabilize precipitation patterns but also result in soil degradation and consequently, a great decline in food production. The declining agricultural production may cause food inflation to rise, thereby creating more economic hardship for the people. Achieving sustainable development goals (SDGs) is therefore threatened by climate change. Following this worrying case, a comprehensive analysis of the link between climate change and food production is central for addressing Nigeria’s growing challenges.

In terms of global warming, climate change is regarded as the typical increase in global temperature level which has become a serious problem that will cause severe weather conditions across the globe in the future (Rehman et al. 2022). Since 1750, the concentration of greenhouse gas (GHG) emissions such as carbon dioxide (CO2), methane (CH4), and nitrous oxide (N2O) have been on the rising trend, while carbon dioxide emissions seem to have accounted for the highest proportion of GHGs (Malhi et al. 2021). Over the years, the rising global temperature of the atmosphere is attributable to the rise in greenhouse gases. Although Africa is the lowest contributor to CO2 emissions, as the continent contributes only 3% of global cumulative CO2 emissions, African countries are highly vulnerable to climate change (Intergovernmental Panel on Climate Change (IPCC) 2014; Carbon Dioxide Information Analysis Center (CDIAC) 2020). The prevailing food crisis in most sub-Saharan African (SSA) countries (including Nigeria) has been largely blamed on the persistent changing climate that is beyond the average atmospheric condition. Regardless of the level of technological advancement, weather conditions and the state of the environment are still crucial factors determining agricultural production worldwide, because the agricultural sector is the most susceptible to changing climate (Parker et al. 2019). This provides a strong argument for more empirical evidence on the relationship between climate change and food production. According to Rehman et al. (2022), impacts of future environmental change on various sectors like agriculture, environment, and health seem to have remained controversial recently, reflecting that countries may not experience uniform effects of climate change. For example, the impact of climate change would be more in tropical regions because tropical crops could experience high-temperature stress when temperature levels are elevated (Malhi et al. 2021). However, Malhi et al. (2021) also observed that agricultural production could be positively impacted by climate change in some areas. But climate change pace may largely determine its impact, suggesting that environmental and climate policies need to be dynamic and flexibly implemented (Zilberman et al. 2004).

Notably, while global warming could result in a slight improvement of crop production in the short term (before 2030), it would eventually become detrimental in the long term (Zhang et al. 2019). Therefore, climate change can be anticipated to significantly affect food production. This has made the incidence of climate variations a global issue and a critical case in ensuring sustainable agricultural development. Surprisingly, few authors have focused on climate change as a major factor in addressing food crisis, even though both national authorities and international organizations are very much aware of the significance of improved food production in Nigeria. Regarding Nigeria in particular, Tajudeen et al. (2022) examined the relationship between climate change and food crop production in Lagos State, Nigeria alone, using a survey questionnaire whereas Idumah et al. (2016) assessed the effect of climate change on food production in Nigeria with the use of vector error correction (VEC) estimation. Many notable studies on the nexus between climate change and agricultural production are not specifically centered on Nigeria. For instance, Rehman et al. (2022) for Japan; Habib-ur-Rahman et al. (2022) for Asia; Fagbemi et al. (2023) for SSA; among others. Since estimating the impact of changing climate on food production is vital for addressing acute food insecurity in the country, World Bank (2013) stressed that a proper understanding of the impacts of climate change on the availability of food in Nigeria through robust research analysis is imperative.

Limited empirical evidence on climate change-food production nexus indicates that it may undermine efforts to address existing and future food insecurity challenges in Nigeria, as about 40% of the Nigerian population is regarded as food insecure (Thomas and Turk 2023). This study, therefore, contributes additional information to the literature which can influence informed policy and policymakers’ decisions about climate change-induced food shortages. Moreover, the study differs from existing studies on Nigeria in terms of methodological approach adopted and the selection of variables (more detailed in the methodological section). Unlike the previous studies, both autoregressive distributed lag (ARDL) and vector error correction mechanism (VECM) are applied to achieve the study’s objectives. Outcomes of these techniques will certainly serve as a supportive measure to provide greater coverage of long-term climate-linked food security improvement.

Literature review

The mediation of climate-driven extremes with the use of modern technologies has made the developed regions less sensitive to climate change, whereas developing regions of the world seem to be more sensitive to climate variability due to the implementation of old technologies (Lybbert and Sumner 2012). This therefore indicates that the level of food production can be greatly influenced by climate change in these economies because climatic-driven extremes like flooding, drought, erratic rainfall, and sea level rise remain a threat to agricultural production (Mendelsohn 2009; Ahmad et al. 2019). Indeed, the link between climate change and agricultural productivity has been well illustrated through the agro-economic model and the Ricardian model by Mendelsohn et al. (1994). In terms of direct effect, the level of crop yields could be altered by changing climate. On the other hand, the indirect impacts are manifested through farmland utilization change and the replacement impact of production inputs resulting from climate change. These theoretical illustrations have gained additional support in the literature. For example, during the last decades, erratic and intense rainfall patterns have a significant negative effect on crop production in many parts of Asia (Aryal et al. 2019). Due to rising temperatures and rainfall variability, crop growth and development have also been negatively affected (Asseng et al. 2019). Under climate change scenarios, sustaining food production and improving food security may be threatened, especially in the least developing countries (FAO 2015; Myers et al. 2017). Thus, enhancing national economic productivity in the event of increasing variations in climate patterns could be a serious challenge.

In most regions of the world, there has been a projection of increased climate anomalies in the near future which would likely determine the extent of crop yields and the level of agricultural productivity across the globe as reviewed by Malhi et al. (2021). Consequently, since tropical regions have been viewed to experience the worst impact of climate change (Challinor et al. 2014), in Nigeria, yields of major crops may significantly decline during elevated levels of temperature. In the Dutch region, an extreme weather event and the yield reduction in wheat are strongly associated (Powell and Reinhard 2016). Until 2100, the yields of wheat, corn, and rice could be possibly reduced in China by 18.26 ± 12.13, 45.10 ± 11.55, and 36.25 ± 10.75%, respectively (Zhang et al. 2017). Adverse climate change impacts have also put agroforestry production under threat in Asia (Lima et al. 2022). Similarly, climate change-driven extremes are regarded as a serious obstacle to sustainable rice production globally (Xu et al. 2021). However, these propositions may be insufficient to establish the possible outcome that can be considered tenable regarding Nigeria’s case without a comprehensive assessment of climate change-food production nexus mainly in the country’s context.

The broad economic influence of environmental change on farming and food security in 19 Latin America and the Caribbean (LAC) nations examined by Banerjee et al. (2021) showed that many countries in the region experience an unfavorable impact of environmental change, particularly Argentina, Brazil and Uruguay. In Germany, it has been demonstrated that agricultural productivity is significantly affected by both temperature and relative moisture (Emadodin et al. 2021). Japan’s agriculture has also been impacted by the recent pattern of rising temperature levels in several ways (Hussain et al. (2020). Through a recursive-dynamic regional computable general equilibrium (CGE) model, Khan et al. (2021) argued that rice farming would be impacted by future climate change in Pakistan. However, whether the impact will be detrimental or valuable remains unclear. Focusing on a cross-section of ten regions in Thailand, Jatoi et al. (2021) discovered that reduced solar radiation, and increasing temperatures and rainfall have caused a decrease in rice farming and minimized the rate of vegetable and potato farming in the country. While Ortiz-Bobea et al. (2021) identified that climate change could directly influence agricultural productivity and that agriculture is vulnerable to weather variability, they stated that due to disparities in models, conditions, and the level of information, various research outcomes varied significantly. This provides the basis for diverse impressions on the link between climate change and food production, thereby leaving out a possible critical gap in the literature.

Henderson et al. (2021) maintained that farming production has been substantially affected by climate change in Paraguay, indicating that agricultural production is prone to changing climate. On the other hand, in ten Asian countries, the productivity of agriculture is negatively affected by a rise in annual temperature (Miles-Novelo and Anderson 2019). Regarding SSA, the direct effect of climate change on crop yields has been established by Karimi et al. (2018), as these authors showed that the yield variation of sugarcane and drought-tolerant sorghum due to climate change is − 3.9% and + 0.7%, respectively. Likewise, Fagbemi et al. (2023) argued that increasing carbon dioxide emissions has a damaging effect on food production in SSA. While simulating the scenarios of agricultural productivity adjustment resulting from climate change, with the use of a dynamic computable general equilibrium (CGE) model, Solomon et al. (2021) assessed the economy-wide impacts of climate change on Ethiopia’s agricultural sector. It is suggested that during the coming four decades and as the weather severity can rise over the time period, crop production will be negatively influenced. In addition, in drought-prone regions, the income of the poor tends to be badly affected by climate change impacts in Ethiopia. This indeed secures a vital place for more research findings from Nigeria, considering its numerous socio-economic challenges.

Idumah et al. (2016) argued that inadequate rainfall could adversely affect food production through the use of vector error correction (VEC) estimation between 1975 and 2010. In view of the analysis of weather data over the period 1998 to 2018, Tajudeen et al. (2022) examined the effect of climate change on food crop production in Lagos State, Nigeria. Findings revealed that climate change has resulted in a decline in crop production in Lagos State, as reducing crop yield and poor weather conditions confirmed to be connected. In Nigeria, Conrow (2021) also stated that temperature and rainfall fluctuations which could be associated with increased incidence and severity of insect outbreaks and plant diseases can make farming more difficult, possibly leading to the suppression of crop production. Since climate is one of the key determinants of food production, a direct link between rising temperatures and higher rates of stunting has been confirmed in Nigeria (Van der Merwe et al. 2022). Nevertheless, these studies on Nigeria seem to have failed to consider the effect of carbon dioxide emissions (CO2) on food production, despite the argument that 57% of global warming is attributed to CO2 (Yoro and Daramola 2020). Therefore, any research in this direction is vital for giving helpful information necessary for policy design and formulation.

In the literature, it has also been argued that human activities (including agriculture) stimulate the occurrence of climate change much faster than other determinants (Cattaneo et al. 2019), indicating that a causal relationship between food production and CO2 is possible. For example, agricultural activities may cause persistent changes in climatic parameters because agriculture significantly influences the production of methane, as well as the release of the latter into the atmosphere (Singh et al. 2017). According to Yu et al. (2018), domestic animals such as (buffaloes, dairy cows, goats, horses, pigs, and sheep) contribute about 0.25% to methane emissions. On the other hand, rice fields are another factor that can affect the production of methane (Davamani et al. 2020; Conrad 2020). Thus, changes in cultivation pattern and production of farmers are critical to climate change adaptation (Hussain et al. 2020). These studies have indeed affirmed that the increasing growth of agricultural activities can result in an increased risk of severe weather. Another significant contribution of the study is the investigation of the causal association between carbon emissions and food production since previous research might not have sufficiently assessed this in Nigeria’s case.

Methodology

Theoretical framework

To analyze the impact of climate change on food production, the Recardian model is adopted. This theory is mostly used in the literature to examine how climate affects agricultural crop and livestock production. Farm performance across different climatic zones of the globe is determined through the utilization of cross-sectional data by the Recardian theory (Mendelsohn 2009). The model is named after David Ricardo (1772–1823) based on its originality that the net production of the farmland output is a reflection of the quality of land (Mano and Nhemachena 2007). This approach was mainly developed to explain land value variations per hectare of agricultural land over various climatic zones. Seasonal changes in temperature, rainfall, and precipitation highly influence the quality of land per hectare of agricultural land as confirmed by various studies (Nkondze et al. 2014).

In a given location, it is assumed that the value of land is sensitive to climatic factors (such as carbon dioxide emissions, temperatures, rainfall, and precipitation). Therefore, net farm output is a function of climatic variables and economic variables. On the other hand, it can be stated that the level of food production in an economy depends on both climatic and economic variables. Following the model, Ricardo asserted that farm output level is affected by climatic factors. Thus, any change in climatic variables affects agricultural production which subsequently determines the level of food production in the economy. Based on this, in order to suit the objective of the study, the Recardian model is modified as the effect of carbon dioxide emissions on food production is assessed through the model prescribed Eq. (1) as follows:

$$FDP=f\left(CO2, X\right)$$
(1)

In the model, food production index (\(FDP\)) is used as the dependent variable, whereas carbon dioxide emissions (CO2) represent the exogenous climate variable. \(X\) is a vector of control variables which include GDP growth (annual %), population and foreign direct investment (FDI), and net inflows (% of GDP). The relevance of CO2 as a climate change indicator has been confirmed by Gedik and Güne (2021); and Zaidi et al. (2021). Some previous studies have also established a link between the control variables and food production (Santangelo 2018; Dithmer and Abdulai 2017; Fagbemi et al. 2023). For example, Santangelo (2018) argued that high population growth with no commensurate level of agricultural productivity could give rise to food insecurity, while both Dithmer and Abdulai (2017) and Fagbemi et al. (2023) viewed economic growth and FDI as the determinants of food production. However, corruption and insecurity might undermine the effectiveness of FDI in food production process (Fagbemi et al. (2023). Therefore, the incorporation of these variables in the model is justified by the literature, as these authors demonstrated that they could play a significant role in food production.

Econometric model and techniques

In order to better understand the nexus between climate change and food production, Eq. (1) is transformed into econometric model as follows:

$${FDP}_{t}= {\varphi }_{0}+{{\varphi }_{1}C02}_{t}+ {{\varphi }_{2}GDP}_{t}+ {{\varphi }_{3}FDI}_{t}+{{\varphi }_{4}POP}_{t}+ {\mu }_{t}$$
(2)

As stated previously, the level of food production is affected by both climatic and economic factors. However, the focal variable in the model is C02 which indicates a measure of climate change. Equation (2) thus helps to examine in detail the relevance of the study. While \(FDP\) and C02 remain as defined earlier, \(GDP\), \(FDI\), and \(POP\) denote GDP growth (annual %), foreign direct investment, net inflows (% of GDP) and population, respectively. Obtaining the respective coefficients of these parameters, representing the slope; \({\varphi }_{1}\), \({\varphi }_{2}\), \({\varphi }_{3}\), and \({\varphi }_{4}\) are critical to the analysis. The intercept is given as \({\varphi }_{0}\) whereas \({\mu }_{t}\) is the error term, taking care of any other conditions that may affect food production but not captured by the model.

In a study like this, adopting an approach that will account for both short-run and long-run effects simultaneously like autoregressive distributed lag (ARDL) bounds test to cointegration is necessary. ARDL is therefore adopted to fully capture the complex dynamics and critical nexus between food production and changing climate. This technique is unique and more significant compared to other cointegration methods (such as dynamic ordinary least square (DOLS), canonical cointegrating regression (CCR), and fully modified least squares (FMOLS)) that can only examine long-run impacts (Pesaran et al. 2001). ARDL also performs much better in the presence of mixed orders of integration, i.e., irrespective of whether some variables are (I(0) or I(1)), it is more effective unlike other cointegration techniques. Another advantage is that if the sample size is small, ARDL can still be applied. Hence, Eq. (3) is specified in ARDL form as follows:

$$\begin{array}{l}{\mathrm\Delta FDP}_t=\varphi_0+\sum\limits_{i=1}^m\varphi_{1i}\mathrm\Delta{FDP}_{t-1}+\sum\limits_{i=1}^n\varphi_{2i}{\mathrm\Delta CO2}_{t-1}\\\;\;\;\;\;\;\;\;\;\;\;\;\;+\sum\limits_{i=1}^o\varphi_{3i}\Delta{GDP}_{t-1}+\sum\limits_{i=1}^p\varphi_{4i}\mathrm\Delta{FDI}_{t-1}\\\;\;\;\;\;\;\;\;\;\;\;\;\;+\sum\limits_{i=1}^q\varphi_{5i}\mathrm\Delta{POP}_{t-1}+{\mathrm\varphi}_6{\mathrm{FDP}}_{\mathrm t-1}+{\mathrm\varphi}_7{\mathrm{CO}2}_{\mathrm t-1}\\\;\;\;\;\;\;\;\;\;\;\;\;\;+\varphi_8{GDP}_{t-1}+\varphi_9{FDI}_{t-1}+\varphi_{10}{POP}_{t-1}+\mu_t\end{array}$$
(3)

In Eq. (3), two components are involved. The first component which is the short-run cointegration connection is represented by φ1, φ2, φ3, φ4, and φ5, while the second component which accounts for the long-run effects is denoted by φ6, φ7, φ8, φ9, and φ10. In addition, m, n, o, p, and q are the number of lag selection in line with a step-down method subject to 2 lags maximum, following Schwarz Information Criteria (SIC). More importantly, both cumulative sum (CUSUM) and cumulative sum of squares (CUSUMSQ) are conducted to ascertain the stability model. CUSUM and CUSUMSQ are viewed to be appropriate whether or not structural breakpoints are known (Brown et al. 1975). As a result, these forms of stability tests are deemed to be much better compared to the Chow test that requires the specification of breakpoints. The null hypothesis of no long-run association between food production and CO2 is considered against the alternative hypothesis as follows:

$${H}_{0} : {\varphi }_{6}= {\varphi }_{7}={\varphi }_{8}= {\varphi }_{9}= {\varphi }_{10}=0$$
  • H1: at least one coefficient listed in the null hypothesis (H0) is nonzero

Decision rule: if the calculated F-statistic is above the upper bound value at the stated level of significance, perhaps at 5% significance level, \({H}_{0}\) is rejected.

Based on the argument that food production and climate change are interlinked because changes in the level of production may have impact on climate change and vice versa (Islam and Wong 2017). As such, causal association could exist among the variables. Furthermore, if cointegration is established, a causal association should be expected in at least in one direction (Engle and Granger 1987). The vector error correction mechanism (VECM) Granger causality test is thus adopted for the assessment of long-run causal relations. This approach has been applied by previous studies (Enisan and Olufisayo 2009; Fagbemi and Ajibike 2022). The key relevance of the VECM Granger causality test is that it is vital for adopting appropriate measures by policy makers that would allow for sustainable development. Hence, VECM model is stated as follows:

$$\begin{array}{l}{\Delta FDP}_t=\varphi_0+\sum\limits_{i=1}^m\varphi_{1i}\Delta{FDP}_{t-1}+\sum\limits_{i=1}^n\varphi_{2i}{\Delta CO2}_{t-1}\\\;\;\;\;\;\;\;\;\;\;\;\;\;+\sum\limits_{i=1}^o\varphi_{3i}\Delta{GDP}_{t-1}+\sum\limits_{i=1}^p\varphi_{4i}\Delta{FDI}_{t-1}\\\;\;\;\;\;\;\;\;\;\;\;\;\;+\sum\limits_{i=1}^q\varphi_{5i}\Delta{POP}_{t-1}+\pi_i{ECT}_{t-1}+\mu_t\end{array}$$
(4)
$$\begin{array}{l}{\Delta CO2}_t=\varphi_0+\sum\limits_{i=1}^m\varphi_{1i}\Delta{CO2}_{t-1}+\sum\limits_{i=1}^n\varphi_{2i}{\Delta FDP}_{t-1}\\\;\;\;\;\;\;\;\;\;\;\;\;\;+\sum\limits_{i=1}^o\varphi_{3i}\Delta{GDP}_{t-1}+\sum\limits_{i=1}^p\varphi_{4i}\Delta{FDI}_{t-1}\\\;\;\;\;\;\;\;\;\;\;\;\;\;+\sum\limits_{i=1}^q\varphi_{5i}\Delta{POP}_{t-1}+\vartheta_i{ECT}_{t-1}+\mu_t\end{array}$$
(5)

In Eqs. (4) and (5), lagged error correction term is captured by \(ECT\). As null hypothesis (\({H}_{0}\)) implies that there is no causality, the short-run causal link is examined as follows:

$${H}_{0} : {\varphi }_{1}= {\varphi }_{2}={\varphi }_{3}= {\varphi }_{4}= {\varphi }_{5}=0$$
  • H1: at least one coefficient listed in the null hypothesis (H0) is nonzero

On the other hand, long-run causal association is tested as follows;

$$\begin{array}{c}H_0:\pi_i=0\\H_1:\vartheta_i\neq0\end{array}$$

If the estimated F-statistics of the exogenous factors are statistically significant, \({H}_{0}\) is rejected for the short-run causal link. Similarly, the significance of the \(ECT\) coefficients will depict the existence of long-run causal effects. However, \(ECT\) estimates are good to be negative based on the theoretical assumption.

Data description and sources

In every research, the reliability of the data sources is very important. All data used in the study were therefore obtained from the World Development Indicator (World Bank 2023). The scope covers period 1990 to 2019 (30 years) which is strictly based on the most recent available data on carbon dioxide emissions (CO2). Variables are described according to the details and descriptions given by the World Bank as follows:

  • Carbon dioxide emissions (CO2): These are emissions resulting from the burning of fossil fuels and the cement manufactured. They cover the production of carbon dioxide in the period of the consumption of solid, liquid, and gas fuels and gas flaring.

  • Food production index (FDP): It covers food crops that are viewed to be edible and that contain nutrients. Since coffee and tea have no nutritive value, they are not included despite the fact that both are edible.

  • Population (POP): It includes the total number of all residents in the country irrespective of legal status or citizenship. Midyear estimates are the values presented.

  • Foreign direct investment (FDI): While it is divided by GDP, the series shows the difference between new investment inflows and disinvestment (i.e., net inflows) in the reporting economy from foreign investors.

  • GDP growth (GDP): It is annual percentage growth rate of GDP at market prices based on constant local currency. Aggregates are based on constant 2015 prices, expressed in U.S. dollars.

Results and discussion

Descriptive statistics

Table 1 shows the specific features of each variable employed in the study. It is indicated that food production index has 111.74 as the highest value, while 39.91 serves as its lowest value within the study period. On the other hand, the maximum value for carbon dioxide emission is 0.92, whereas it has 0.49 as the minimum value. This implies that levels of both food production index and CO2 might have changed significantly in the period covered. In Table 5 (see the Appendix), how the variables in the model could be associated with one another is also presented. It is observed that CO2 is negatively correlated with food production index. However, the control variables employed (GDP, FDI, and population) are positively associated with food production. This suggests the possible relationship between the dependent variable and independent variables. Nonetheless, the outcomes at this stage are not sufficient to establish empirically the effect of the explanatory variables on food production. To avoid unreliable empirical justifications, further comprehensive research and analytical processes are therefore necessary in subsequent sections.

Table 1 Summary statistics

Unit root and Johansen cointegration test

In order to ascertain the specific state of the series used, two different unit root tests are conducted which include the Augmented Dickey-Fuller (ADF) and Phillips-Perron (PP). This is necessary to avoid the case of obtaining spurious results mostly common in time series analyses. As reported in Table 2, although no variable is found to be I (2) and above (i.e., second-order integration and above), the order of integration of the variables is appropriate for the adoption of ARDL (Pesaran et al. 2001). Furthermore, to verify the level of association among the variables employed in the study, the Johansen cointegration test is carried out. This approach is adopted to know whether long-run relationship exists among the variables. The results of the test presented in Table 6 in the Appendix affirm that there is long-run relationship among the series. The Johansen cointegration test is preferred to other methods because irrespective of the order of integration, it can be applied.

Table 2 Unit root test

Diagnostic, stability and F-bounds test

Based on the adoption of ARDL in the study, some tests are considered important to be conducted. As such in Table 7 (see the Appendix), the F-bounds test for cointegration carried out indicates that cointegration exists between the dependent variable and independent variables as F-calculated is found to have exceeded the upper bound value at 1% significant level. In addition, regarding the stability of the model, Fig. 1 (reported in the Appendix) statistically confirms that the model’s specification is stable. This is in line with the outcomes of the stability test which indicate that both CUSUM and CUSUMSQ remain within the critical bounds at 5% significant level. In Table 8, likewise reported in the Appendix, various diagnostic tests (Durbin-Watson, Breusch-Godfrey serial correlation test, Ramsey reset test, and normality test) conducted also attest to the validity of the estimates. It is therefore certain that estimated outcomes are consistent and reliable.

ARDL long-run and short-run estimates

In Table 3, long-run and short-run estimates of ARDL are presented. Regarding the short-run estimates, the sum of coefficients is reported on however many lags were included for each variable. It is indicated that in the long run as well as in the short run, carbon dioxide emissions (CO2) adversely affect food production at 5% significant level. This implies that estimated outcomes reflect negative effects of CO2 on the production of food in the period under consideration, indicating that an increase in the level of CO2 could result in declined food production. A plausible explanation for this is that since rising carbon emissions are strongly associated with increased global warming which will cause temperature level to rise and a reduction in the amount of rainfall thus by affecting soil moisture level, crop production will be negatively affected (Kang et al 2009). This indeed suggests that in the face of climate change, food production could be undermined. These outcomes buttress the assertion that a rise in CO2 can lead to climate-induced shortages of crop yields (Malhi et al. 2021). Given the detrimental impact of carbon emissions on food production, in the long run, climate change extremes will make any push to enhance food security unsustainable. In addition, the high vulnerability of agriculture to increasingly unpredictable and extreme weather events will heighten the risk of food deficit in Nigeria. Estimated results strongly reveal that changing climate is one of the most glaring factors responsible for declining agricultural productivity.

Table 3 ARDL results

It can also be argued that the increased CO2 concentration will possibly exacerbate the losses in the crop yields resulting from rising temperatures and decreased soil moisture in both short run and long run. This underscores the importance of effectively managing climate-related risks. Results presented in this study simply imply that unfavorable weather patterns will no doubt make agricultural development more challenging in Nigeria. Agricultural production is left vulnerable to climate variability because smallholder farmers which represent about 70% of Nigerians only have access to relatively low-level technologies.Footnote 1 As agricultural production can be threatened by the severity of climate change, the production of food in the economy will reduce. The study’s findings therefore corroborate the view of authors like Miles-Novelo and Anderson (2019), Solomon et al. (2021), and Fagbemi et al. (2023). These authors commonly confirmed the adverse effects of climate change on food production in their respective studies.

Apart from the results on the impact of CO2, how food production is impacted by the control variables (GDP, FDI, and population) is also revealed. It is discovered that GDP has a positive and significant influence on food production. Essentially all quantitative assessments indicate that GDP growth will substantially affect food production through its impacts on agriculture. This suggests that robust economic growth could significantly stimulate agricultural capacity, thereby promoting food production which supports the findings of Fagbemi et al. (2023). Given that socio-economic development trajectories have an important bearing on food security in the long term, a sustained increase in economic growth may result in socio-economic change associated with a possible improvement in agricultural production. Therefore, the usefulness of increased economic growth for improving the agricultural sector is established by the estimated results, as outcomes suggest similar connections might happen in the future.

The effect of FDI and population is found to be insignificant across models, indicating that both indicators seem to have not contributed substantially to food production. This showcases how the state of population growth and FDI flows have negligible impacts on the agricultural development. The underlying assumption is that agriculture is increasingly becoming unattractive to the people, especially the youth, due to government policy and the level of infrastructure investments in the rural areas, making them migrate to the cities in their large number. Thus, population growth paths may have little or no significant impact on food production in the absence of essential incentives for private investment in agriculture. Food security will not improve when the bulk of the population sees no reason to engage in agriculture (Santangelo 2018). Similarly, insignificant estimates of FDI may be attributed to pervasive poor governance in the country (Fagbemi 2020; Fagbemi and Adeoye 2020). The ineffectiveness of FDI could be the consequence of widespread corruption and other institutional challenges (Fagbemi et al. 2023).

An assessment of the causal relationship between CO2 and food production

In this section, Schwarz information criterion (SC) is used for the selection of lag order since it is mostly appropriate. As presented in Table 9 in the Appendix, lag two (2) is selected. The importance of this part is to know how carbon emissions and food production influence each other in the long run. In Table 4, results reveal that there is long-run bidirectional causality between CO2 and food production. This implies that CO2 could cause future changes in the level of food production and vice versa. Through agricultural activities required (such as bush burning and deforestation) for the production of food, climatic parameters could be altered, thereby increasing the risk of severe weather (Singh et al. 2017). This finding supports the view that the incidence of climate variability is stimulated much faster by human activities linked to the process of food production (Cattaneo et al. 2019). On the other hand, a change in CO2 may influence changes in the levels of food production. By implication, rising climate change would possibly exacerbate the growing incident of food shortage. Based on Recardian theory, seasonal changes in temperature, rainfall, and precipitation could affect the quality of land per hectare of agricultural land which reflects the sensitivity of the value of land to climatic factors (Nkondze et al. 2014). Thus, as net farm output remains a function of climatic variables (Mano and Nhemachena 2007), the level of food production could be determined by changes in climatic factors (such as carbon emissions) in the long term. In view of these findings, sustainable agricultural practices and climate change mitigation policies are vital.

Table 4 Granger causality test based on VECM

Conclusion

The study is conducted because little is known about the role of carbon emissions in Nigeria’s food security level. There have been increased agitations as to why Nigeria is regarded as one of the most food insecure countries despite its numerous agricultural potentials. Essentially empirical assessments have shown that climate change will increase the incidence of food insecurity. The dependency of developing countries (including Nigeria) on the importation of food will likely be accentuated by changing climate, necessitating the existing focus on climate change-food production nexus. Given that the deleterious impacts of extreme weather events fall disproportionately on the poor, the overall socio-economic status of a country will be affected through the influence of climate change on the agricultural capacity. Hence, the impact of carbon dioxide emissions on food production in Nigeria is examined. With the use of appropriate estimation techniques, the study’s outcomes are deemed robust and valid.

Results indeed show that carbon emissions are a crucial determinant of food production. Findings reveal that an increase in CO2 is expected to bring more acute food shortages, indicating that the impact of climate change on the production of food is adverse. Climate change is posited to cause huge food losses in the short-run as well as in the long-run. By significantly hampering soil fertility, climate change will possibly compromise agricultural production sustainability. This will likely result in climate-induced shortages of food supply. Consequently, as Nigeria already suffers from high rates of food deficit, the food insecurity issue exacerbated by climate change remains a great threat to the economy.

Bidirectional causality found between carbon emissions and food production suggests that both indicators affect each other in the long run. It can therefore be asserted that the prevalence of unsustainable agricultural practices in the country will certainly induce a rise in CO2 in the future. On the other hand, a rapidly changing climate will further worsen insufficient food production. It is also indicated that improved economic growth could contribute significantly to increased food production in the presence of good and effective policy measures. However, FDI and population are considered insignificant due to persistent governance failures.

The policy environment should help determine how the impacts of climate change will be felt in the future. Thus, it is vital to formulate and develop a good number of mitigation and adaptation strategies that can offset the detrimental effect of climate change on food production. Initiating policies that will discourage unsustainable agricultural practices is also central. The government should therefore design a long-term land use approach and adopt targeted planning for promoting food security and climatic resilience. Through changes in technology, creating new varieties of crops that are better adapted, increasing fertilizer use, and ensuring more irrigation will likely mitigate rising food shortages.