Introduction

Environmental degradation has become the most challenging threat to world prosperity and sustainability. Increasing human demand for natural resources puts high pressure on the ecosystem, leading to severe environmental problems. They include but are not limited to climate change, soil degradation, water contamination, air pollution, biodiversity loss, and global warming. Governments have made great efforts to decarbonize energy systems and to support environmental protection and restoration, such as enforcing strict environmental regulations, adopting high environmental taxes, providing financial subsidies and favorable prices for both renewable energy production and consumption, sponsoring research on energy-efficient technologies, and implementing programs to raise public environmental awareness. Internationally, governments are cooperating in their implementation of several measures to prevent further declines in environmental quality, including the Montreal Protocol in 1989 on phasing out ozone-depleting substances, the Kyoto Protocol in 1998 on reducing greenhouse gas emissions, and the Paris Agreement in 2016 to limit the rise in global average temperatures. Despite all these efforts, environmental quality has still significantly declined. According to United Nations (2019), in the past decade, greenhouse gas emissions have risen at a rate of 1.5% per year. A record high of 55.3 GtCO2e was reached in 2018, most of which comes from carbon emissions. The Global Footprint Network (2019) reports that in 2016 the world average ecological footprint was 2.75 global hectares per capita, whereas the world average biocapacity was only 1.63 global hectares per capita. This means that humanity exceeds the planet’s ability to provide biological resources by 69%.

Since the global financial crisis in 2008 and the Eurozone debt crisis in 2009, governments, economists, and researchers have paid great attention to economic policy uncertainty (EPU). As an institutional factor, EPU has significant impacts on the business environment for economic activity. Many papers have confirmed the adverse impacts of EPU on the real economy (Gu et al. 2021; Li et al. 2020), firm investment (Liu et al. 2020; Suh and Yang 2021; Zhou et al. 2021), innovation activities (Guan et al. 2021; He et al. 2020), financial markets (Danisman et al. 2020; Nguyen et al. 2020; Phan et al. 2021), and energy markets (Xiao and Wang 2021; Zhang and Yan 2020). Based on the close link between economic activity and environmental quality, several authors discuss the potential outcomes of EPU on environmental quality (Jiang et al. 2019; Yu et al. 2021). According to Jiang et al. (2019), EPU can affect carbon dioxide (CO2) emissions through three channels. First, high EPU diverts government attention from environmental issues. Consequently, implementation of environmental regulations is negatively affected. Second, the economic performance of enterprises deteriorates under uncertain economic condition, reducing both natural resources exploitation and energy consumption. However, if the firms choose cheaper and more polluting energy in response to an uncertain economic environment, higher pollution is expected. Third, firms may reduce their commitments to control carbon emissions if the government is expected to relax environmental regulations under high EPU. Yu et al. (2021) speculate that EPU can influence firm emissions through three channels, including innovation, share of fossil fuels, and energy intensity. Overall, energy consumption, renewable energy, CO2 emissions, and the ecological footprint are important environmental aspects of EPU. However, the nexus between EPU and environmental degradation has been empirically investigated by few researchers at the international level (Adedoyin et al. 2021a; Anser et al. 2021; Pirgaip and Dinçergök 2020), national level (Adedoyin and Zakari 2020; Danish and Khan 2020; Yu et al. 2021), and sectoral level (Jiang et al. 2019). Thus, it is necessary to study the environmental impacts of EPU more broadly by taking into account its direct consequences as well as its mediating effects through other determinants of environmental quality.

Another term that has been recently received great attention from policy makers and scholars is economic complexity (ECI). Becker and Murphy (1992) define “complexity” as the number of different inputs required for production of one unit of a good. Applying this definition at a country scale, the complexity level of a country could be defined as the diversity of knowledge and the efficient combination of knowledge to make use of it (Hausmann et al. 2014). In other words, ECI is a nonmonetary and non-income–based proxy for a country’s economic development. Several papers mention a link between ECI and environmental quality. At the first stage of development, less sophisticated countries focus on the limited production of primary goods, which are less pollution intensive. More developed countries with a higher level of knowledge exploit more resources and produce more goods, which results in excessive environmental degradation. However, after a certain level of knowledge is accumulated, the structural move from energy-intensive to technology-intensive industries and the prevalence of cleaner production technologies can reduce environmental externalities (Can and Gozgor 2017; Chu 2021; Yilanci and Pata 2020). Like the literature on the EPU-environment nexus, the literature on the role of ECI in environmental quality is extensive. Although Neagu (2020) and Wang et al. (2021) report the harmful effects of ECI, others find that ECI plays a positive role (Boleti et al. 2021; Dogan et al. 2020) or a nonlinear relationship between ECI and the environment (Chu 2021). Given the argument that sophisticated knowledge in a country depends significantly on its institutions (Hartmann et al. 2017), it is intuitive to expect that the uncertainty regarding economic policy could affect the ECI–environment nexus.

Overall, three strands of the literature—EPU, ECI, and environmental quality—identify some valuable suggestion for policy makers in targeting sustainable development goals. Several studies have been conducted on the environmental effect of ECI or EPU (Adedoyin and Zakari 2020; Pata 2021; Pirgaip and Dinçergök 2020; Rafique et al. 2021), to the best of our knowledge, no research has been done to date that takes into consideration the effect of both factors as well as the moderating effects of EPU.

