1 Introduction

World energy consumption increases with urbanization, industrialization, and developed human activities. However, energy resources are essential for economic growth and development (Ahmad et al., 2016; Ozturk & Acaravci, 2016; Wang et al., 2016). Fossil fuels are the most consumed energy, and these fuels are the leading cause of CO2 emissions. Higher fossil fuel consumption has higher greenhouse gas emissions, posing severe challenges to the world. On the other hand, the new and renewable energy sources are considered the clean alternative energy sources for the fossil fuels. Accordingly, the international community has put a lot of pressure on different countries to reduce greenhouse gas emissions.Footnote 1 Hence, the CO2-related environmental quality is an undeniable issue in energy-related policymaking across countries. In this regard, energy transition is a controversial issue to reduce fossil energy consumption and increase new and renewable energy use. Thus, focusing on energy transition helps to design more sustainable environmental practices.

On the other hand, two-thirds of highly educated immigrants are from developing countries. Although developing countries create more than 63% of carbon emissions, the impact of brain drain on environmental quality is not explicitly examined by researchers and policymakers. So, studying the effect of brain drain on the quality of CO2 emissions reduction can also provide exciting results. Consequently, this study investigates the impact of energy transition and brain drain on CO2 emissions that helps governments tackle global warming concerns by upgrading energy systems and easy access to new and renewable sources.

One of the main priorities of the international community after energy efficiency is energy transition to reduce the environmental consequences of carbon emissions (Koengkan & Fuinhas, 2020). Energy transition in different countries started in the 1970s. An energy transition program is proposed to increase energy security and reduce fossil fuel consumption and greenhouse gas emissions (Koengkan & Fuinhas, 2020). In 2020, as demand for other fuels decreases, renewable energy consumption was increased by about 3%. As a result, the share of renewable energy in total primary energy demand is determined at about 20% (IEA, 2021). New and renewable energy sources have a high potential to provide sustainable energy services and cover the world's energy demand. In addition, the opportunity cost of new and renewable energy systems is declining since oil prices are rising (Akella et al., 2009). These reasons have accelerated the new and renewable energy transition (Akella et al., 2009; Lorember et al., 2020; Sarkodie & Adams, 2018). In fact, by investing in new and renewable energy in addition to achieving economic growth while protecting the environment, communities can have many cost-effective applications for investors in this technology (Akella et al., 2009; Lorember et al., 2020).

Furthermore, higher investment in new and renewable energy sources is associated with higher potential diversification in energy supply sources (wind, solar, biomass, and so forth), which lowers environmental degradation and facilitates sustainable economic development. Since the share of new and renewable energy in total energy is expected to increase, a study on this issue is necessary. Moreover, it is found that higher educated workers in developing countries were more intended to migrate to high-income countries (Haque & Kim, 1995). The migration of skilled workers reduces the income and long-term growth rate of the countries of origin. This brain drain causes welfare losses for under-skilled people (Docqier & Iftikhar, 2019). Generally, brain drain affects the structure of urbanization, e.g., population and employment, and provokes inequalities in countries of origin (Ha et al., 2016; Docqier & Iftikhar, 2019). This process may influence the use of fossil fuels, switch to new and renewable energy sources, and environmental quality. Therefore, it is required to investigate the comprehensive effect of brain drain on \({\mathrm{CO}}_{2}\) emissions, especially from the left to the right tail of the emissions' conditional distribution.

Currently, the energy transition is increasing, and many countries are focused on deepening it (Koengkan & Fuinhas, 2020). However, there is no unified definition for the energy transition (Koengkan & Fuinhas, 2020; Smil, 2010) that can be used as a benchmark. In most recent studies, energy transition refers to switching from fossil fuels to a new renewable energy portfolio (Koengkan & Fuinhas, 2020). The energy transition is also considered using the ratio of the share of renewable energy sources with improved energy efficiency (Hauff et al., 2014). Thus, the energy transition is a fundamental and profound paradigm shift, and it does not just mean changing energy sources or simply replacing technology. Notably, the energy transition is a significant structural change in an energy system moving toward sustainability by increasing the integration of renewable energy in the energy mix. However, the energy transition process by a country depends on the quality of its gross domestic product (Alola & Joshua, 2020; Koengkan & Fuinhas, 2020). Hence, different countries should improve their existing energy systems toward new cost-effective systems, changing the structure of energy production and consumption (Alola & Joshua, 2020; Koengkan & Fuinhas, 2020; Koengkan et al., 2019b; Koengkan et al., 2020c; Murshed et al., 2021).

Numerous studies have examined the effect of new and renewable energy consumption on environmental quality and CO2 emissions (Asongu et al., 2019; Bilgili et al., 2016; Lorember et al., 2020; Sarkodie & Adams, 2018; Shafiei & Salim, 2014; Shirazi & Šimurina, 2022). Some concluded that new and renewable energy consumption reduces CO2 emissions and improves the quality of the environment (Bilgili et al., 2016; Lorember et al., 2020; Sarkodie & Adams, 2018). The second group of articles has examined the energy transition's effect on the environment's quality (Alola & Joshua, 2020; Koengkan & Fuinhas, 2020; Murshed et al., 2021). For example, Koengkan and Fuinhas (2020) considered the ratio of renewable energy to a representative of the renewable energy transition. They concluded that energy transition improves the quality of the environment in the Latin American Countries (LAC) region.

Researchers and governments have focused on brain drain since the early 1960s; meanwhile, skilled people's migration has tripled (Docquier, 2014). It is argued that brain drain, or more generally the outflow of human capital, harms the development of low-income countries. Indeed, countries of origin lose their human capital, a major driving force in stimulating economic growth and development (Docqier & Iftikhar, 2019). On the other hand, human capital is considered a key factor of production (Fang & Chang, 2016; Mankiw et al., 1992). Improving human capital helps reduce fossil fuel use and switch to new and renewable energy (Liu et al., 2022; Yang et al., 2017). Therefore, human capital causes carbon reduction by improving energy efficiency (Kwon, 2009; Yang et al., 2017). A human capital improvement is shown to mitigate energy intensity, increase energy security, and reduce environmental pollution (Pablo-Romero & Sánchez-Braza, 2015).

