1 Introduction

The climate change is a growing topic for researchers in the twenty-first century. Climate change, rising temperatures, and global warming brought on by a rise in greenhouse gasses (GHGs) including carbon dioxide (CO2), nitrous oxide (N2O), and methane (CH4) are the hottest concerns in this field right now. According to the Intergovernmental panel on climate change, in 2019, global total GHG emissions were 59 GtCO2-eq.

The climate change is a serious problem, so all nations’ attention has been attracted to it. The 13th Sustainable Development Goal is concerned with measures that lessen the effects of climate change. Since the creation of the Millennium Development Goals, there has been an increase in global efforts to alleviate climate change (Asumadu Sarkodie and Owusu 2016a, 2016b, 2016c). However, measures to reduce the effect of climate change through emission reduction strategies have been biased toward the industrial and energy sectors (Busch et al. 2012).

Fossil fuels and other non-renewable energy from main energy sources cause air pollution. They will have a negative impact on the health of the population and the planet. Air pollutants can access wetland ecosystem and freshwater sources, destroying marine life while polluting pristine water.

Both developed and developing nations accelerate the growth of the economy, and numerous economic activities from different economic sectors have a direct effect on air pollution (Bekun and Agboola 2019; Ahmed et al. 2020). Energy is a necessity for economic growth because it helps increase income creation, economic development, employment creation, and production. Furthermore, different literature demonstrates that economic growth and energy usage are the two main factors affecting climate (Adebayo 2020a, b; Rjoub et al. 2021).

The generally accepted opinion among experts indicates that openness to trade has a significant positive effect on growth as a comparative advantage is examined for resource transfers between nations (Kong et al. 2020; Hdom and Fuinhas 2020) and the effects of trade openness on the environment are still debatable. A theoretical approach to the influence of trade openness on environmental effects (Walter and Ugelow 1979; Copeland and Taylor 2004) proposes that the pollution haven effect can be clarified by environmental control laws. The consequences of pollution control on plant placement choices and trade flows have more impact the degree of openness.

The strict enforcement of environmental regulations in wealthy nations encourages clean production, which shifts multinational corporations to invest in products with high pollution levels in emerging nations with effective environmental controls, generating significant profits back home. In contrast, according to Jaffe et al. (1995), such an argument is not convincing because the burdensome environmental restrictions have little to no impact on trade and investment movements.

Numerous pieces of literature consider diverse nations, and the results are still inconclusive. Although Rwanda has not been actively targeted, Dean (2002) and Dauda et al. (2021) claimed that openness to trade increases CO2 emission and confirms the validity of the pollution haven hypothesis. Conversely, other literature claims that trade openness decreases CO2 emission and confirms the validity of the halo heaven hypothesis. Additionally, emissions generated by farming activities such as burning of bushes, applying fertilizer, using other chemicals, deforestation, excessive grazing, and turning pastures into arable areas for farming increase greenhouse gases (Bellarby et al. 2008; Friel et al. 2009a, 2009b). According to the Intergovernmental Panel on Climate Change, 24% of the global greenhouse gas emissions were emitted from AFOLU (agriculture, forestry, and other land use).

Since the middle of the twentieth century, the output of agriculture worldwide has increased along with the growth of population. The sustainability of agriculture and the environment is threatened by a doubling of the global food demand to nourish the fast-expanding population (Tillman et al. 2002; Burney et al. 2010). Due to inefficient farming methods used to increase productivity, which results in food security, the agriculture sector has been highlighted as one of the primary contributors to emissions of greenhouse gasses (Hong et al. 2022). The use of fossil fuel farm machinery, irrigation, indoor animal rearing, and nitrogen-rich fertilizer all have a positive impact on emissions in the agriculture sector (Jebli and Youssef 2017). However, by preventing deforestation, regeneration woodlands, enhancing the care of plants and animals, and producing green energy, the agricultural sector will reduce total emissions by 20% by 2050.