The Group of Seven (G7) consists of the seven largest advanced and wealthy economies, which not only contribute significantly to global production and consumption but also produce 24.4% of global CO2 emissions. Although this proportion of emissions has declined gradually since 2000 because of significant efforts to increase renewable energy consumption and the invention of energy-efficient technologies, the USA still ranks second, Japan ranks fifth, and Germany ranks sixth among the ten countries that emit the most CO2. In terms of economic complexity, G7 countries are ranked among the most sophisticated economies, all in the top twenty, except Canada, which ranks 39th. Japan ranks first and Germany fourth. Furthermore, since the 2008 global financial crisis, G7 countries have experienced high volatility in EPU. Therefore, it is interesting to examine the effect of EPU, economic complexity, renewable energy, and energy intensity on CO2 emissions and the ecological footprint (see Fig. 1).

Fig. 1
figure 1

Carbon dioxide emissions and renewable energy consumption in G7 countries and the share of world levels contributed by G7 countries. Source: BP Statistical Review of World Energy, 2020. Note: The carbon emissions reflect only those through consumption of oil, gas, and coal for combustion-related activities, and renewable consumption is based on gross generation and does not account for cross-border electricity supply. G7’s share of world emissions is measured on the right-hand axis

Figure 1 shows that, because of the increasing trend toward consumption of renewable energy, the G7’s CO2 emissions have recently declined, and the G7 accounts for 40% of world renewable energy consumption. A similar connection between renewable energy consumption and CO2 emissions per capita is illustrated in Fig. 2, which also shows that since the global financial crisis, the level of EPU in G7 countries has been high at the same time that CO2 emissions and ECI have been declining, and renewable energy consumption has become more popular. These patterns raise the important question of whether EPU affects the environmental effects of renewable energy consumption and economic complexity. This inquiry is further reinforced by the above-mentioned literature on the effects of EPU on many economic and environmental indicators. In summary, the G7 offers a good opportunity for examining the nexus among EPU, ECI, and environmental quality.

Fig. 2
figure 2

Carbon dioxide emissions, renewable energy consumption, economic complexity, and economic policy uncertainty in G7 countries. Sources: World Development Indicators database, Atlas Media database, and https://www.policyuncertainty.com/index.html. Note: Carbon dioxide emissions (kg per 2010 US$ of GDP), renewable energy consumption (% of total final energy consumption), economic complexity (index), economic policy uncertainty (index)

In terms of originality and contributions to the current literature, this study is the first to concurrently explore the environmental effects of EPU and ECI, in terms of direction and magnitude, in the G7 countries. Moreover, the paper analyzes the mediating effects of EPU on the relationship among energy intensity, renewable energy, ECI, and two environmental indicators, CO2 emissions and ecological footprints. To achieve these objectives, we employ a panel dataset over the period from 1997 to 2015. The cointegration tests are used to identify the existence of a long-run relationship among the variables of interest. After determining the cointegration relationship, we use the fully modified ordinary least squares (FMOLS) and fixed effects model with Driscoll and Kraay (1998) robust standard errors to estimate the environmental effect of each variable on CO2 emissions and ecological footprints. To explore the moderating effect of EPU, the interactions between EPU and the three variables mentioned are introduced into regression models. We calculate the marginal effect of ECI, renewable energy, and energy intensity on two environmental quality indicators conditional on the evolution in EPU.

We obtain the following results, which are stable to extensive robustness checks. First, higher EPU reduces environmental degradation in the G7 countries. Second, ECI increases environmental externalities at its initial stage of evolution. After reaching a certain high level, ECI decreases the level of CO2 emissions and the ecological footprint. Third, although renewable energy consumption significantly reduces environmental pollution, energy intensity propels high levels of environmental degradation. Fourth, EPU strongly moderates the environmental effects of renewable energy, ECI, and energy intensity. On the one hand, EPU amplifies the beneficial environmental effects of renewable energy and ECI. On the other hand, it also magnifies the harmful effect of energy intensity on environmental quality. These empirical outcomes allow us to draw useful implications for policy makers.

The rest of this paper continues as follows. The second section provides a review of the relevant literature. The third section describes the dataset and methodology. The fourth section reports and discusses the estimation results. We draw conclusions and suggest policy implications in the fifth section.

Brief literature review

This section provides a brief review of the literature on the role of renewable energy, energy intensity, EPU, and ECI in environmental quality. In the literature on environmental quality, energy is closely linked to both CO2 emissions and the ecological footprint. Renewable energy consumption and energy intensity are often identified as the key energy factors. Given the growth in the world population and unavoidable higher energy demand, the continuous use and high dependence on fossil fuels lead to significant degradation in environmental quality. In contrast, renewable energy sources are cleaner, inexhaustible, environmentally friendly, and less affected by geopolitical risk (Adedoyin et al. 2021a). Most research find that renewable energy consumption reduces CO2 emissions and plays an important role in achieving sustainable development goals (Adams and Acheampong 2019; H. Khan et al. 2020; Vural‐Yavaş 2021; Swain and Karimu 2020; Wang et al. 2020). Adedoyin et al. (2021b) and Sharif et al. (2020) conclude that using a higher proportion of renewable energy significantly decreases CO2 emissions in Japan and the ecological footprint in Turkey, respectively. In contrast, nonrenewable types of energy, such as coal, increase CO2 emissions in South Africa (Joshua et al. 2020). Pham et al. (2020) find beneficial effects of renewable energy sources in controlling environmental degradation in 28 European countries. Similarly, renewable energy is an important factor in regulating CO2 emissions in 69 countries involved in the Belt and Road Initiative (A. Khan et al. 2020). Chu (2021) finds that renewable energy consumption significantly decreases CO2 emissions in both high-income and middle-income countries.