Furthermore, increasing human capital through education lowers carbon emissions and greenhouse gases in the long run (Bano et al., 2018). Besides energy enhancement, human capital enforces government laws and reduces crime. Accordingly, improving social conditions and the rule of law accelerates sustainable economic development (Kwon, 2009). Notably, Kazemian et al. (2020) concluded that migration has no considerable effect on environmental sustainability, but brain drain negatively affects environmental sustainability in ASEAN countries. They also argued that investing in human capital increases ecological sustainability. Accordingly, the nexus between brain drain and environmental quality can be non-monotonic.

Therefore, policymakers and governments should look for ways to reduce fossil fuels consumption in an attempt to lower CO2 emissions and their consequences, such as rising temperatures, changing rainfall patterns, severe climate change, severe floods, and hurricanes (Khan et al., 2014; Koengkan & Fuinhas, 2020). Accordingly, this study contributes to previous studies by the following questions:

  1. 1.

    Does energy transition improve the quality of the environment CO2 emissions reduction?

  2. 2.

    Does brain drain affect CO2 -related environmental quality in the countries of origin?

Specifically, to fill in the knowledge gap in the field of environmental quality, this study contributes to the literature by assessing the relationships between energy transition, brain drain, and CO2 emissions as follows:

First, in this study, the ratio of new and renewable energy to non-renewable energy has been used as a proxy for the energy transition. This hypothesis is only mentioned in a limited number of studies (Fuinhas et al., 2019; Koengkan & Fuinhas, 2020). Second, although the impact of human capital on the quality of the environment has been studied, the effect of brain drain on the CO2-related environmental quality has received very little attention. Third, in different studies, the impacts of the energy transition on the CO2-related environmental quality through other countries and approaches (Apergis & Payne, 2014; D'Alessandro et al., 2010; Fuinhas et al., 2021; Khan et al., 2021; Koengkan et al., 2018; Murshed et al., 2021; Onifade et al., 2021; Sadorsky, 2009). Fourth, in this study, the club convergence method has been used to identify countries with similar behavior of CO2 emissions among 75 countries. Then, using a panel quantile regression model, the effect of energy transfer and brain drain as the significant determinants and total economic openness, GDP, energy efficiency, and urbanization as the control variables on CO2 emissions are analyzed. Notably, it is the first study to examine the impact of energy transition and brain drain on CO2 emissions to the best of our knowledge.

The findings indicate that (1) the higher the energy transition, the lower the CO2 emissions are intensified as the quantiles level up, and (2) except for the 75th level, the higher the brain drain, the greater the CO2 emissions—mainly in quantiles 10th and 25th. Policies limiting the brain drain in countries with low CO2 emissions and accelerating the energy transition in countries with high CO2 emissions are advised. The results also help policymakers adopt appropriate energy policies for CO2 emissions reduction by providing infrastructure for investment in new and renewable energy technologies.

The article is organized as follows: Sect. 2 reviews the existing literature. Section 3 provides data, model specification, and methodology. Section 4 reports the empirical results. Finally, Sect. 5 discusses the results, and Sect. 6 presents the conclusions and policy implications.

2 Literature review

Previous studies have analyzed the effect of energy consumption and energy transition on environmental quality. However, most studies have addressed the effects of renewable energy. There are two different approaches. Some researchers believe that the use of renewable energy increases environmental quality (e.g., Fuinhas et al., 2021; Khan et al. 2021; Koengkan & Fuinhas, 2020; Ozcan and Ulucak 2021; Haldar and Sethi 2021; Fuinhas et al., 2017; Bilgili et al., 2016; Shafiei & Salim, 2014; Akella et al., 2009). Other authors argue that energy transition causes environmental degradation (e.g., Apergis & Payne, 2014; Koengkan et al., 2018; Sadorsky, 2009).

For example, Fuinhas et al. (2021), in a survey of Latin American and Caribbean countries from 1990 to 2014, examined the energy transition's effects on environmental quality. The authors found that energy transition has an asymmetric and positive impact on environmental quality in the short and long term. Koengkan and Fuinhas (2020) used the ratio of renewable energy as a proxy for energy transfer in a study of 10 Latin American countries. The authors state that energy transition in the short and long term has a negative effect on CO2 emissions. Khan et al. (2021) investigated the impact of the energy transition on the ecological footprint in OECD countries. The authors found that energy transfer reduces the ecological footprint. In a study for India, Ozcan and Ulucak (2021) explained the relationship between nuclear energy and environmental quality. The authors found that the further use of nuclear energy contributes to environmental quality. Haldar and Sethi (2021), in a study of 39 developing countries, stated that institutional quality is the reason for reducing CO2 emissions from renewable energy consumption. In another study of 10 Latin American countries, Fuinhas et al. (2017) have different opinions. The authors argued that the reduction in CO2 emissions is due to renewable energy policies. Other authors share this same vision (e.g., Akella et al., 2009; Bilgili et al., 2016; Shafiei & Salim, 2014).

Some authors have different opinions. For example, Koengkan et al. (2018), in a study of 7 South American countries, indicated that hydropower consumption increases CO2 emissions mainly in the early years. However, in a study of seven Central American countries, Apergis and Payne (2014) stated that some legal and institutional barriers contribute to the positive impact of renewable energy consumption on environmental degradation. As Sadorski (2009) states, the lack of financial incentives does not encourage renewable energy technologies and thus has a negative impact on the environment.

The effect of brain drain on environmental quality has not been studied so far. Furthermore, the brain drain means the departure of educated human capital from the country. Therefore, this study examines the most closely related issues, such as the relationship between human capital and the environment (e.g., Liu et al., 2022; Hao et al., 2021; Zhang et al., 2021; Ahmed et al., 2021; Nathaniel et al., 2021; Pata & Caglar, 2021; Ahmed & Wang, 2019; Lai et al., 2021; Li et al., 2020; Kazemian et al., 2020; Levine et al., 2020).

Liu et al. (2022) evaluated the effect of educational costs and human capital on the environmental quality in the BRICS countries. The authors found that a positive change in education costs leads to clean energy and thus improves the environmental quality. In contrast, the low education costs have the opposite effect. Hao et al. (2021) examined the role of human capital on CO2 emissions in G7 countries from 1991 to 2017. The authors found that human capital reduces CO2 emissions. Zhang et al. (2021) explained the impact of human capital on the environment in Pakistan from 1985 to 2018. The authors found that human capital increases CO2 emissions and ecological footprints in the short run, while in the long term, it reduces CO2 emissions but increases ecological footprints. Ahmed et al. (2021). In a study for the Latin American and Caribbean region from 1995 to 2017, found that, unlike most previous studies, human capital causes environmental degradation. Finally, Nathaniel et al. (2021) evaluated the relationship between human capital and ecological footprint in the BRICS countries. The authors find that human capital is not currently at the desirable level to reduce the ecological footprint.

Pata and Caglar (2021) examined the Chinese EKC hypothesis from 1980 to 2016. The authors found this hypothesis invalid in China, and human capital is vital in reducing the ecological footprint. Ganda (2021) explained the relationship between the environment and human capital in the BRICS countries (Brazil, Russian Federation, India, China, and South Africa) from 1990 to 2017. The results showed that human capital improves environmental quality in the short and long term. Ahmed and Wang (2019), in a study for India from 1971 to 2014, also found that human capital reduces the ecological footprint. Lai et al. (2021) explored the effects of air pollution on talent migration in China. The authors found that a 10-point increase in PM2.5 emissions increased the likelihood of college graduates migrating from their current city by 10 percent. Li et al. (2020) found that environmental pollution could increase the income gap and exacerbate the brain drain caused by environmental pollution. Finally, Kazemian et al. (2020) investigated the effects of migration and brain drain on ecological sustainability in the Association of Southeast Asian Nations (ASEAN) countries. The authors found that brain drain negatively affected environmental sustainability, while migration had a negligible effect.

The literature above shows that the drives for CO2 emissions or environmental degradation are widely explored. However, the effect of brain drain on ecological degradation is not examined, that is, exists a gap that needs to be explored. Moreover, no investigations have used club convergence and panel quantile regression to investigate the heterogeneous effects of variables and identify the possible drives for environmental degradation. This issue is another gap in the literature that needs to be investigated. Therefore, this investigation has an objective beyond the mentioned above to fill these literature gaps. The following section gives the data/variables and methods used in this research.

3 Data and method

This section consists of two subsections: the first subsection contains database/variables, and the second subsection includes of research method.

3.1 Data

This section contains the data/variables of this research. This study uses annual data of dependent and explanatory variables collected from 2006 to 2020 for a panel group of 75 countries. The reason for using this period and group of countries is the time series availability for all variables of the econometric model, especially for the variable brain drain. Another reason is that the panel quantile regression requires panel data to be highly balanced. Moreover, all variables are already used in the natural logarithm form to remove potential serial correlation effects. The following (Table 1) merely indicates the variables and their databases.

Table 1 Variable acronyms, definitions, and sources

The variables used in this research are described as follows:

  • Dependent Variable

  • CO2 emission per capita (CO2). The time series data for CO2 emissions per capita, in kilotons, are retrieved from the British Petroleum (2021). The values are generated from the source and sector-based-fossil fuel consumption.

  • Major Determinants:

  • Energy transition (TRANS). The energy transition is the ratio of new and renewable energy consumption, e.g., wave, wind, solar, photovoltaic, hydropower, biomass, and waste, in kWh, to the non-renewable energy consumption in kWh. The data on new and renewable energy sources and non-renewables are collected from British Petroleum (2021).

  • Brain drain (BD). Brain drain, which relates to the structure of urbanization, e.g., population and employment, and provokes inequalities in countries of origin, is gathered from the Fragile States Index (2021).

  • Control Variables

  • Trade openness (TO). Trade openness is calculated as the value of a country's trade flow, i.e., the sum of imports and exports, divided by the country's gross domestic product and selected from the World Bank (2021).

  • Gross domestic product (GDP) based on constant 2010$ (USD). The data of GDP are retrieved from the World Bank (2021).

  • Energy efficiency (EF). Energy efficiency, which corresponds to using fewer energy resources to produce a similar result or fulfill the same task, is taken from the World Bank (2021).

  • Urbanization (% total population) (URB). The urbanization index is defined by national statistical offices, which refers to the people living in urban areas obtained from the World Bank (2021).

The disparities among the variables used in this research are controlled as the per capita values of CO2, TRANS, and GDP are utilized. Specifically, this per capita transformation allows us controlling for in the population growth over the time period and within the countries (Koengkan et al., 2018; Koengkan et al., 2020b; Santiago et al., 2020; Koengkan et al., 2020b; Koengkan & Fuinhas, 2020). Further details include statistical specifications of the variables, provided in the results and discussion section. Because in this research, we first select the converging countries from among 75 countries using the club convergence method, and then, we analyze those countries utilizing the quantile panel regression method. For this purpose, after determining that group of converging countries, we examine the characteristics of the variables and the tests related to those countries.

3.2 Model specification

This study empirically examines that \({\mathrm{CO}}_{2}\) emissions are a function of the energy transition, brain drain, and other control variables, e.g., trade openness, gross domestic product, energy efficiency, and urbanization. The econometric theory states that model variables must be logarithmic to eliminate possible heterogeneity phenomena. Therefore, it is logarithmized, and our model follows Eq. (1) as follows:

$${\mathrm{LCO}2}_{\mathrm{it}}=La+{\beta }_{1}{LTO}_{\mathrm{it}}+{\beta }_{2}{\mathrm{LGDP}}_{\mathrm{it}}+{\beta }_{3}{\mathrm{LBD}}_{\mathrm{it}}+{\beta }_{4}{\mathrm{LEF}}_{\mathrm{IT}}+{\beta }_{5}{\mathrm{LURB}}_{\mathrm{it}},+{\beta }_{6}{\mathrm{LTRNAS}}_{\mathrm{it}}+{\delta }_{it ,}$$
(1)

where CO2 represents CO2 emission per capita, TO is trade openness, GDP is gross domestic product per capita (constant = 2010), BD denotes brain drain, EF indicates energy efficiency, URB is Urbanization, and TRANS is energy transition.

Our model applies these variables based on a logical explanation (Koengkan & Fuinhas, 2020). Even though some important progress has been achieved in the decoupling process of CO2 emissions from the GDP growth, greenhouse gas (GHG) emissions have risen since CO2 emissions are still increasing in many countries (OECD Environment Directorate, 2008). Therefore, the increased impact of GHG concentrations on environmental quality has consequences for socio-economic activities, e.g., human settlements, agriculture, and ecosystems (UNEP 2001). Accordingly, CO2 emissions can be a good indicator of environmental performance as they considerably contribute to the greenhouse effects (OECD Environment Directorate, 2008). Also, energy consumption is widely mentioned as the major contributor to CO2 emissions (Hollanda et al., 2016). This study uses CO2 emissions as the dependent variable based on this justification.

Moreover, the overall increasing trend of the global new and renewable energy consumption implies the energy transition process (Hauff et al., 2014). Hence, the ratio of new and renewable energy consumption to fossil fuel consumption is considered in this investigation to identify the impact of the energy transition on environmental quality. This ratio indicates the substitution progression of the new and renewable energy consumption instead of the fossil fuels consumption over time. For this reason, TRANS is applied as a major explanatory variable in this work (Koengkan & Fuinhas, 2020; Koengkan et al., 2019a). Furthermore, declining human capital due to brain drain increases the use of fossil fuels and postpones switching to new and renewable energy sources. Therefore, human capital outflow increases CO2 emissions by lowering energy efficiency (Kwon, 2009; Yang et al., 2017). It is also found that human capital outflow rises energy intensity, decreases energy security, and increases environmental pollution (Pablo-Romero & Sánchez-Braza, 2015). Accordingly, declining human capital through brain drain could lead to more CO2 emissions and greenhouse gases (Bano et al., 2018). This issue is the note to justify using brain drain as this research's other major explanatory variable.

Regarding control variables, this investigation utilizes the GDP as an explanatory variable since economic growth increases CO2 emissions while reducing natural resources in the countries and contributes to the increase in their living standards (Mardani et al., 2019). As the other key control factor defining the energy systems dynamics (Samargandi, 2019), energy efficiency (EF) is characterized by various determinants based on the structural features of the energy systems (Filipović et al., 2015). The concept of EF covers a range of aspects regarding the energy security of the energy systems (Ang, 2006). Notably, energy efficiency refers to energy conservation and production costs and provides information on cleaner technologies and energy system decarbonization (Laverde-Rojas et al., 2021). Therefore, it is important to investigate the impact of EF on CO2 emissions due to a potential interaction between source- and sector-based energy consumption (Huang et al., 2018), economic competitiveness, technological innovation, and energy policies (International Energy Agency, 2009). Also, trade openness is used in this study as an explanatory variable because several global economic reforms, including trade liberalization, have increased the countries' GDP per capita. This relationship has subsequently influenced the investment, energy consumption, and CO2 emissions in most countries under consideration (Koengkan & Fuinhas, 2020). Beyond the trade openness, the process of urbanization also has a potential role in lowering the environmental quality. Between 1975 and 2007, the rate of urbanization grew 0.78%, while it is expected to rise 0.36% from 2007 to 2025. The quick urbanization growth mainly relates to the issue of the industrialization process affected by trade liberalization and new agricultural technologies, which led to a new form of rural economies and economic development. Indeed, urbanization could be related to energy consumption, economic development, and higher CO2 emissions (Ali et al., 2021; Koengkan & Fuinhas, 2020). Therefore, the effect of urbanization on CO2 emissions receives considerable attention in this study.

3.3 Methodological approach

Two methodologies have been used in this research. In subsection 3.3.1, the club convergence is applied, and in subsection 3.3.2, the quantile panel regression is used.

3.3.1 Club convergence

In this study, the nonlinear time-varying factor convergence club model proposed by Phillips and Sul (2007, 2009) is used to study the convergence between countries. This approach examines the convergence between countries over time. The relative advantage of this method is that it does not rely on any assumptions about the fix of variables, such as random convergence tests (Apergis et al., 2012; Payne & Apergis, 2020). In particular, the Phillips and Sul (2007, 2009) approach uses a time-varying common component defined as follows (Eq. 2):

$${\mathrm{CO}2}_{\mathrm{it}}={\delta }_{it}{\mu }_{t,}$$
(2)

where CO2 indicates the carbon dioxide emission per capita in country i at time t. \({\mu }_{t}\) is a permanent component, and \({\delta }_{it}\) is an idiosyncratic component and time-varying. The \({\delta }_{it}\) component measures the deviation between \({CO2}_{it}\) and the common component \({\mu }_{t}\). Since \({\delta }_{it}\) is not directly estimated from Eq. (3) due to the over-parameterization, Philips and Sol () use the relative transfer parameter, hit, as follows (Eq. 3):

$${h}_{it}=\frac{{CO2}_{it}}{\frac{1}{N}\sum_{i=1}^{N}{ECI}_{it}}=\frac{{\delta }_{it}}{\frac{1}{N}\sum_{i=1}^{N}{\delta }_{it}}$$
(3)

where \({h}_{it}\) considers the relative transition path according to the panel average, and \({\delta }_{it}\) measures the average relative panel. Thus, the transition path for CO2 emission per capita in country i is relative to the panel average. When \({\delta }_{it}\) converges to the constant δ, then the relative transition path for country i, \({h}_{it}\) converges to 1 (t → ∞), as follows (Eq. 4):

$${H}_{t}=\frac{1}{N}\sum_{i=1}^{N}{({h}_{it}-1)}^{2}\to 0$$
(4)

Formal econometric tests such as convergence club require the assumption of a semi-parametric form of the time-varying \({\delta }_{it}\) as follows (Eq. 5):

$${\delta }_{it}={\delta }_{i}+\frac{{\sigma }_{i}{\xi }_{it}}{L(t){t}^{\propto }} ,$$
(5)

where \({\delta }_{i}\) is constant; \({\xi }_{it}\)~ iid (0,1) is varies in countries i = 1, 2, …, N; \({\sigma }_{i}\) is a specific scale parameter; L(t) is a slowly varying function, and when t → ∞, L (t) is infinitely divergent; ∝ show convergence speed. Equation 5 shows that \({\delta }_{it}\) converges to \({\delta }_{i}\) when ∝  ≥ 0. Hence, the null convergence hypothesis is as follows (Eq. 6):

$$\left\{\begin{array}{c}{H}_{0}: {\delta }_{i}=\delta \propto \ge 0\\ { H}_{A}: {\delta }_{i}\ne \delta \propto <0\end{array}\right.$$
(6)

Phillips and Sul (2007, 2009) state that log t regression can be used to test convergence, and the clustering algorithm can be used to identify convergence clubs as follows (Eq. 7):

$$\mathrm{log}\left(\frac{{H}_{1}}{{H}_{2}}\right)-2\mathrm{log}L\left(t\right)=\widehat{a}+\widehat{b}\mathrm{log}t+{\varepsilon }_{t}$$
(7)

For t = rT, rT + 1, …, T where r > 0 is set in the range (0.2, 0.3). For \(\widehat{b}=2a\), the null hypothesis for the one-way test considers \(\widehat{b}\ge 0\) versus \(\widehat{b}<0\). The t test statistic follows the standard normal distribution asymptotically and is constructed using a standard error consistent with heteroscedasticity and autocorrelation. Phillips and Sol (2007) call the one-way t test based on \({t}_{b}\), the “log t test” in Eq. (7).

Phillips and Sul (2007, 2009) use the club convergence method to identify convergence groups as follows:

  1. 1.

    Sort countries by the value of the last period of the time series. For example, in CO2 emissions per capita for the countries concerned, we arrange the countries in descending order.

  2. 2.

    Select the first k of the highest countries for 2 < k < N, estimate the regression Eq. (7), and calculate the \({t}_{k}\) convergence test statistic for this subgroup. The criterion for choosing the size of the main group \({k}^{*}\) is that \({k}^{*}={argmax}_{k}\{{t}_{k}\}\) for \(\mathrm{min}\left\{{t}_{k}\right\}>-1.65\) for k = 2, 3, …, N.

  3. 3.

    Add one country to the core club each time from the remaining countries, recalculate Eq. (7), and test convergence with the log t test.

  4. 4.

    Repeat the above steps for the remaining countries (if any) until other clubs do not converge. Finally, countries whose convergence is not confirmed are considered non-convergent.

3.3.2 Panel quantile regression

Quantile regression by Koenker and Bassett (1978) for data with non-normally distributed was introduced in 1978. Quantile regression identifies the model's dependent variable distribution pattern at different independent variable levels. This issue is done by fitting multiple regression patterns on a data set for different quantiles. Quantile regression has an advantage over ordinary regression. Quantile regression provides a model that allows independent variables to be included in all parts of the distribution (center of gravity, beginning and end sequences) by fitting multiple regression patterns to a data set for different quantiles. However, ordinary regression in estimating coefficients faces many limitations of assumptions (Koenker, 2004).

Therefore, this research applies the quantile panel regression method to evaluate the effect of energy transition and brain drain on environmental quality. The mathematical formula of the quantile regression model is as follows in Eq. (8):

$$\begin{aligned} &{y}_{i}={x}_{i}{b}_{\theta i}+{\mu }_{\theta i}. 0<\theta <1\\ &{Quant}_{i\theta }({y}_{i}/{x}_{i})={x}_{i}{\beta }_{\theta }\end{aligned}$$
(8)

where x and y represent the vector of independent variables and the dependent variable, respectively; μ is a random error whose conditional quantile distribution is zero; \({Quant}_{i\theta }({y}_{i}/{x}_{i})\) is the \(\theta \mathrm{th}\) quantile of the explanatory variable; the βθ estimate shows the quantile regression θth and solves Eq. (9):

$$\mathrm{min}{\sum }_{yi\ge {x}_{i}^{{\prime}}\beta }\theta |{y}_{t}-{x}_{i}^{{\prime}}\beta |+\sum_{yi<{x}_{i}^{{\prime}}\beta }\left(1-\theta \right)|{y}_{t}-{x}_{i}^{{\prime}}\beta |$$
(9)

As θ is equal to different values, different parameter estimations are obtained. The mean regression is a particular case of quantile regression under θ = 0.5 (Xu & Lin, 2018).

Given that this study uses panel quantile regression to measure carbon dioxide emission (CO2), Eq. (1) is converted and then presented in Eq. (10):

$$\begin{aligned}{Q}_{\tau }\left({\mathrm{CO}2}_{\mathrm{it}}\right)&=({La)}_{\tau }+{\beta }_{1\tau }{\mathrm{LTO}}_{i\tau }+{\beta }_{2\tau }{\mathrm{LGDP}}_{i\tau }+{\beta }_{3\tau }{\mathrm{LBD}}_{i\tau }+{\beta }_{4\tau }{\mathrm{LEF}}_{i\tau }+{\beta }_{5}L{\mathrm{URB}}_{\mathrm{it}} \\ &{\beta }_{6\tau }{\mathrm{LTRANS}}_{i\tau }+{\delta }_{i\tau }\end{aligned}$$
(10)

In this regard, \({Q}_{r}\) means the estimation of the quantile regression \(\tau \mathrm{th}\) in the CO2 emission per capita and \({(la)}_{r}\) is the constant component. The coefficients \({\beta }_{1\tau }.{\beta }_{2\tau }.{\beta }_{3\tau }.{\beta }_{4\tau }.\) are the quantile regression parameters and show the influencing factors.

4 Empirical results

This section includes three subsections: Sect. 4.1 has Club Convergence Results, Sect. 4.2 indicates Preliminary Tests, and Sect. 4.3 shows Quantile Panel Regression Results.

4.1 Club convergence results

In this section, the results of club convergence are given in Table 2. As seen in panel A, given that \(({t}_{\widehat{b}}=-17.1019)\) and it is less than \(({t}_{\widehat{b}}<-1.651)\), the convergence results of the entire sample reject the convergence between all countries. However, the lack of convergence of all countries is not due to the non-convergence in subgroups. Preliminary results of subgroup convergence show that there are four subgroups. In panel B, we merge the subgroups. The merger results indicate that the club1 + 2 and club 2 + 3 clubs can be merged, but club 3 + 4 cannot be merged.

Table 2 Results of the CO2 emission per capita based on club convergence (75 countries)

In the last part of this table (panel C), the results of the final clubs after the merger are given. The results show the existence of three convergent final subgroups. In the following of this research, we selected the most numerous club, i.e., Club 3, with 49 countries (Algeria, Argentina, Austria, Azerbaijan, Bangladesh, Belarus, Brazil, Bulgaria, Chile, Colombia, Croatia, Cyprus, Czech Republic, Denmark, Ecuador, Egypt, Finland, France, Germany, Greece, Hungary, India, Indonesia, Iraq, Ireland, Israel, Italy, Latvia, Lithuania, Mexico, Morocco, New Zealand, Norway, Pakistan, Peru, Philippines, Portugal, Romania, Slovakia, Slovenia, South Africa, Spain, Sri Lanka, Sweden, Switzerland, Thailand, Ukraine, United Kingdom, Uzbekistan) for analysis.

4.2 Preliminary tests

After selecting the converging countries in the previous section, the data statistic specifications are given in Table 3. Then, for quantile panel regression, the precondition is the non-normal data distribution. For this purpose, we first examine the normality test of the data, and then multicollinearity and cross-sectional dependency are tested. Finally, we use panel unit root models to confirm the cross-sectional dependence. In the end, a cointegration test is performed to check for a long-term relationship between variables.

Table 3 provides statistical results for 49 converging countries (Club 3). These results include observations, mean, standard deviation, minimum and maximum.

When the data distribution is non-normal, OLS regression cannot accurately perform the estimates. In contrast, quantile panel regression provides a more robust estimate by estimating the initial, intermediate, and final values (Koenker & Xiao, 2002). For this purpose, the data normality is tested before quantile panel regression. This study used Shapiro–Wilk (Royston, 1992) and Shapiro-Francia (Royston, 1983) tests to examine the data normality. The results of Table 4 show that the probability values of the Shapiro–Wilk and Shapiro-Francia tests are significant for all variables at the 1% level. It means the variables have a non-normal distribution.

Table 3 Descriptive statistics

After ensuring the non-normal data distribution, we examine the multilinearity of the variables using the variance inflation factor (VIF) (Belsley et al., 2005). This test showed that the VIF values for all variables are less than the accepted standard of 10. The average VIF is 2.54, less than the accepted value of 6. The results indicate the absence of a harmful multilinearity (Table 5). Next, we will examine the cross-sectional panel dependency using the CSD test developed by Pesaran (2004). The null hypothesis in this test is the absence of cross-sectional dependence. According to the results (Table 5), the null hypothesis is rejected. This result means that there is a cross-sectional dependence on all model variables.

Table 4 Normal distribution test

After confirming the existence of cross-sectional dependence, in this section, the panel unit root test (CIPS) presented by Pesaran (2007) is used. The null hypothesis is the existence of a unit root in all series. The results show (see Table 6) that only the variables BD in lag one and EF in lag 0 at the level are stationary in the 1%, and the other variables are non-stationary at the levels. The variables LCO2, LTO, LGDP, LBD, LEF, LURB, and LTRANS in the first-order difference are stationary in lag 0, lag1, or both.

Table 5 VIF and CSD test

Given the stationary of the variables in the first differences, the cointegration tests are used to examine the existence of a long-run relationship between the variables (Al-Mulali & Ozturk, 2016; Wang et al., 2018). The Pedroni (1999) and Kao (1999) cointegration tests were used (Azam and Reza, 2016; Reza and Karim, 2016; Shah, 2016). The null hypothesis of both tests is the absence of cointegration. The results indicate (see Table 7) that the null hypothesis is rejected for both tests, and there is a long-run relationship between CO2 per capita and explanatory variables.

Table 6 Panel unit root test (CIPS)

4.3 Panel quantile regression results

This section uses quantile values of 10th, 25th, 50th, 75th, and 90th to estimate quantile panel regression. Before these estimates, the 49 countries were divided into six groups based on CO2 emission per capita (see Table 8).

Table 7 Kao and Pedroni cointegration test

Table 9 presents the results of estimating the fixed effects for the robustness of the model, along with the quantile panel regression results. Figure 1 shows the graphical results of quantile panel estimation. The results of the fixed effects estimation show that trade openness (LTO), LGDP, and brain drain (LBD) positively impact CO2 emissions per capita. At the same time, energy efficiency (LEF), urbanization (LURB), and energy transition (LTRANS) reduce environmental degradation. These results are in line with the results of quantile panel regression estimation.

Table 8 Country distribution of CO2 emission per capita
Fig. 1
figure 1

Quantile estimate: shaded areas are 95% confidence band for the quantile regression estimates. The vertical axis shows the elasticities of the explanatory variables, and the red horizontal lines depict the conventional 95% confidence intervals for the OLS coefficient

The results of Table 9 show that trade openness (TO) in quantiles 10th, 75th, and 90th has a positive and statistically significant effect on CO2 emissions. These results indicate that trade openness leads to environmental degradation. The destructive effects of trade openness on the environment first decrease, then increase, and finally decrease again. This outcome can be due to the transfer of advanced environmentally friendly technology at high levels of trade. Ibrahim and Ajide (2021) for the G7, Mahmood et al. (2019) for Tunisia, Mishra et al. (2020) for the United States, and Mutascu and Sokic (2020) for the EU confirmed the findings. Furthermore, economic growth (LGDP) at all levels of quantiles has had a positive and significant effect on CO2 emissions. As can be seen, these effects are more significant at low levels of economic growth. Generally, countries pay less attention to the environment in the early stages of economic growth. Findings of Kazemzadeh et al. (2022a), Kazemzadeh et al. (2022b) for emerging economies, Kazemzadeh et al. (2021) for 25 countries, Adams et al. (2020) for sub-Saharan Africa (SSA) are consistent with the research results. Finally, results show that brain drain (LBD) at all levels except 75th has positive and significant effects on CO2 emissions. This result indicates that migrating specialized human capital from the countries causes environmental degradation mainly in the 10th and 75th quantiles. Liu et al. (2022), Ganda (2021) for BRICS, Hao et al. (2021) for G7, Pata and Caglar (2021), and Ahmed and Wang (2019) for India have shown that human capital has positive effects on the environmental quality.

As expected, energy efficiency (LEF) at all quantile levels significantly affects CO2 emissions. The results show that increasing energy efficiency reduces environmental degradation, and the highest energy efficiency coefficient is related to quantile 90th. It means that ecological degradation is further reduced at the highest levels of energy efficiency. Salari et al. (2021) and Kazemzadeh et al. (2022b), in separate studies for emerging countries, stated that energy efficiency could help reduce environmental degradation. Urbanization results (LURB) show that only quantiles 10th and 25th have negative and significant effects on CO2 emissions, not significant in other quantile levels. As mentioned, increasing urbanization (LURB) reduces environmental degradation. Saeedi and Mubarak (2016), for nine Developed Countries, Adams et al. (2020), for Sub-Saharan Africa (SSA), and Fang et al.,(2020) for China stated in the long run that urbanization negatively impacts environmental quality. Energy transition (LTRANS) has negative and significant effects on CO2 emissions at all levels. As mentioned, energy transition is the ratio of renewable energy to non-renewable. The results show that increasing the use of renewable energy reduces environmental degradation (Fuinhas et al., 2021) in Latin American and Caribbean countries. Koengkan and Fuinhas (2020) for 10 Latin American countries and Khan et al. (2021) for OECD countries confirm for OECD countries that energy transition has a positive effect on environmental quality. Finally, the Dumitrescu–Hurlin (2012) panel causality test was applied to examine the causal relationship between the variables. Table 10 shows the results of this causality panel test.

Table 9 Estimation results from panel quantile regression model and panel fixed effects
Table 10 Pairwise Dumitrescu–Hurlin Panel causality test results

Given that the results of the Dumitrescu–Hurlin panel causality test in Table 10 are extensive, we examine the relationship between important variables in this section. First, the causality test results show unidirectional causality from brain drain (LBD) to CO2 emissions (LCO2). Trade openness (LTO) and energy efficiency (LEF) are bidirectionally related to CO2 emissions. On the other hand, urbanization (LURB) and economic growth (LGDP) are one-way causals of LCO2. Finally, the results confirm the two-way causal relationship between energy transition (LTRANS) and LCO2.

5 Discussion

At a glance, the results of this paper indicate that the CO2-related environmental quality of the selected countries increases when the energy efficiency, urbanization, and energy transition increase. In contrast, ecological degradation becomes greater in response to trade openness, GDP, and brain drain (Table 9).

Specifically, the CO2-related degradation of the clustered countries shows a U-shaped pattern in response to the increase in trade openness, from the beginning up to the 75th quantiles, and then starts to decrease, which shows that the environmental technology improvements take place at high levels of trade openness. In other words, trade openness intensifies the energy consumption needed for the economies to produce more commodities satisfying international purchases (Ghani, 2012; Sadorsky, 2011; Shahbaz et al., 2014). Therefore, more countries' reliance on fossil fuels in production leads to higher CO2 emissions per capita throughout the median quantiles of trade openness, consistent with Shahbaz et al. (2015). On the other hand, when the countries meet high levels of trade openness, fossil fuels are replaced with renewable energy sources, leading to higher environmental quality.

Moreover, the CO2 emissions per capita rise when the economies experience higher economic growth rates. It is a stylized fact that economic expansion leads to higher energy consumption, and therefore, more environmental concerns are expected (Gyamfi et al., 2018).

The negative impacts of different quantiles of energy efficiency on the environmental quality follow a U-shaped pattern during low and median quantiles. Then, a downward trend is found when achieving high quantiles of energy efficiency. This outcome is compatible with Sinani and Meyer (2004) and Lall (2002), finding that higher levels of energy efficiency led to lower energy consumption levels. Hence, it is concluded that CO2 emissions are reduced through developed technological transfer.

Furthermore, the findings indicate a mixture of positive and negative impacts of urbanization on the CO2 emissions in the selected club at different quantiles. It is noted that the positive effects of urbanization take place at median and high quantiles. To justify such relationships and consistent with Koengkan and Fuinhas (2020), we suggest that urbanization positively affects economic growth. Hence, and as mentioned before, more energy consumption and, therefore, more significant CO2-related degradation are expected due to higher economic growth rates.

This article studies the impacts of energy transition and brain drain on CO2 emissions. A downward trend is found between energy transition and CO2 emissions throughout entire quantiles following the results. Specifically, the CO2-related degradation is decreased at all quantiles of the ratio of renewable energy sources taken as a proxy for the renewable energy transition. Regarding this kind of relationship, Koengkan and Fuinhas (2020) argued that the ratio of renewable energy positively impacts the environmental quality in the short and long term. Furthermore, Fuinhas et al. (2017), Bilgili et al. (2016), Shafiei and Salim (2014), and Akella et al. (2009), among others, conclude that less environmental degradation is related to the efficiency of renewable energy policies that encourage the use of alternative energy sources in the energy mix.

Accordingly, the most probable explanation is that the energy transition reduces environmental degradation due to technical efficiency related to clean renewable sources and the replacement of renewable resources in the energy mix in the suggested countries (Koengkan et al., 2020a). Indeed, the cost of renewable energy systems is declining in response to the energy transition, and then, renewable energy has a high potential to provide sustainable energy services, which supports an increasing trend in renewable energy transition (Lorember et al., 2020; Sarkodie & Adams, 2018 and Akella et al., 2009). Therefore, investment in renewable energies causes economic diversification by increasing energy supply sources according to each specific place (e.g., wind, solar, biomass), which develops the environmental quality of the countries.

Finally, we find that brain drain leads to CO2-related degradation in countries of origin in terms of brain drain. Some literature (Ayanwale, 2007; Borensztein et al., 1998; Carkovic & Levine, 2005; Wang, 2009) supports that brain drain (human capital outflow) slows down infrastructural advancement, technological innovation, financial development, and industrialization improvements. Hence, increasing the outflow of highly educated human capital causes the flight of knowledge and technology from the countries. Thus, the renewable energy generation that requires high and new technology is reduced, and the replacement of renewable energy sources is delayed, which causes an increase in fossil fuel consumption. As a result, brain drain intensifies environmental degradation as energy efficiency deteriorates (Young et al., 2017; Cowan and Morgan (2009), increased energy intensity (Pablo Romero and Sanchez Braza, 2015), more crimes (Bano et al., 2018), and aversion to the law Cowan and Morgan (2009).

6 Conclusion and policy implications

The impacts of energy transition from fossil energy to renewable sources and the effect of brain drain on the CO2 emissions per capita were researched for a panel of seventy-five countries based on energy club convergence from 2006 to 2020. The econometric approach was carried out in two steps, beginning with the club convergence to identify the countries with similar energy transition behavior toward renewables sources. Then, it follows panel quantile regression to cope with the nonlinearities among variables of forty-nine countries sharing similar club convergence. The control variables include total economic openness, GDP, energy efficiency, and urbanization.

On the one hand, panel fixed effects estimation reveals that brain drain, trade openness, and economic growth increase CO2 emissions per capita. On the other hand, energy transition, energy efficiency, and urbanization reduce environmental degradation. The Dumitrescu–Hurlin panel causality test found unidirectional causality from brain drain to CO2 emissions. Bidirectional causality was found between trade openness, energy efficiency, energy transition, and CO2 emissions, and unidirectional causality between urbanization and economic growth to CO2 emissions. Panel quantile estimation reveals that (1) brain drain at all levels except 75th has positive and expressive effects on CO2 emissions—mainly in quantiles 10th and 25th—and evolving in a convex-shape form, (2) energy transition at all levels decreases CO2 emissions being this effect more intense as quantiles levels up, and evolving in a concave-shape form, (3) energy efficiency at all quantile levels has significant negative effects on CO2 emissions, (4) urbanization revealed that only quantiles 10th and 25th have negative and significant effects on CO2 emissions, (5) trade openness has a decreasing positive and statistically significant effect on CO2 emissions in quantiles 10th, 75th, and 90th, and (6) economic growth at all levels of quantiles has a positive and significant effect on CO2 emissions.

The research supports that CO2 emissions can be mitigated by acting on brain drain and reduced by deploying renewable energy sources, but this relationship is nonlinear. Thus, policies are advised to limit the brain drain in countries with low CO2 emissions and accelerate the energy transition in countries with high CO2 emissions. In addition, policies designed to increase energy efficiency also can play a significant role in mitigating environmental damage.

This research contributes to the literature twofold. First, the study contributes to the literature by finding that brain drain provokes environmental degradation, which is more pronounced when CO2 emissions per capita are low. Second, we built an analysis in two phases to assess the impact of brain drain and energy transition on CO2 emissions of countries with similar convergence patterns. Indeed, it has the novelty of using criteria to include the countries in the panel. This criterion selects the countries by identifying which are more homogeneous and thus reduces the noise caused by divergent countries in the panel. Therefore, this research also opens the door to exploring energy transition based on countries with similar convergence patterns.

Furthermore, sound economic and econometrics foundations identify which countries should be included in a panel. Indeed, some degree of countries' economic homogeneity could help identify the relationships' economic mechanisms. Thus, this research also contributes to filling a gap in panel analysis related to selecting an adequate composition of panels.

Indeed, it is necessary to develop initiatives to mitigate the CO2 emissions, such as (1) developing more fiscal and financial incentive policies to encourage the development of renewable energy technologies and the consumption of green energy sources, (2) accelerating the process of energy transition in order to reduce the dependence of fossil fuels of countries that produce this kind of energy source (e.g., Russia), (3) accelerate the process of transport sector electrification in order to mitigate the consumption of fossil fuels. However, this process needs to be based on green energy sources, (4) accelerate the introduction of green hydrogen in the transport sector, and (5) develop more policies to increase the energy efficiency of dwellings and buildings to mitigate energy consumption.

Finally, this investigation is a kick-off regarding the impact of energy transition and brain drain on environmental degradation and other aspects such as economic openness, energy efficiency, and urbanization. Therefore, this investigation is in the initial stages of maturation, which will supply a solid foundation for second-generation research regarding this topic.

6.1 Limitations of the study

This investigation is not free of limitations. Therefore, the main limitations of this study are: (1) the presence of a short period this study used the period between 2006 and 2020, and this short period was used due to the data available for all variables, especially the variable brain drains; (2) the inexistence of literature that approaches the brain drains on environmental degradation; and (3) the inexistence of data for several countries. This last problem does not allow us to extend the number of countries in our empirical study. The lack of this kind of literature makes difficult the elaboration of deeper discussions regarding the results found. These limitations are usual in an investigation in the early stages of maturation.