The agriculture sector is one of the major contributors to Rwanda economic growth. Agriculture accounted for around 53% of the working population and produced roughly 33% of Rwanda's GDP in 2018 (EICV 5, 2018). Furthermore, Rwanda's overall agricultural land area was 14,110 km2 (53.57% of the country's total territory) in 2016 and 14,147 km2 (53.71%) in 2019 (NISR 2019). Exports of agricultural products climbed from 19.2 (in thousand tons) in 2016–17 to 20.6 (in thousand tons) in 2017–18, bringing in an extra 1.4 million USD in income. These products mainly refer to coffee and tea profit crops for export in Rwanda.

The dominance and practices in the agriculture sector in Rwanda lead agriculture to be the main source of greenhouse gas emissions in Rwanda, accounting for 39.5% of all emissions in 2014. Historically, between 1990 and 2014, greenhouse gas emissions doubled, growing by 105%, due to increases in emissions from livestock (41%), manure left on pasture (31%), and inorganic fertilizers (466%) (USAID 2018).

The agricultural sector contributes significantly to the acceleration of any country's economic development and growth. Several studies have been conducted over the years to analyze CO2 emission, although few studies have included agricultural variables, however, mixed results have emerged.

There is spare research on the impact of agriculture, trade openness, and renewable energy on CO2 emission in Rwanda between 1990 and 2022. This study will contribute to the environmental degradation literature. Moreover, this research will be supported. The Sustainable Development Goals (SDGs-7, 8, 12, and 13) served as inspiration for this study. It addresses specific energy-related issues (SDG-7) while putting emphasis on using renewable and sustainable energy (SDGs-7 and 12) to advance the 2020 Agenda to avoid issues related to economic growth (SDG-8) and environmental degradation (SDG-13), respectively.

As far as we realize, no studies have been done using agriculture variables in the context of Rwanda, and therefore, this work makes a unique contribution in this regard. Additionally, the paper provides fresh theoretical viewpoints particularly beneficial to decision makers. This study stands out for using a pollution-based approach that was developed in accordance with the pollution haven hypothesis. The aim of this paper is to analyze the validity of the pollution haven hypothesis in Rwanda. Most studies on Rwandan emissions have taken an environmental perspective, which frequently provides a distinct understanding of the country's emissions without any consideration of its trade openness. As a growing economy, Rwanda is expected to produce emissions because of its economic expansion activities and trade openness. Therefore, it is crucial to examine the nation's growth-related emissions using a trade openness-based methodology. The significance of the study is also evident in Rwanda's place in the globe in terms of geography, economy, politics and agriculture. However, due to Rwanda's uniqueness, some of the implications in the country's current research are significant to many countries in the East African region.

This study enhances the body of literature by using the autoregressive disruptive lag approach to examine the relationship between variables' short- and long-term effects. The advantage of the autoregressive distributed lag (ARDL) technique is that it simultaneously captures the short-run and long-run relationship. To the best of our knowledge, this is the first research that uses the autoregressive distributive lag model to examine the aforesaid connection in the case of Rwanda. Thus, the current study fills a gap in the existing literature.

Section 2 of this paper provides a literature review, section 3 explains the data and methods, section 4 displays the empirical results, and section 5 presents the conclusion.

2 Literature review

Numerous empirical and theoretical studies (Table 1) are available in the extensive literature on the impact of trade openness, agriculture, renewable energy, and CO2 emissions. This literature focuses on different nations, and methodologies and findings are different depending on the economic structure of the nation under study. This part of literature review has three sections: trade openness and CO2 emission, agriculture and CO2 emission, and renewable energy consumption and CO2 emission.

Table 1 Summary of related studies

2.1 Trade openness and CO2 emission

Trade openness and CO2 emissions are still controversial. A huge body of literature, such as Grossman and Krueger's (1993) study, theorizes scale, composition, and technique effects. In terms of the scale effect, openness to trade raises CO2 emissions via expanding economic growth. More specifically, as trading grows, the Gross Domestic Product (GDP) grows as well, increasing gas emissions from the industrial sector. By considering the composition effect, a small and harmful impact of trade on the environment has been revealed. Finally, considering the technique effect, the industry appears to have a significant impact on the environment due to the increased desire for cleaner production methods.

Scale, composition, and technique are the three categories into which the effects of trade openness are categorized (Antweiler et al. 2001; Farhani et al. 2014). The pollution haven hypothesis and pollution halo hypothesis suggest two ways that openness to trade affects the environment. The pollution haven hypothesis (PHH) states that when polluting companies look for protection in place from lax environmental rules, their actions typically increase CO2 emissions. For example, Dauda et al. (2021) indicate the presence of PHH using a generalized method of moments and fixed effect model for the panel and ordinary least square in nine selected African countries from 1990–2016. Similarly, Mahmoud et al. (2019) confirmed the pollution haven hypothesis in Tunisia using the ARDL approach during the period 1971–2014. Additionally, Naranpanawa (2011a, b) examined the relationship between trade openness and CO2 emissions in Sri Lanka from 1960 to 2006 using co-integration and the Granger causality test. The results showed that trade openness causes Sri Lanka CO2 emissions to rise.

Nevertheless, when the host nation gains from trade-related innovations beneficial to our planet, it encourages environmental sustainability. This is called the pollution halo effect. Essandoh et al. (2020) confirmed the pollution halo effect validity using panel pooled mean group-autoregressive distributive lag (PMG-ARDL) models in 52 developed and developing countries during the period from 1991 to 2014, revealing that trade openness decreases CO2 emission in developed countries. The study found that trade-related knowledge transfer reduces CO2 emissions among countries. When economic absorption capacities are increased by using human capital and other means, countries could fully benefit from this spillover. Likewise, Kim et al. (2018) used a panel data instrumental-variable (IV) quantile technique to investigate the relationship between trade and CO2 in the context of North-South trade. This study supports a pollution haven hypothesis in the north where trade in the north increases CO2 emissions but trade in the south decreases CO2 emissions, which confirms the pollution halo hypothesis in the period of 1960–2013.

2.2 Renewable energy consumption and CO2 emissions

Nowadays, various sectors of the economy have been connected to global CO2 emissions. Therefore, evaluating environmental pollution in the relationship among growth, energy, and emission relationship has gone beyond looking at the connection between environmental degradation and economic growth. Green energy sources have long been acknowledged from the perspective of climate change for their capacity to reduce CO2 emissions and provide a hospitable environment (Charfeddine and Kahia 2019; Bhattacharya et al. 2017a, b). Moreover, a 2013 OECD analysis found that using renewable energy sources has been proposed to be less carbon-intensive than using non-renewable energy sources. Nations will therefore improve environmental quality and establish a green and clean environmental framework by promoting the use of green energy. Many research studies in the literature have considered the influence of using renewable energy on carbon dioxide emission in different nations, but the findings are mixed depending on the level of renewable energy usage in the overall energy consumption in those nations.

Menyah and Wolde-Rufael (2010a, b) used the Granger causality test and found that green energy and nuclear energy usage decreased emissions of CO2 in the USA during 1960–2007. Similarly, Hu et al. (2018) used fully modified ordinary least squares (FMOLS) and dynamic ordinary least squares (DOLS) to examine the impact of renewable energy on environmental quality in developing countries, and the findings concluded that renewable energy consumption decreases CO2 emission.

In contrast, few studies found renewable energy to be harmful to environmental sustainability. For instance, Jebli and Youssef (2017) used the vector error correction model (VECM) to examine the impact of renewable energy in five North African countries, and they found that renewable energy increased CO2 emissions during 1980–2011.

2.3 Agriculture and CO2 emission

There are studies that focus on how agricultural practices affect environmental quality, also known as agriculture-induced EKC. Agriculture-induced EKC is growing so that a few kinds of literature exist. Ali et al. (2021) used the Granger causality test and autoregressive distributive lag model to examine the causal relationship between agricultural ecosystem and COemissions during 1972–2014 in Pakistan and the results indicated that agriculture machinery, crop waste converted to biomass, cereal production, livestock, and production of other crops increase CO2 emission. Similarly, Balsalobre et al. (2018) used the FMOLS and DOLS and found that agriculture increases CO2 emission in BRICS countries. In contrast, Atasel et al. (2022) used the augmented mean group estimator (AMG) and found that agriculture decreases CO2 emissions in the top ten agricultural countries. Likewise, Ridzuan et al. (2020) used the ARDL model and found that increasing agricultural production helps to improve environmental sustainability and that agriculture decreases environmental pollution.

3 Research methodology

3.1 Data description

To examine the impact of green energy, agriculture and trade openness on CO2 emission in Rwanda using the ARDL Model over the period of 1990–2022. Variables were selected according to the previous literature (Waheed et al. 2018; Ridzuan et al. 2020; Dauda et al. 2021), and the data were retrieved from the World Bank Development Indicators online database.

The multivariate analysis framework includes renewable energy consumption percentage of total final energy consumption, per capita CO2 emissions measured in metric tons, agriculture, forestry, and fishing, value added percentage of GDP as a proxy of agriculture, and trade percentage GDP. All variables were used after being transformed into a natural logarithm to avoid the heteroscedasticity issue and minimize the variability, and STATA 14 was used for data analysis.

3.2 Model specification

The model examines the impact of agriculture, trade openness, and renewable energy on CO2 emission in Rwanda. We estimated the following equation.

$${CO}_{2t}=\int ({AGR}_{t},{REN}_{t},{GDP}_{t},{OPEN}_{t})\dots \dots \dots \dots \dots$$
(1)

After assuming a relationship and logarithmic form among the variables. An empirical model was suggested as follows:

$$ln{CO}_{2t}=\alpha {+{\beta }_{1}lnAGR}_{t}+{\beta }_{2}ln{REN}_{t}+{\beta }_{3}{InOPEN}_{t}+{\beta }_{4}{InGDP}_{t}{\epsilon }_{t}$$
(2)

where \({CO}_{2}\) is CO2 emissions measured in metric tons; α is an intercept; β1, β2, β3, and β4 respectively denote the elasticity coefficients of AGR measure of agriculture, forestry, and fishing, value added percentage of GDP as a proxy of agriculture, REN as a measure of renewable energy consumption percentage of total final energy consumption, and OPEN as the measure of openness to trade (% of GDP) for Rwandan economy; \(\alpha\) is the parameter/coefficient of interest; t denotes the period and the final element ∊t is an error term.

Regression with non-stationary variables yields erroneous results, hence it is crucial to look at the time series or non-stationary qualities of the variables. Thus, it is necessary for variables to be stationary before moving them. To evaluate whether the series is stationary or not, two-unit root tests were used in this study: the Phillips–Perron test (Phillips and Perron 1988) and the Augmented Dickey-Fuller test (Dickey and Fuller 1979).

The study will examine the effect of renewable energy, agriculture, and trade openness on CO2 emission in Rwanda by using the ARDL Model developed by Pesaran and Smith (1998) and Pesaran et al. (2001). ARDL model was chosen because it has many benefits, including that both the short-run and long-run parameters of the model can be computed at once and this model can be used regardless of whether the variables of time series are frictionally integrated, I (0), or I (1) (Pesaran and shin 1998; Pesaran et al. 2001). However, it is important to ensure that none of the variables are I (2) to prevent erroneous regression or ARDL procedure crush.

The ARDL model equation is as follows:

$${\Delta LnCO}_{2t}= {\alpha }_{0} + {\sum }_{i=1}^{k}{\alpha }_{1}{\Delta LnCO}_{2t-i} {\sum }_{i=1}^{k}{\alpha }_{2}\Delta Ln{AGR}_{t-i} + {\sum }_{i=1}^{k}{\alpha }_{3}\Delta Ln{REN}_{t-i} + {\sum }_{i=1}^{k}{\alpha }_{4}\Delta Ln{OPEN}_{t-i} + {\sum }_{i=1}^{k}\sum_{i=1}^{k}{\alpha }_{5}\Delta Ln{GDP}_{t-i}+{\alpha }_{6}Ln{CO}_{2t-1}+{\alpha }_{7}Ln{AGR}_{t-1}+{\alpha }_{8}Ln{REN}_{t-1}+{\alpha }_{9}Ln{OPEN}_{t-1}+{\alpha }_{10}Ln{GDP}_{t-1} +{\epsilon }_{t}$$
(3)

where ε symbolizes the white noise error, Y exposes the lag order, and Δ entitles the difference operator. The summation sign represents the error correction dynamics and \({\alpha }_{0}\) symbolizes constant. The second part of Eq. (3) represents the long-run association. The appropriate lag of each series and model was determined using Final prediction error (FPE), Akaike information criterion (AIC), Schwarz information criterion (SC), and Hannan-Quinn information criterion (HQC).

The bounds test was used to determine whether there is a long-term link between the variables. According to Pesaran et al.'s (2001) critical value table on analyzing the long-run relationship among study variables, the null hypothesis of no co-integration between research variables is rejected if the F test estimated result is greater than the upper critical value limit (UCB). If the computed F test value lies between higher and lower critical boundaries, the result is biased. The null hypothesis of no co-integration among variables is accepted If the F test estimated result is smaller than the lower critical limit (Narayan 2005). Furthermore, the long-term coefficient is determined if there is a long-run relationship among study variables. Equation (4) for the long-run estimation model is as follows:

$${\Delta LnCO}_{2t}= {\alpha }_{0}+ {\sum }_{i=1}^{k}{\alpha }_{1}{\Delta LnCO}_{2t-1} + {\sum }_{i=1}^{t}{\alpha }_{2}\Delta Ln{AGR}_{t-1} + {\sum }_{i=1}^{r}{\alpha }_{3}\Delta LnREN + {\sum }_{i=1}^{p}{\alpha }_{4}\Delta Ln{OPEN}_{t-1} + {\sum }_{i=1}^{p}{\alpha }_{5}\Delta Ln{GDP}_{t-1}+ {\epsilon }_{t}$$
(4)

In addition, if the indication of a long-run relationship between the research variables is discovered, the short-run model will be predicted. The following equation (Eq. 5) estimates the short-run model, sometimes referred to as the error correction model.

$${\Delta LnCO}_{2t}= {S}_{0} + {\sum }_{i=1}^{k}{S}_{1}{\Delta LnCO}_{2t-1} + {\sum }_{i=1}^{t}{S}_{2}\Delta Ln{AGR}_{t-1} + {\sum }_{i=1}^{r}{S}_{3}\Delta LnREN + {\sum }_{i=1}^{p}{S}_{4}\Delta Ln{OPEN}_{t-1}+ {\sum }_{i=1}^{p}{S}_{5}\Delta Ln{GDP}_{t-1}+ {\eta ECT}_{t-1}+{\epsilon }_{t}$$
(5)

where η represents the error correction coefficient in the estimated model. This coefficient represents the adjustment speed parameter, demonstrating the speed at which the series reaches a long-run equilibrium.

4 Empirical results and discussion

4.1 Descriptive analysis and correlation

Table 2 shows the descriptive statistical results of the variables used in our study. Evidence from Table 3 shows that renewable energy usage displays a long left tail (negative skewness), while trade openness, agriculture, and CO2 emission exhibit a right tail (positive skewness), whereas the average renewable energy usage, trade openness, and agriculture are higher than other variables (85.7%, 33.19%, and 31%, respectively).

Table 2 Descriptive statistics
Table 3 Variables’ units and source

The correlation matrix results are shown in Table 4 and reveal that agriculture, trade openness and GDP per capita have a positive and significant correlation with CO2 emissions, while renewable energy usage has a negative and significant correlation with CO2 emissions.

Table 4 Correlations between variables used in the equation

4.2 Stationary technique for data

This analysis used unit root tests to check the series stationary of the variables. Table 5 displays the series' stationary at the 5% significance level of initial variability, which is the basis for the unit root test analysis.

Table 5 Unit root test outcomes (ADF and Phillips-Perron test)

Based on the findings of the Augmented Dickey-Fuller unit root test and the Phillips-Perron unit root test in Table 5, all of the variables are stationary by level and first difference. As a result, we can conclude that none of the study's variables are I (2). Furthermore, the F-test would not be spurious on ARDL-bound testing based on Pesaran et al. (2001) and Narayan’s (2005) assumption that the variables must be I (0) or I (1).

4.3 Co-integration test

The long-run analysis between renewable energy, agriculture, and trade openness and CO2 emission was conducted using the ARDL-bound testing procedure. The estimation of maximum lags is the first step of the procedure before the co-integration test. The optimum lag was selected based on the Akaike Information Criterion, and the Schwaz and Hannan–Quinn information criteria show that the optimal lag in the model is 4.

The optimal model for Eq. (4) is the ARDL (4,2,4,4,4) model, which means choosing the maximum lag value k = t = r = s = 4 according to the information criterion of AIC, SIC, and Hannan-Quinn. Table 6 displays the results of the ARDL (1,0,1,1,0) bound test.

Table 6 Results of ARDL the bounds test of co-integration

According to Narayan (2005) and Pesaran et al. (2001), co-integration, which denotes a long-term relationship between variables, exists because the F statistic for this model is higher than the upper critical values. Table 5 reports the results of the bounds test based on a long-run analysis between renewable energy, agriculture, trade openness, and CO2 emission in Rwanda. As a result, the computed F-statistic of 5.795 in the ARDL-bound test is more than the upper critical bound value of 3.52 at the 1% significance level according to Narayan (2005). This shows that in Rwanda, renewable energy consumption, agriculture, trade openness, economic growth and CO2 emission are all co-integrated.

Table 7 shows the estimated findings of the long run and Table 8 shows the short-run results of the ARDL approach. CO2 emissions measured in metric tons were used as a dependent variable, while agriculture, renewable energy consumption, GDP per capita and trade openness were used as independent variables.

Table 7 Estimation of long-run relationships using the ARDL approach
Table 8 Short-run analysis using the ARDL approach

Table 7 indicates that agriculture, and trade openness statistically and significantly increase CO2 emission while renewable energy and GDP per capita decrease the degree of CO2 emission eventually.

The estimated coefficient of agriculture shows that in the long run, statistically and significantly, a 1% increase in agriculture productivity increases CO2 emissions by 1.94%. This might be due to agricultural productivity still relying heavily on fossil fuel energy in Rwanda. The drying, irrigation, heating, processing, packaging, water pumping and transportation of crop-related products are all heavily reliant on fossil fuels in the agricultural sector, contributing to increased CO2 emissions. This indicates that agricultural sector promotion in Rwanda is not associated with increased energy efficiency or renewable energy usage. Given the size of the agricultural sector and the prevalence of fossil fuel use in Rwanda, it is reasonable to conclude that an increase in agricultural operations rapidly boosts CO2. This result is reinforced by previous empirical findings by Waheed et al. (2018) in the case of Pakistan; Jebli and Youssef (2017) in the case of Tunisia and Qiao et al. (2019) in the case of G20 argue that agriculture statistically and significantly increases CO2 emission. In contrast, these findings contradict other empirical results that contend that agriculture decreases CO2 emission,  such as Rafiq et al.'s study (2016) for a panel of 53 nations, Liu et al.'s (2017a, b) study in the case of four selected Asian nations and Jebli and Youssef's (2017) study for a panel of five North African countries.

A statistically significant 1% rise in renewable energy consumption decreases CO2 emission by 2.7% eventually. In this context, the adaptation of green energy will be crucial in the reduction of CO2 emission in Rwanda. This result is reinforced by previous empirical findings (Aydoğan and Vardar 2020; Bento and Moutinho 2016; Shafiei and Salim 2014), which indicate that renewable energy improves environmental sustainability.

The use of hydroelectric energy is high compared with other green energy sources in Rwanda, and the method of producing renewable energy, especially hydroelectric power is not environment friendly. The findings found that a statistically significant 1% rise in renewable energy increases CO2 emissions by 7.71% in the short run, which implies that Rwanda does not adequately and efficiently use hydropower resources.

In term of trade openness, a statistically insignificant 1% increase in trade openness increases CO2 emission by 0.16% eventually. However, in the short-run dynamic, a 1% rise in international trade boosts CO2 emission by 0.97%. This result was reinforced by previous empirical findings by Dou et al. (2021) who found a positive relationship between foreign trade and CO2 emission.

The estimated coefficient of GDP per capita shows that in the long run, a statistically significant 1% increase in GDP per capita decreases CO2 emissions by 2%. However, in the short-run dynamic, a 1% rise in GDP per capita boosts CO2 emissions by 1.68%. Our findings found an inverse U shape which indicates that the positive impact of economic growth on CO2 emission can be inverted with progressive increases in GDP per capita in Rwanda. This result was reinforced by previous empirical findings (Asumadu-Sarkodie and Owusu 2016a, b, c, d) that revealed a inverse U shape relationship between economic growth and CO2 emission in Rwanda.

The adjustment term (-1.67*) for the long-run equilibrium relationship in Table 6 is statistically significant at the 1% level with a negative sign, indicating that the current year's deviation from long-run equilibrium is corrected with an adjustment speed of 1.6% through the channels of the agriculture sector, trade openness, economic growth and renewable energy.

As a result, the serial correlation (in Table 9) shows no autocorrelation between explanation variables and CO2 emission (the null hypothesis). The findings of the normality test for residual distribution using the Jarque bera test show that the p-value of both dependent variables and the overall model is greater than the 0.05 significance level. As a result, there is a rejection of the null hypothesis, demonstrating that the model's residuals are regularly distributed. The majority of errors are skewed and leptokutic. Additionally, the model is precisely defined.

Table 9 Diagnostic test showing results of serial correlation and normality tests

The study uses the Granger-causality concept to assess the direction of causality among variables because ARDL regression cannot predict the direction of causality. Accordingly, the results of the (Table 10) Granger causality tests confirm short-run unidirectional causality from agriculture to CO2 emission. Furthermore, the results reveal no evidence of causal effect between GDP per capita, renewable energy consumption, trade openness and CO2 emission.

Table 10 Granger causality test results

5 Stability tests

The cumulative sum (CUSUM) and the cumulative sum of recursive residual squares of residuals (CUSUMSQ) tests as proposed by Pesaran et al. (1997) were used to assess the model’s robustness and stability. The results of the CUSUM and CUSUMSQ tests are specified in Figs. 1, 2, 3 and 4.

Fig. 1
figure 1

Analysis flowchart

Fig. 2
figure 2

Trend of variables. Source: Author computation

Fig. 3
figure 3

The plot of CUSUM

Fig. 4
figure 4

The plot of CUSUM square

In the CUSUM test and CUSUM Square test graphs, at a 5% significance level, the coefficients are constant and lie between lower and upper boundaries so that the model is stable and reliable for policymakers.

6 Conclusions

Agriculture and trade openness are dominant sectors in Africa and Rwanda, particularly as drivers of economic growth. However, there is sparse empirical and theoretical evidence on the impact of agriculture, renewable energy consumption, and trade openness on CO2, emission, along with mixed theoretical and empirical evidence on independent variables and CO2 emission. This study fills the gap by examining the impact of agriculture, renewable energy, and trade openness on carbon emissions over the period of 1990–2021. The theoretical foundations of the pollution haven, halo, and environment Kuznets curves serve as the analytical basis for this study.

The methods we used for analysis were auto-regressive distributive lag and Granger causality test. The results of co-integration tests confirm the co-integrating relationship among agriculture, renewable energy, trade openness, economic growth and carbon emission in Rwanda. Further, the analysis of the long-run evidence indicates that statistically and significantly GDP per capita and renewable energy consumption decrease CO2 emission, whereas statistically and significantly agriculture increase CO2 emission and international trade insignificantly decrease CO2 emission. In contrast, the short-run analysis result indicates that statistically and significantly renewable energy, agriculture and international trade increase CO2 emission, whereas GDP per capita increase CO2 emission insignificantly in short run. This implies that the dominance of hydroelectric energy has a positive impact on increasing CO2 emissions but after increasing other renewable energy including solar and wind energy, CO2 emissions will decrease through renewable energy. The impact of international trade and economic growth on carbon emission implies that there are inadequate environmental regulations and trade improvements have contributed to the degradation of the environment.

7 Recommendations

The use of fossil fuels in agriculture sector increases CO2 emissions. Thus, renewable energy is essential in the agriculture (cultural sector in Rwanda. Solar panel systems, wind turbine energy, efficient irrigation system, training, and financial support are recommended in the agriculture sector in order to increase environmental sustainability. Through the aforesaid actions, the amount of hydroelectric energy should be reduced among the renewable energy mix and the environment-friendly renewable energy increase. The policymakers should highlight the effective policies of replacing fossil fuel energy and the growth of clean energy by enhancing and funding research and development programs and reinforcement of laws and regulations.

Furthermore, to decrease the impact of trade openness and economic growth on environmental sustainability, it is very crucial to increase environmental friendly production system industries that could stimulate clean technology knowledge spillovers into all economic sectors. For a successful and efficient process of knowledge spillover, the receiving countries should improve their mechanism of absorption ability.