Regarding the role of energy intensity, a reduction in energy intensity or increase in energy efficiency is considered a major part of the solution to reducing CO2 emissions (Nasir et al. 2021; Neagu 2019; Talaei et al. 2018; Worrell et al. 2001). Nasir et al. (2021) show that energy intensity significantly lowers CO2 emissions in Australia. Similarly, higher energy efficiency, in terms of less oil equivalent per capita, plays a critical role in emission reduction in Kenya (Sarkodie and Ozturk 2020). Energy innovation, measured as public expenditure on energy research and development per capita, is found to have a negative effect on greenhouse gas emissions in 27 member countries of the Organization for Economic Cooperation and Development (OECD) (Baloch et al., 2021). Chu (2021) find a significantly positive relationship between energy intensity and CO2 emissions in a group of 91 countries.

Empirical studies on the relationship between EPU and environmental quality have emerged recently in the literature. These studies rely on a reliable and comprehensive measure of EPU index released by Baker et al. (2016). Although some studies focus on a single-country context, other research examines a broader context.

In the former group, the country studied is one of the top carbon emitters, such as China, the UK, and the USA. Jiang et al. (2019) conclude that EPU is relevant for explaining the fluctuation of total and sectoral CO2 emissions (industrial, residential, transportation, and electricity sectors) in the USA. Specifically, EPU Granger causes growth in CO2 emissions at lower quantiles of the emission growth distribution. It is also noteworthy that EPU has no influence on CO2 emission growth in the commercial sector. Sohail et al. (2021) indicate that effects of US monetary policy uncertainty on renewable and nonrenewable energy are asymmetric in direction and magnitude. Danish and Khan (2020) find that not only does EPU adversely affect environmental quality in the USA but it also strengthens the detrimental effect of energy intensity on CO2 emissions. Yu et al. (2021) explore the impact of EPU on CO2 emissions by Chinese firms as well as identify the channels through which EPU can affect firms’ emissions intensity. The results show that China’s provincial EPU has a positive outcome on firms’ CO2 emissions. This inadvertent effect works through the share of fossil fuels and energy intensity in the short term but not through the firm innovation channel. In the UK, EPU reduces the growth of CO2 emissions in the short term but has harmful effects in the long term (Adedoyin and Zakari 2020).

With regard to the latter group, Anser et al. (2021) explore the impact of a world uncertainty index on CO2 emissions in the top ten carbon emitter countries. According to the empirical results, an increase in the world uncertainty index mitigates CO2 emissions in the short run but escalates emissions in the long run. Pirgaip and Dinçergök (2020) provide evidence of unidirectional causality running from EPU to energy consumption in Japan, to CO2 emissions in the USA and Germany, and to both energy consumption and CO2 emissions in Canada. Zakari et al. (2021) show a positive connection between EPU and CO2 emissions in 22 OECD countries. Adedoyin et al. (2021a) examine environmental issues in sub-Saharan Africa. They find that the disruption of economic activities due to uncertainty in economic policy causes a significant increase in CO2 emissions. Similarly, Adams et al. (2020) conclude that a significant linkage exists between EPU and CO2 emissions in the long run.

Since the publication of ECI developed by Hidalgo and Hausmann (2009), a great deal of research has explored its environmental impact. The empirical results are inconsistent in both single-country and country-group contexts. Pata (2020) examined the impact of ECI on both CO2 emissions and the ecological footprint in the USA. The main finding indicates that the inverted U-shaped environmental Kuznet curve relationship between ECI and pollution holds for the USA. Shahzad et al. (2021) conclude that fossil fuels and ECI contribute to enhancing environmental externalities in the USA. Similarly, Yilanci and Pata (2020) find that ECI increases the ecological footprint in China. In contrast, a higher ECI reduces the level of CO2 emissions in the long term in France (Can and Gozgor 2017). In a broader context, several researchers investigate the environmental effect of ECI in the leading complex countries (Neagu 2020; Wang et al. 2021), OECD countries (Dogan et al. 2020), and European Union countries (Neagu 2019). In complex countries, Neagu (2020) and Wang et al. (2021) find that an increase in ECI leads to environmental degradation. In contrast, Dogan et al. (2020) conclude that ECI plays an effective role in mitigating environmental degradation in OECD countries. Neagu (2019) finds that the EKC hypothesis is valid in both full sample of 25 EU countries and six member countries (Belgium, France, Italy, Finland, Sweden, and the UK). Other authors, such as Boleti et al. (2021), Chu (2021), Doğan et al. (2019), and Romero and Gramkow (2021), use a larger sample. Boleti et al. (2021) find that a higher level of ECI leads to better overall environmental performance (based on health impacts, air quality, and water and sanitation) but induces air pollution in a sample of 88 developed and developing countries. Doğan et al. (2019) find that the impact of ECI on CO2 emissions varies according to the economic development of a country. Specifically, ECI increases environmental degradation in low- and middle-income countries but limits it in high-income countries. Similarly, Rafique et al. (2021) show that ECI is an important policy factor that supports energy transformation in both G7 and E7 countries. Romero and Gramkow (2021) find a negative relationship between ECI and greenhouse gas emissions in a sample of 67 countries. Chu (2021) reports an inverted U-shaped relationship between ECI and CO2 emissions in a sample of 118 countries. In addition, although ECI benefits environmental quality in high-income countries, it leads to significant degradation in air pollution in middle-income countries.

These studies have meaningful theoretical and empirical results for the determinants of environmental quality. However, some gaps remain. First, a limited number of research have already tested the EKC of ECI and the environmental impact of EPU for a group of highly sophisticated economies such as the G7 (Pirgaip and Dinçergök 2020). Pirgaip and Dinçergök (2020) perform a bootstrap panel Granger causality test but do not measure the direction and magnitude of the environmental impact of EPU. Second, the moderating impacts of EPU on the environmental impact of renewable energy (Adedoyin et al. 2021a), energy intensity, and economic complexity have largely been ignored. For these reasons, this study is intended to fill the gap and contributes to the environmental literature by providing a more comprehensive and detailed analysis.

Data and methodology

Data

This study uses panel data for the G7 countries from 1997 to 2015. The two proxies for environmental quality, CO2 emissions (kg per 2010 US$ of GDP) and the ecological footprint (global hectares per capita), are the dependent variables. Although CO2 emissions do not include water and soil pollution, the ecological footprint introduced by Rees (1992) is a broader indicator of environmental quality, covering cropland, forest, built-up land, CO2 emissions, and water pollution. Data on the former come from the World Bank’s World Development Indicators database, and the latter is sourced from the Global Footprint Network. For a robustness test, we also use the ecological footprint of consumption and biological capacity deficit to proxy for environmental externalities.

The three main independent variables are renewable energy consumption, EPU, and ECI. We use the index of EPU developed by Baker et al. (2016) for the USA and 11 other major economies. Baker et al. (2016) count the frequency of articles in leading newspapers containing terms about the economy, policy, and uncertainty. The raw counts then are scaled by the total number of articles in the same newspaper, standardized to one standard deviation, and averaged across all newspapers. The data on EPU come from the Economic Policy Uncertainty website (https://www.policyuncertainty.com). For robustness, we use the global uncertainty index as a proxy for EPU. Developed by Ahir et al. (2018), this index is constructed based on the frequency counts of the word “uncertainty” (and its variants) in country reports by the Economist Intelligence Unit. The coverage of the world uncertainty index is broader than the EPU index because the former takes into consideration both major political and economic developments in each country.

The ECI is a concept developed to reflect the stock of productive knowledge accumulated by a population. Because knowledge is a crucial input of the production process, and a country produces and exports products in which it has a competitive advantage, economic sophistication could be measured through international trade practices. Based on that idea, Hidalgo and Hausmann (2009) build an ECI index, which represents the diversity and ubiquity of products exported by a country. While the former represents the spectrum of products that a country can make competitively, the latter measures the pervasiveness of these products. We also use the improved ECI index, which considers the level of difficulty of exporting products for a sensitivity check. The data on these two indices can be extracted from the MIT Media Lab’s Observatory of Economic Complexity index.

This study uses the proportion of renewable energy in total final energy consumption to proxy for renewable energy. Moreover, renewable electricity output as a share of total electricity output is selected for a robustness test. Other explanatory variables include real GDP per capita (constant 2010 US$) and energy intensity (kg of oil equivalent per capita). The data on these two variables come from the World Bank’s World Development Indicators database. The abbreviation, measurement, and source of the data are indicated in Table 1.

Table 1 Definitions of the variables

Table 2 lists descriptive statistics of all the variables in the full sample and for each G7 country. The average CO2 emissions in the sample are − 1.420 (equivalent to 0.257 kg per 2010 US$ of GDP). The mean of energy intensity is 8.412 (equivalent to 4832 ton of oil equivalent per capita). The average proportion of renewable energy consumption is around 1.926 (equivalent to 9%). Table 2, panel B, shows that the USA and Canada are respectively in first and second places in CO2 emissions, ecological footprint, EPU, and energy intensity. In contrast, France and Italy emit less CO2 than other G7 members (and have the lowest energy intensity). Canada has the highest proportion of energy consumption from renewable sources, followed by France and Italy. Japan and the UK depend more on nonrenewable energy. Japan is the most sophisticated economy, followed by Germany, and Canada is the least complex.

Table 2 Descriptive statistics

The correlation matrix is given in Appendix Table 6, showing significant relationships between energy intensity, ECI, EPU, and environmental quality. EPU is positively correlated with renewable energy but negatively correlated with ECI.

Model specification and estimation method

Our empirical analysis follows the specification model developed by Adams et al. (2020), Adedoyin et al. (2021a), and Chu (2021), which includes GDP per capita, energy intensity, renewable energy, EPU, and ECI as the key determinants of environmental quality. The econometrical model is expressed as follows:

$$ \mathrm{ENQ}=f\left(\mathrm{GDPpc},\mathrm{ENE},\mathrm{REN},\mathrm{EPU},\mathrm{ECI}\right) $$
(1)

where ENQ denotes the environmental quality, proxied by CO2 emissions and ecological footprint; GDPpc is GDP per capita; ENE is energy intensity; REN is renewable energy consumption; EPU is economic policy uncertainty; and ECI is economic complexity. Equation (1) is split into the two following regression equations:

$$ {\mathrm{ENQ}}_{i,t}={\alpha}_0+{\alpha}_1{\mathrm{GDPpc}}_{i,t}+{\alpha}_2{\mathrm{ENE}}_{i,t}+{\alpha}_3{\mathrm{REN}}_{i,t}+{\alpha}_4{\mathrm{EPU}}_{i,t}+{\alpha}_5{\mathrm{ECI}}_{i,t}+{\alpha}_6{\mathrm{ECI}}_{i,t}^2+{\varepsilon}_{i,t} $$
(2)
$$ {\mathrm{ENQ}}_{i,t}={\beta}_0+{\beta}_1{\mathrm{GDPpc}}_{i,t}+{\beta}_2{\mathrm{ENE}}_{i,t}+{\beta}_3{\mathrm{REN}}_{i,t}+{\beta}_4{\mathrm{EPU}}_{i,t}+{\beta}_5{\mathrm{ECI}}_{i,t}+{\beta}_6{\mathrm{ECI}}_{i,t}^2+{\beta}_7{\mathrm{EPU}}_{i,t}\times {\mathrm{ENE}}_{i,t}+{\beta}_8{\mathrm{EPU}}_{\mathrm{i},\mathrm{t}}\times {\mathrm{REN}}_{i,t}+{\beta}_9{\mathrm{EPU}}_{i,t}\times {\mathrm{ECI}}_{i,t}+{\beta}_{10}{\mathrm{EPU}}_{i,t}\times {\mathrm{ECI}}_{i,t}^2+{\mu}_{i,t} $$
(3)

where i indicates the country; t signifies the time; α and β are regression coefficients; and εi, t and μi, t are error terms. Although Eq. (2) measures only the direct impacts of control variables, Eq. (3) considers the moderating impacts of EPU on the effects of these variables on environmental externalities.

The sequence in the econometric methods is as follows: check the cross-sectional dependence among variables; check the variables’ stationarity; test the cointegration relationship between variables; test for the existence of heteroskedasticity and serial correlation; and, if the existence of cointegration is confirmed, use the FMOLS and fixed effects models and perform a causality test.

To check for cross-sectional dependence, we perform the Pesaran (2004) test. The null hypothesis is the absence of cross-sectional dependence, whereas the alternative hypothesis supports the presence of cross-sectional dependence.

If the test indicates the presence of cross-sectional dependence, we proceed with testing the stationarity of variables. In the method proposed by Pesaran (2007) to eliminate cross-dependence, the standard Dickey–Fuller regressions are augmented with the cross-section averages of lagged levels and first differences of the individual series. The null hypothesis in which all panels contain unit roots is tested against the alternative hypothesis that a portion of the series is stationary. We also employ Levin et al. (2002) and Im et al. (2003) tests with the null hypothesis that all panels contain a unit root.

To determine whether cointegration exists between the variables, we use the methods proposed by Westerlund (2005) and Pedroni (1999, 2004). Westerlund (2005) designs a null hypothesis of no cointegration against the alternative hypothesis that the panel is cointegrated as a whole or that some cointegrated individuals is positive. In the Pedroni (1999, 2004) tests, the null hypothesis assumes that there is no cointegration in a heterogeneous panel with one or more nonstationary regressors. The alternative hypothesis claims that long-run cointegration is found among the variables.

The paper also tests for the presence of heteroskedasticity and autocorrelation in two regression equations using Wald statistics. The two null hypotheses are homoskedasticity and no serial correlation in the residuals. After confirming the cointegration relation among the variables, we further examine the long-run relationship using FMOLS and the fixed effects models with Driscoll and Kraay (1998) robust standard errors. The FMOLS is chosen because it relies on a nonparametric to deal with serial autocorrelation and endogeneity problems.Footnote 1 The latter approach, the fixed effects model with Driscoll and Kraay (1998) robust standard errors, can account for heteroskedasticity, cross-sectional dependence, and autocorrelation. To determine whether the fixed effects or random effects model is appropriate, we perform the Hausman test. These approaches have been extensively used in prior studies, such as Nasir et al. (2019), Dogan et al. (2020, 2021), Nguyen et al. (2021), and Wang et al. (2021).

As a final step, we perform the Dumitrescu-Hurlin (2012) causality test. This test produces efficient and unbiased estimates, because it can take cross-sectional dependence into account. The null hypothesis assumes no homogeneous causality between two variables.

Empirical results and discussion

Main results and discussion

The results of the cross-sectional dependence test are reported in Appendix Table 7. All three tests (Pesaran, Friedman, and Frees) that have a null hypothesis of cross-sectional independence are rejected at conventional levels for both CO2 emissions and the ecological footprint. This finding is further supported by the comovement of variables between countries in Fig. 2, so we continue checking the stationarity properties of the variables, taking into consideration the presence of cross-sectional dependence. Appendix Table 8 illustrates the results of the Pesaran (2007), Levin et al. (2002), and Im et al. (2003) tests for all variables and their first differences. The empirical estimates indicate that EPU is stationary at level in the Levin et al. (2002) and Im et al. (2003) tests and somewhat stationary at the first difference in the Pesaran (2007) test. All the other variables have a unit root at level but become stationary at the first difference. Appendix Tables 9 and 10 shows the empirical results of the Westerlund (2005) and Pedroni (1999, 2004) cointegration tests. In Table 9, the Westerlund (2005) tests are mostly statistically significant at conventional levels for both CO2 emissions and the ecological footprint, confirming the presence of cointegration among the variables. In Table 10, four of the seven statistics have a corresponding value of probability at conventional significance levels, rejecting the null hypothesis of no cointegration. Overall, two tests indicate a valid cointegration relationship between the variables for both equations. Appendix Tables 11 and 12, respectively, illustrate that the null hypotheses of no heteroskedasticity and no serial correlation are rejected. The Hausman test results presented in Appendix Table 13 support the adoption of the fixed effects over the random effects model.

Given the cointegration relationship identified between the variables, we examine the long-run relationship using the FMOLS and fixed effects models with Driscoll–Kraay standard errors. Table 3 reports the estimation results for Eqs. (2) and (3) with CO2 emissions and the ecological footprint as proxies for environmental degradation. We start by discussing the results of Eq. (2), then considering the moderating effect of EPU in Eq. (3). Columns (1), (3), (5), and (7) indicate that all the variables of interest are influential determinants of CO2 emissions and the ecological footprint. First, the estimated GDP per capita coefficients are negative and statistically significant, indicating that the effect of higher income on environmental quality is favorable in the G7 countries.

Table 3 Results

In contrast, the estimated coefficient of energy intensity is positive and statistically significant, which means that higher energy use causes environmental degradation. This result is similar to the findings of Nasir et al. (2021), Danish and Khan (2020), Neagu (2019), Pham et al. (2020), and Sarkodie and Ozturk (2020), which indicate a strongly positive relationship between energy intensity, energy consumption, and environmental degradation. Activities by both businesses and households rely heavily on energy consumption, which often requires large supplies of fossil fuels and nonrenewable energy. By emitting a large quantity of pollutants into the environment and reducing biocapacity below its sustainable level, high energy use is of great concern to human well-being. Thus, protecting the environment while still supporting economic growth requires a shift from less-efficient energy technologies to those that are more efficient.

Third, it is obvious that the harmful effects of fossil fuel use and dependence are multifaceted, threatening the economy, health, and the environment. However, the adverse impact on the environment could be controlled by using renewable energy, as the estimated coefficient of its consumption is negatively significant. Adedoyin et al. (2021a), Baloch et al. (2021), Chu (2021), Dogan et al. (2020), Sharif et al. (2020), and Wang et al. (2021) find that renewable energy plays a significant role in pollution mitigation in different countries or country groups. Thus, transforming both the energy structure and production technologies from nonrenewable to renewable energy could help mitigate pressure on the environment (Baloch et al., 2021; Chu 2021; Khan et al. 2021a; Udemba et al., 2020).

Fourth, the estimated coefficients of ECI and its squared term are positive and negatively significant at conventional levels, respectively. At the early stage of development, higher economic sophistication damages environmental quality. Countries at this stage mostly engage in extensive activities in the primary sector with less sophisticated products that contribute less to environmental degradation. However, when a country moves gradually into the industrialization stage, with more energy-intensive industries (e.g., textiles, refining, and basic chemical industries), the harmful environmental effects start to increase. When a country’s knowledge evolves to a high level, it can create and adopt environmentally friendly energy sources as well as cleaner production technologies. At this point, the transition occurs from energy-intensive to technology-intensive industries, mitigating the environmental externalities. Our findings on the inverted U-shaped relationship between ECI and environmental quality are similar to the conclusions of Chu (2021), Neagu (2019), and Pata (2020) but different from the outcomes of Neagu (2020) and Wang et al. (2021).

With regard to EPU, the estimated coefficient is negative and statistically significant, implying that higher uncertainty reduces CO2 emissions and the ecological footprint. For the countries in our sample, the economic contraction caused by high EPU overwhelms the neglected implementation of environmental regulations, reduced commitments on environmental protection by enterprises, and the higher use of cheaper but more polluting energy sources. Although these results confirm the significant environmental impact of EPU, it is different from the empirical literature that indicates a positive long-run relationship between the two variables (Adams et al. 2020; Adedoyin et al. 2021a; Anser et al. 2021; Atsu and Adams 2021; Danish and Khan 2020; Sohail et al. 2021; Yu et al. 2021; Zakari et al. 2021). The difference may be due to the choice of research sample. Adams et al. (2020) investigate the environmental effects of EPU in ten resource-rich countries. Adedoyin et al. (2021a) examine the role of EPU in the energy–growth–emissions nexus in 32 countries in sub-Saharan Africa. Zakari et al. (2021) select 22 OECD countries, whereas Atsu and Adams (2021) focus on Brazil, Russia, India, China, and South Africa (BRICS countries) in their studies. In a single-country research context, Amin and Dogan (2021) and Yu et al. (2021) examine the impact of EPU on environmental quality in China, whereas Anser et al. (2021) and Danish and Khan (2020) conduct analyses on the USA.

We further explore the moderating effects of EPU on the relationship between energy intensity, renewable energy, ECI, and environmental quality. The estimated results are presented in columns (2), (4), (6), and (8). We find that the sign of estimated coefficient of energy intensity for CO2 emissions and under FMOLS changes from positive to negative but the sign of the estimated coefficients of renewable energy consumption changes from negative to positive. However, the signs of the estimated coefficients of ECI and its squared term are unchanged. It is also noteworthy that the signs of the estimated coefficients of the three interaction variables are in opposite direction of those of the main effects. Similar results are found for the ecological footprint.

After the interaction terms are added to the regression model, it is not appropriate to interpret the results by simply combining the effect of each variable with the effect of the interaction variable (Brambor et al. 2006). The environmental effects of energy intensity, renewable energy, and ECI are now conditional on the level of EPU. To examine these results more closely, we illustrate the marginal effects of the three variables mentioned (at their means) on the evolution of EPU in Fig. 3. Figure 3A shows that the marginal effects of energy intensity on both CO2 emissions and the ecological footprint are positive and statistically significant when the EPU in all G7 countries is within the current range for the period studied. High EPU amplifies the unintended environmental effect of energy intensity. The reason for this phenomenon might be that when uncertainty is high, companies and households tend to use energy more intensively and use less-efficient energy technologies. This finding is identical to the conclusion of Danish and Khan (2020) that in the USA, EPU strengthens the detrimental effect of energy intensity on CO2 emissions.

Fig. 3
figure 3

Marginal effect of energy intensity, renewable energy consumption, and economic complexity on environmental quality conditional on economic policy uncertainty. A Marginal effect of energy intensity. B Marginal effect of renewable energy consumption. C Marginal effect of economic complexity. Note: This figure represents the impact of energy intensity, renewable energy consumption, and economic complexity (at their means) on environmental quality based on the estimation results in Table 3, columns (2) and (6). The solid black line plots the marginal effect of the variable of interest on environmental quality conditional on economic policy uncertainty. The dotted lines are 90% confidence intervals

The marginal effect of renewable energy consumption is shown in Fig. 3B. Although its effects on CO2 emissions and the ecological footprint are in the same direction, the magnitude of the latter is larger. On the one hand, renewable energy consumption increases air pollution at extremely low levels of EPU. On the other hand, renewable energy consumption deteriorates the ecological footprint at low to medium levels of EPU. However, these harmful effects are statistically insignificant (within the current range of G7 countries’ EPU level). In contrast, high EPU magnifies the beneficial effect of renewable energy on environmental quality. Adedoyin et al. (2021a) indicate that the moderating effects of EPU on renewable and nonrenewable energy lead to a reduction in CO2 emissions. According to Sohail et al. (2021), a reduction in monetary policy uncertainty has a significantly negative outcome on renewable energy consumption in the USA. Environmental uncertainty encourages firms to employ conventional cheap energy sources to compensate for low turnover. In the long run, this production adjustment eventually leads to higher net income, allowing firms to invest in technologies that use renewable energy (Luni and Majeed, 2020). Moreover, the supply and price of nonrenewable energy, such as fossil fuels, are highly sensitive to the business cycle and political conditions. Because of these uncertainties, risk-adverse firms have a tendency to shift their dependence from nonrenewable to renewable energy, which is less volatile. Governments also want to address national energy insecurity by reducing their countries’ dependence on imported energy sources as well as dealing with erratic supply and fluctuating prices of nonrenewable energies.

Figure 3C illustrates a similar effect of ECI on environmental quality conditional on the level of EPU. EPU affects the environmental effects of economic complexity through several channels. First, the contraction in production and consumption activities due to economic shocks mitigates the amount of pollution. The second channel is the shift from nonrenewable and traditional energy to those that are renewable and cleaner over the long term. However, given the inverted U-shaped relationship between the two variables, we then illustrate the environmental effect of ECI at different levels in Fig. 4. As shown in Table 3, the relationship between ECI and environmental quality takes an inverted U shape. When ECI is at low level, an increase in it damages environmental quality, and higher EPU magnifies this unintended effect. However, when it is high, an upgrade in economic sophistication limits environmental losses, and higher EPU amplifies this beneficial effect.

Fig. 4
figure 4

Different marginal effects of economic complexity on environmental quality conditional on the economic policy uncertainty level Note: This figure represents the impact of economic complexity (at the 1%, 25%, 50%, 75%, and 99% percentiles) on environmental quality conditional on economic policy uncertainty based on the estimation results in Table 3, columns (2) and (6). The solid line plots the marginal effect of economic complexity on environmental quality conditional on the economic policy uncertainty level. The colored areas are the 90% confidence intervals

The second-generation Dumitrescu-Hurlin (2012) test is carried out to determine the causal relationships between the variables. Appendix Table 14 reports the results on a pairwise basis and can be summarized as follows. First, economic complexity, EPU, energy use, renewable energy, CO2 emissions, and the ecological footprint have bidirectional causal linkages. Likewise, EPU, energy intensity, and renewable energy have two-way effects. In contrast, the test reveals unidirectional causal linkages that run from economic complexity to energy intensity and from EPU to economic complexity.

Robustness test

This section conducts several tests to check the robustness of the baseline results. First, we use different proxies for the variables of interest. The dependent variable, environmental quality, is proxied by the ecological footprint of consumption and the biocapacity deficit. The regression results in Table 4 indicate that the environmental effects of energy use, renewable energy, and ECI on two environmental variables are similar to those in Table 3. Among the explanatory variables, we replace renewable energy consumption, the ECI index, and EPU with renewable electricity output (as a share of total electricity output), the improved ECI index, and the world uncertainty index, respectively. We then re-estimate Eq. (3) with both dependent variables, CO2 emissions, and the ecological footprint. The results in Table 5, show that the impacts of energy intensity, renewable energy, and ECI on the environment are conditional on the level of EPU.

Table 4 Robustness testing
Table 5 Robustness testing

Second, we calculate the threshold levels of ECI at which its impacts on different environmental variables (CO2 emissions, the ecological footprint of production, the ecological footprint of consumption, and biocapacity deficit) change from harmful to beneficial. Then, spline regressions are employed to permit different slopes associated with ECI when they reach these thresholds. Specifically, we allow the dummy variables, which equal one if ECI is higher than the threshold and zero otherwise, to interact with the ECI and EPU variables. The results (not reported here to conserve space, but available upon request) are similar to those obtained earlier.

Conclusion and policy implications

This study explores the environmental impacts of energy intensity, renewable energy, ECI, and EPU in the G7 countries over the period from 1997 to 2015. Because the cointegration tests confirm a long-run relationship between the variables, we apply FMOLS and fixed effects models with Driscoll–Kraay standard errors. Our findings show that energy intensity drives high levels of environmental degradation, whereas renewable energy consumption and EPU lead to a reduction in CO2 emissions and the ecological footprint. Moreover, a threshold exists, above which the impact of ECI on environmental quality changes from harmful to beneficial. We also find that EPU has moderating effects on the relationships between the variables of interest and environmental variables. Specifically, it magnifies the unintended environmental effects of energy intensity but extends the beneficial effects of renewable energy and ECI.

Our findings lead us to offer the governments of the G7 countries some policy recommendations. First, governments should implement policies that increase energy efficiency by sponsoring research into, developing (for companies), and adopting (for both companies and households) energy-saving technologies. Although the G7 countries are in the high-income group, the shift from high- to low-energy-intensive production still incurs huge costs, which are burdensome for economic actors. Thus, policy makers should consider a method for fair cost sharing between governments and economic actors.

Second, renewables can be an effective tool for reducing both CO2 emissions and the ecological footprint. Although the proportion of renewable energy in both production and consumption has increased in recent years, the G7 countries have a long history of high dependence on nonrenewable energy. Both attention and adequate resources are needed to support the ongoing shift from energy sources that are less environmentally friendly and nonrenewable to those that are cleaner and more sustainable, such as solar, wind, and hydropower. For example, governments should offer additional tax exemptions and implement a favorable feed-in tariff structure to increase incentives for companies producing renewable energy. Environmental awareness–raising programs (for households) and stricter requirements for a fixed proportion of renewable energy consumption (for manufacturers) should be adopted.

Third, the inverted U-shaped association between ECI and environmental quality suggests that the G7 governments need to support knowledge creation and diffusion. In other words, economies that are more sophisticated have the potential to stimulate the creation and application of environmentally friendly technologies. Tax exemptions or financial support should be given to companies that spend substantial sums on researching, developing, and adopting advanced production technologies. Moreover, governments should continue to implement strict environmental regulations and make efforts to protect the environment during the process of knowledge development. By encouraging the application of more efficient and cleaner production techniques and energy sources, the goal of better environmental quality can be achieved.

Fourth, not only does EPU directly reduce CO2 emissions and the ecological footprint but it also influences the environmental impacts of energy intensity, renewable energy, and the ECI. These two findings are statistically significant and contradict the results of most previous studies. Nevertheless, our findings are intuitive because in the long run, EPU intensely discourages both production and consumption activities by enterprises and households. Policy makers in the G7 countries are known for their transparency and predictability in forming economic policies. If they fail to maintain their credibility and predictability, the negative reactions from enterprises and households could lead to an economic contraction, which results in lower energy consumption. Although this finding looks like a double-edged sword for economic prosperity and environmental sustainability, the policy implications for sustainable development goals are straightforward. Governments must consider all the possible ways in which EPU and other factors responsible for emissions might have an impact on environmental quality. Specifically, they should focus on controlling EPU and, at the same time, encouraging the adoption of renewable energy, energy-efficient technologies, and the creation and transfer of knowledge.

Future examination on the impact of energy intensity, renewable energy, ECI, and EPU on environmental quality can be conducted in a specific country (to avoid heterogeneous cross-sectional characteristics), larger country groups (to achieve more generalizable conclusions), or over a longer time span. The generalizability is limited by the proxies used for environmental quality. Thus, the scope can also be extended to include other variables for environmental quality, such as sulfur dioxide, nitrogen oxide, greenhouse gas emissions, and water and soil pollution.