Introduction

Since the first oil crisis in 1973 and subsequent energy crises, questions regarding the reliance and accessibility on fossil fuels have been the core elements of energy policies of many countries (Hache 2018). Moreover, the ways that humans use energy for socio-economic activities have mistreated the environment that sustains them. The list of environmental problems surrounding the environment has increased significantly, including but not limited to climate change, pollution, over-exploitation, and so on (Shahzad et al. 2021; Wang et al. 2021). As a result, the recent commitments of achieving net-zero carbon emissions by 2050 and phasing out coal power generation by 2040 in COP 26 constitute an irreversible energy transformation towards renewable energy. Compared to fossil fuel-fired sources, renewable energy is clean and inexhaustible (Bourcet 2020; Wang and Zhang 2021). Specifically, renewables have substantially fewer emissions while generating more energy in their consumption over their lifetime (Njoh 2021). Furthermore, while solar and wind cannot generate energy 24 h a day, the energy they produce can be well-managed by advanced utilities and grid operators through operational practices, responsive loads, and modern energy infrastructures. Such transformation and advancement in renewable energy not only guarantee energy security and protect the environment but also shield the energy market from the negative impact of geopolitical tensions and brings about less, if any, political turmoil linked to the exploitation of traditional energy sources (Bamati and Raoofi 2020; Balsalobre-Lorente et al. 2018; Dogan et al. 2021). According to Cherp and Jewell (2011) and Valdés Lucas et al. (2016), renewable energy can contribute to energy security from three distinct perspectives, namely, sovereignty, robustness, and resilience. Regarding sovereignty, renewable energy is less susceptible to the use of energy as political weapons or physical attacks. Renewable energy can also mitigate the robustness threats because it needs some backup capacity with a lower risk of technical failure due to its fluctuating nature and decentralized model. Concerning the resilience perspective, renewable energy can resist unpredictable adjustments such as technological innovations, climate change, and energy market volatility.

In 2020, renewable energy represents roughly 12.54% of global energy consumption (BP 2022). The recent discovery and large-scale commercial production of renewable energy are predicted to help humans achieve three inter-related targets: fighting against climate change and protecting the environment, meeting the energy demand for advanced socio-economic transformation, and reaching energy independence by increasing the proportion of renewables in the energy mix (Hache 2018). Although the proportion of renewable energy consumption in 2020 has doubled from a minor proportion of 5.65% in 1973, the year of the first oil crisis, this figure still symbolizes a small share of renewables to the global energy mix. This less than expected development of renewables is accredited to many causes, mainly the substantial reserve and low producing costs of fossil fuels, the high investments and uncertain outcomes of renewable energy projects, the siting and transmission difficulties due to the decentralization model of renewable energy, the difficult market entry, and the unequal playing field in the energy industry (Ibrahiem and Hanafy 2021).

Given the growing importance of renewable energy, many studies have been conducted to investigate its determinants. The driving forces can be categorized into several classifications, e.g., political, institutional, regulatory, technological, economic, social, environmental, and energy factors, to name a few (Bourcet 2020). In addition, the existing literature examining the determinants of renewable energy varies in various aspects, including but not limited to renewable energy indicators, determinants, countries and regions, time coverage, econometric models, and estimation methods. This study intends to explore the roles of two potential determinants of renewables, which have not been researched thoroughly the existing literature, namely, energy security and economic complexity.

According to Gan et al. (2007) and Valdés Lucas et al. (2016), renewable energy is a strategic response to energy security threats. When facing higher risk in terms of energy security, a country inclines to develop and deploy renewable energy. There are several reasons explaining the possible impact of energy security risks on renewables. The first motivation comes from the unavailability of fossil energy reserves because they are scared and limited (e.g., production will decline in the future), and they are susceptible to geopolitical risks (e.g., wars or economic sanctions). When facing the risk of energy inaccessibility, a country should find alternative resources that are more sustainable and less vulnerable to supply disruption (Tongsopit et al. 2016). Renewable energy can act as an alternative energy resource because it can be produced within a country’s boundary (self-sufficiency), which compensates for the energy shortage in both short and long run. The environmental concern is another aspect that relates energy security to renewable energy. Given the harmful impacts of non-renewable energy sources on environmental health, such as coal-fired power plants and fossil fuel vehicles, the energy production process should depend more on cleaner energy sources. In fact, energy security and energy sustainability should be closely coupled by basing on the renewable energy development, which has much lower life cycle emissions of air pollutants (Bigerna et al. 2021; Narula and Reddy 2015). Last, having energy resources that meet the demand of economic agents at reasonable and stable prices contributes greatly to the socio-economic development of a society. The volatility implied in the price of fossil fuels and their high prices caused by many types of shocks improve the relative cost competitiveness of renewable energy. Furthermore, the renewable power plants that adopt capital-intensive technologies (with variable costs accounting for a less proportion of cost structure) do not tend to pass variable cost fluctuation to the consumer by rising electricity prices (Tietjen et al. 2016). Thus, when facing the volatile price energy market, a country tends to transform its energy structure towards renewables.

The impact of economic complexity on renewables is far more complicated. Economic complexity represents a country’s ability to produce sophisticated, or high value-added products, through its accumulated knowledge (Lall et al. 2006). This concept is built on the notion that diverse and exclusive capabilities are required to produce complex goods that cannot be replicated by other countries. Economic complexity can influence renewable energy through two main channels, e.g., the technology and scale effects. On the one hand, higher complexity may facilitate the development and deployment of renewable energy through the production input mix and technology improvement channel. It is the case that sophisticated knowledge is directed towards the research and development process for exploring and deploying renewable energy sources. On the other hand, it may dampen renewables through higher energy demand and energy-intensive economic structure (Chu 2021; Stern 2004). The scale effect plays its role when the production of sophisticated goods is energy-consuming, forcing the energy market to depend more on fossil fuels that can be exploited quickly at a low production cost. To a larger extent, an economy that develops complex but energy-intensive industries tends to subsidize the fossil fuel sector to meet the energy demand for economic growth (Fouquet 2016).

To achieve this objective, an advanced panel data analysis is implemented for the Group of Seven (hereafter G7) countries to measure the long-run impact of these factors on renewable energy production as well as the causal relationships among them. The selection of G7 countries is based on several reasons. First, G7 countries are considered major economic powers with a huge influence on the global environmental welfare. According to the World Development Indicators database, in 2020, G7 countries produce 45.8% of global gross domestic products, nearly twice the contribution of BRICS (Brazil, Russia, India, China, and South Africa) countries (24.4%). To support socio-economic development, G7 has been ranked as top global energy users and carbon emitters. The data from BP Statistical Review of World Energy (BP 2022) show that although its primary energy consumption has decreased from 172.8 exajoules in 2000 to 167.8 exajoules in 2010 and 152.0 exajoules in 2020, G7 still accounts for 27.3% of global primary energy consumption. In a similar vein, G7 is responsible for 23.1% of the 2020 global carbon emissions, a significant reduction from 40.9% in the year 2000. While the BRICS countries overtook G7 as the world’s biggest energy consumption and carbon emissions in 2010 and 2006, respectively, the changes in position mainly come from the difference in energy efficiency as G7 has an energy efficiency level well above BRICS (Camioto et al. 2016).

In terms of renewable energy consumption, G7 consumes 39.7% of global renewable energy in 2020, compared to 35.9% and 39.2% in the cases of BRICS and E7 countries, respectively (BP 2022). In terms of electricity generated from renewable energy, four out of seven G7 countries (Canada, Germany, Italy, and the United Kingdom) have a proportion of renewable energy production higher than the world average. Given the long history of renewable development in the G7 countries, research on renewable energy contributing factors in the context of the G7 has useful implications for other countries. Additionally, there are huge differences in renewable energy development in G7 countries. Figure 1 reveals that renewable energy production (per capita) in G7 countries has increased significantly since the 2000s but stood at different levels in 2017. Specifically, Germany had the highest level of renewable energy production per capita (0.0214 tera joule) whereas the second and third place countries, the United Kingdom and the USA, were significantly lower (0.0127 and 0.0116 tera joule). The per capita renewable energy production of France was the lowest (0.0059 tera joule). However, these rankings changed considerably compared to that in 2000, where Canada and the USA had the highest levels of renewable energy production (0.0030 and 0.00258 tera joule), followed by Japan (0.0013 tera joule). The motivations behind these three trends, energy consumption, carbon emissions, and renewable energy production, are potential for conducting empirical research.

Fig. 1
figure 1

Renewable energy production. Note: Authors’ own calculation based on BP Statistical Review’s data. Renewable energy production per capita (tera joule)

Second, while G7 economies depend largely on energy to grow, most of them, except for Canada, are energy import countries. The World Bank’s World Development Indicators database reports that each year, Japan, Italy, and Germany import around 90%, 80%, and 60%, respectively, of their energy use (World Bank 2022). France and the United Kingdom rely less on energy import but the fraction of import in total energy use is approximately from 40 to 45%. Such reliance on energy imports and high dependence on fossil fuels, especially oil and gas, makes their socio-economic activities highly vulnerable to the energy price fluctuation and geopolitical tensions related to energy. The left-hand side of Fig. 2 indicates that the energy insecurity (measured by the energy security risk index) of G7 countries has increased considerably since the twenty-first century, which is corresponding to the significant development of renewable energy. The recent Russia-Ukraine conflict, which results in an unprecedented global energy crisis, has been pushing the ongoing transition to renewable energy technologies in developed countries like G7 and many European countries (Sattich et al. 2022). For example, a combination of government-led auctions and distributed solar photovoltaic incentives accelerate solar projects in France and Germany, while the favorable long-term tax incentive extensions have been discussed by the House of Representatives and Senate in the USA.

Fig. 2
figure 2

Energy security risk index and economic complexity index. Note: Authors’ own calculation based on the data from the Global Energy Institute and the Atlas of Economic Complexity

Third, it is evident that transforming the energy mix towards renewable sources requires advanced technologies to be developed and commercialized on a large scale. G7 countries are embodied as highly productive economies in terms of sophisticated knowledge. In the 2019 economic complexity ranking in the Atlas of Economic Complexity, Japan, Germany, and the USA ranked in the top 10, while the United Kingdom, France, and Italy stood in the top 20, while Canada stood in the top 30. In contrast, other emerging countries such as BRICS countries were at lower positions, e.g., China 28th, India 41st, Russia 44th, Brazil 47th, and South Africa 52nd. The big difference in the economic complexity index reflects the gap between developed and emerging economies in respect of economic sophistication level. Although G7 countries are placed at the top in terms of economic complexity, their indices decreased sustainably from 2000 to 2015 before recovering in recent years (the right-hand side of Fig. 2). Overall, the movements of energy insecurity and economic complexity as well their potential effects on renewable energy are the main motivations for this study.

The current study differs from previous research in two key ways. It starts by taking into account how economic complexity and energy security affect the growth of renewable energy sources. Because energy security is a multi-dimensional concept with a variety of definitions, measuring it is not an easy task, which may lead to insignificant results in the existing studies (Valdés Lucas et al. 2016). One of the main reasons for such an insignificant relationship is the use of inappropriate proxy, e.g., the import dependence ratio which ignores other aspects of energy security such as energy expenditure or environmental welfare. In this study, we utilize the energy security risk index, which is created by the Global Energy Institute. Compared to other methods that quantify energy security, the method of Global Energy Institute takes the initiative in its breadth, depth, geographic coverage, and completeness. By using this index, we do not have to rely on single-dimension indicators, like energy import as a share of total energy, which does not fully capture the risk of energy security (Ibrahiem and Hanafy 2021) or a broad range of indicators (Le and Nguyen 2019; Valdés Lucas et al. 2016; Tongsopit et al. 2016), which may cause multi-collinearity in the econometric model. In terms of policy perspective, the use of the energy security risk index avoids the suggestion of strategies that reduce energy import dependence by supporting domestic coal-fired power plants while endorsing incentives for renewable electricity and environmental protection.

Similarly, the economic complexity index approach derives information about a nation’s innovative competencies and industrial structure by making relative comparisons across country export baskets. This index is associated with the structural economic revolution, reflecting an economy’s achievements in skills, knowledge, and technological capabilities in the production process. Compared to other proxies for productive capabilities such as human development, research and development expenditure, industry, and services value-added, the economic complexity index is considered a more comprehensive indicator, which has been proved to have significant links with energy and environment sectors (Chu 2021; Li et al. 2021; Rafique et al. 2021; Zheng et al. 2021). However, there is no agreement in the literature on whether economic complexity is a driver (Rafique et al. 2021) or a barrier (Alvarado et al. 2021). Therefore, this study introduces both the energy security risk index and economic sophistication index in the model of renewable energy determinants in G7 countries to extend the research agenda on renewable deployment. Given the fact that many developed countries are building a knowledge economy and reinforcing economic resilience, considering the importance and benefits of sophisticated knowledge to both energy transformation and sustainability of the environment is necessary for policy formulation.

Although there are several papers exploring the determinants of renewables in G7 countries, e.g., policy uncertainty (Borozan 2022; Khan and Su 2022), fiscal and monetary policy fluctuation (Sun et al. 2022), carbon emissions and oil prices (Sadorsky 2009a), and economic complexity (Rafique et al. 2021), there has been no study examining the impact of both economic complexity and energy insecurity on renewables in G7 countries. In addition, the ongoing conflict in Ukraine has threatened the global supply of energy and led to the considerable rise in energy prices across the world. The economic growth and wellbeing in G7 countries have suffered severely from energy market turmoil, especially those depending on energy import from Russia. This energy crisis has delivered a shock of unprecedented breadth and complexity for both energy producers and consumers, making the energy market become extremely vulnerable. Overall, such growing shortage and high prices underscore the continuing importance of energy security alongside the environmental targets when addressing the energy trilemma (Thaler and Hofmann 2022). Understanding how economic complexity and energy insecurity affect the generation of renewable energy is particularly interesting given the significant role that the G7 plays in the global economy and energy market. The findings are, therefore, beneficial for suggesting appropriate strategies associated with renewable energy, energy security, and economic complexity in G7 countries.

Powell’s (2022) advanced quantile regression method is used in this study to assess how energy security and economic complexity affect the development of renewable energy. While conditional mean methods deliver estimated outcomes based on the mean value, panel quantile regression provides a comprehensive and insightful picture of the impact of driving factors across the dependent variable’s distribution. Given the diverse levels of renewables in the G7, this statistical preeminence allows us to find out whether energy security, economic complexity, and other determinants have different effects between nations with the low, middle, and high renewable levels. In addition, the panel quantile regression also deals effectively with the statistical problems caused by the presence of outliers and non-normality distribution of residuals in our panel dataset.

The rest of the study consists of four additional sections. The “Literature review” section reviews the literature on the determinants of renewable energy. The “Model specification, data, and econometric techniques” section describes the model, data, and methodological strategy. The “Empirical results and discussion” section reports the results and discusses the findings. The “Conclusion and policy implications” section concludes and advises policy implications.

Literature review

The determinants of renewable energy have been studied for various countries, country groups, and regions by applying different econometric methods to diverse variables and periods. The existing literature often emphasizes the role of macro-economic, environmental, and political such as real income, economic growth, trade openness, oil price, institutional quality, government policies, and carbon emissions in determining renewable energy development and deployment. However, such connected papers do not reach any agreement on the direction and the size of the relationship.

Most studies utilize panel datasets to examine the impact of macro-economic and environmental variables on renewable energy. In one of the earliest studies, Sadorsky (2009b) examines the influence of income per capita, carbon emissions, oil price, and population on renewable energy consumption in G7 countries. The outcomes obtained from a panel dataset from 1980 to 2005 indicate that increases in real GDP and carbon emissions per capita are important drivers behind the change in renewable energy. Omri and Nguyen (2014) analyze the contributing factor of renewable energy for a large panel of 64 countries over the period 1990–2011. While environmental degradation positively relates to renewable energy across high-, middle-, and low-income countries, GDP per capita only improves renewable energy in high- and middle-income countries. Except for high-income countries, international commerce benefits renewable energy in all panels. Gozgor et al. (2020) discover a positive impact of per capita income, carbon emissions, and oil prices on renewables in 30 OECD countries from 1970 to 2015. In line with previous research, Li et al. (2021) investigate the beneficial effect of income per capita on the development and deployment of renewable energy in OECD countries. They also point out that energy prices and human capital play a central role in explaining renewable energy consumption. Sadorsky (2009a) focuses on the association between renewable energy and income in 18 emerging economies. According to the panel estimates, a rise in real income positively influences renewable energy consumption. A similar conclusion can be drawn for a group of six emerging economies: Brazil, China, India, Indonesia, the Philippines, and Turkey (Salim and Rafiq 2012).

In contrast, several studies find different impacts of macro-economic and environmental factors on renewable energy. Ergun et al. (2019) report negative relationships between the human development index, gross domestic product, and the share of renewable energy in Africa. According to Marques and Fuinhas (2011), income and prices of fossil fuels are not decisive for the development of renewable energy sources in 24 European countries from 1990 to 2006. In addition, the social awareness about climate change is not enough to motivate the transformation from traditional to renewable sources. Uzar (2020a), using a panel dataset of 43 industrialized and emerging economies, concludes that there is no discernible relationship between economic growth and global trade and renewable energy usage.

The existing literature on political and institutional factors can be separated into two major groups: those that discover a positive relationship and those that reveal a negative or insignificant relationship. The literature varies in the countries chosen, the time period covered, and the econometric approach used. For the first group, the empirical outcomes from Uzar (2020b) lead to the inference that institutions positively influence renewable energy consumption in 38 economies during the 1990–2015 period. Kilinc-Ata (2016) evaluates the efficiency of environmental policy instruments in encouraging renewable energy deployment in 27 EU countries and 50 states of the USA. The findings show that feed-in tariffs, quotas, tenders, and tax incentives support renewable energy, although their efficacy differs depending on the instruments employed. Belaid et al. (2021) examine the influence of institutions, governance, and political stability on renewable energy in nine different MENA nations. The results show that while these factors encourage the development of renewable energy, their impacts vary between quantiles.

For the second group, Marques and Fuinhas (2012) prove that some public policies supporting renewables are not effective in promoting renewable energy consumption in 23 European countries from 1990 to 2017. Cadoret and Padovano (2016) study the political drivers of renewable energy policies for six EU countries. While manufacturing industry lobbying effectively prevents the use of renewable energy, the effectiveness is demonstrated by the established measures of governance quality. Additionally, the left-wing parties are more likely than the right-wing parties to favor renewable energy installations are. Environmental policies in OECD nations are divided into three categories by Gan and Smith (2011): market deployment, market deployment, and market-based energy policy. Whereas market deployment has an important impact on the production of renewable energy and bioenergy, the other two strategies have no discernible effect.

The above-mentioned studies suffer from two main shortcomings. The first is that they only associate renewable energy with macro-economic, environmental, political, and institutional factors and ignore two important factors, energy security and economic complexity. In recent years, several academic papers pay attention to the potential roles of these two factors in determining the development and deployment of renewables (Alvarado et al. 2021; Ibrahiem and Hanafy 2021; Papież et al. 2018; Rafique et al. 2021; Valdés Lucas et al., 2016). It is because renewable energy development and environmental quality are highly driven by high innovation and search activities that promote the sustenance of eco-friendly technology and products (Agozie et al. 2022; Huang et al. 2022). Ibrahim et al. (2022) indicate that the renewable energy can mitigate the inducing role of economic complexity on carbon emissions in China. Concerning the impact of economic complexity on renewables, the conclusions from Alvarado et al. (2021) and Rafique et al. (2021) are different. While Alvarado et al. (2021) find that economic sophistication reduces renewable energy consumption in 18 Latin American countries, Rafique et al. (2021) conclude a favorable impact of economic complexity on renewable energy in G7 and E7 countries.

Concerning the effects of energy security on renewables, Narbel (2013) investigate the partial correlation between renewable energy electricity and income, climate change mitigation, and energy security for 107 high- and middle-income countries. The empirical results indicate that rich countries relying on coal imports (to generate electricity) are also those with the highest share of electric power generated from new renewables. Valdés Lucas et al. (2016) show that the energy security strategies, represented by a variety of sustainable, competitive, and supply security aspects, prove more effective in promoting renewables when they are combined with environmental concerns (rather than being utilized solely). In contrast, Ibrahiem and Hanafy (2021) find that energy security, measured by energy imports (percentage of energy use), hampers renewable energy consumption in three North African countries. A study conducted by Marques and Fuinhas (2012) for 23 European countries shows that the larger reliance on energy imports and traditional sources hampers the deployment of renewables. Cergibozan (2022) analyzes the influence of renewable energy on energy security risk for 23 OECD countries and finds that wind, hydroelectric, and total renewable energy reduce the risk while biomass and solar sources fail to do so. These studies suffer from relying on energy imports as a proxy for energy security while energy security is a multi-facet concept, which relates to a variety of factors, including economic, environmental, technological, and political aspects (Amin et al. 2022; Kruyt et al. 2009; Lal and Kumar 2022; Mišík, 2022; Tongsopit et al. 2016). For example, Proedrou (2022) argue that energy transitions evolve at the particular scale, scope, speed, and design because they were mainly driven by political-economic-environmental frames and governmental rationalities. Amin et al. (2022) indicate the declining trend of energy security in Bangladesh from 2014 to 2016, requiring the government to develop sustainable energy policy. However, despite the strong efforts, the acceptability and affordability dimensions show slow improvement. Due to the lack of attention and consensus on the impacts of energy security and economic complexity in empirical works, this study includes both variables in the regression equation of renewable energy.

Another potential improvement of this study over previous studies related to renewables is the adoption of advanced estimation techniques. While almost all papers examine panel data to leverage the benefits of time-varying differences between countries, they often rely on conditional mean methods such as Fixed or Random Effects (Aguirre and Ibikunle 2014; Bamati and Raoofi 2020; Gozgor et al. 2020), Panel Corrected Standard Errors (Aguirre and Ibikunle 2014; Gozgor et al. 2020), System-Generalized Method of Moments (Marques and Fuinhas 2011; Omri and Nguyen 2014), and Autoregressive Distributed Lag – Pooled Mean Group (Ibrahiem and Hanafy 2021; Li et al., 2020; Uzar 2020b), to name a few. If the analysts want to allow some slope flexibility across the distribution, which captures the diverse impacts of the explanatory variables on the outcome one, the quantile regression is capable to carry out (Koenker and Bassett 1978). Furthermore, the conditional mean approaches do not produce accurate estimated results when the dataset contains outliers and the residuals from the regression are not regularly distributed. In these circumstances, panel quantile regression techniques are more efficient in presenting a more thorough picture of the various effects of explanatory variables across the distribution of the dependent variable. To our best knowledge, there are only two papers by Alvarado et al. (2021) and Belaid et al. (2021) that utilize the panel quantile regression approaches to investigate the determinants of renewable energy. While the former utilizes the data on Latin American countries, the latter focuses on the Middle East and North Africa countries.

To fill these two literature gaps, this study examines the roles of energy security and economic complexity in determining renewable energy in G7 countries. By adopting panel quantile regression, we suppose that the empirical outcomes will provide more comprehensive policy implications for countries with diverse phases of renewable energy development and deployment.

Model specification, data, and econometric techniques

Model specification

The current study’s objective is to analyze the drivers of renewable energy in G7 countries. To achieve this aim, we draw the empirical model from the theoretical framework of renewable energy determinants established by Sadorsky (2009a), Omri and Nguyen (2014), and Gozgor et al. (2020) where renewable energy is strongly determined by macro-economic, energy, and environmental factors. However, we extend the set of variables to include two new variables, energy security risk index and economic complexity, which are potential candidates for influencing renewable energy. The general specification for the model is given as

$$REN=f(ESR, ECI, GDP, TRA)$$
(1)

where REN is the renewable energy production (dependent variable), ESR is the energy security risk, ECI is the economic complexity, GDP is the gross domestic product, and TRA is the trade openness. In this model, the energy security risk is a multi-facet concept, which covers fossil fuel reserves, import, energy expenditure, price and market volatility, energy use intensity, electric power sector, transportation sector, and environment. Economic complexity reflects the productive knowledge of a country, which could be captured through the variety of knowledge and the arrangement of such knowledge within a country. Two macro-economic determinants of renewable energy that have been heavily used in studies linked to energy are GDP per capita and international commerce. Table 1 displays each variable’s symbol and measurements. Equation (1) has the following regression form:

$${REN}_{it}={\beta }_{1}+{\beta }_{2}{ESR}_{it}+{\beta }_{3}{ECI}_{it}+{\beta }_{4}{GDP}_{it}+{\beta }_{5}{TRA}_{it}+{\varepsilon }_{it}$$
(2)

where \({\beta }_{1}\) and \({\varepsilon }_{it}\) are the intercept and error terms. \({\beta }_{\mathrm{2,3},\mathrm{4,5}}\) represents the coefficients revealing the magnitude of determining factors. Subscript i stands for the cross sections, which include Canada, France, Germany, Italy, Japan, the United Kingdom, and the USA. Subscript t denotes the time period ranging from 1980 to 2017. The variables are transformed into the natural logarithm, which facilitates the analysis of estimated coefficients as elasticity.

Table 1 Variable description

According to Valdés Lucas et al. (2016), renewable energy is recognized as a substitute for non-renewable energy and acts as a strategic response to any energy security threat. Based on this possible role, we expect a positive impact of energy security on renewable energy, i.e., \({\beta }_{1}\) > 0. However, because of the two different outcomes brought on by four factors—namely, production scale, industry structure, production input mix, and technological advancement—economic complexity plays a far more complex role in society (Chu 2021; Rafique et al. 2021; Stern 2004). So, the effects of economic complexity on renewable energy sources might either be negative or positive, i.e., \({\beta }_{2}\) < 0 or \({\beta }_{2}\) > 0. Following the majority of previous works, such as Gozgor et al. (2020), Omri and Nguyen (2014), and Sadorsky (2009b), we expect the influence of income on renewables to be positive for G7 countries, i.e., \({\beta }_{4}\) > 0. The impact of international commerce on renewable energy is predicted to be beneficial (Ibrahiem and Hanafy 2021; Omri and Nguyen 2014), i.e., \({\beta }_{5}\) > 0.

Data

The list of variables and their descriptions are presented in Table 1. The amount of renewable energy produced per person is calculated by dividing the overall amount of renewable energy generation (found in the BP Statistical Review) by the population (obtained from the World Development Indicators). The World Bank’s World Development Indicators provide information on GDP and trade openness.

The energy security risk index is taken from the database of the Global Energy Institute. It is designed with the aim of comparing the energy security risk across countries and over time. Due to the data limitations in energy prices and expenditures across countries, particularly in non-OECD countries, the index is only calculated for 25 large energy users (developed and emerging countries) from 1980 to 2018. The index is developed from a group of 29 individual metrics covering eight broad categories, including global fuels, fuel imports, energy expenditures, price and market volatility, energy use intensity, electric power sector, transportation sector, and environmental quality. The metrics of each country are then normalized by standardizing their 1980 values in reference to the OECD 1980 reference point of 1000. To combine these metrics to an overall index, an international index weighting is applied for eight categories (14%, 17%, 20%, 15%, 14%, 7%, 7%, and 6%, respectively). Overall, the index is created to communicate the concept of risk: a lower index score specifies a lesser risk to energy security while a higher score warns a higher threat. In 2018, the USA ranks the highest among 25 countries with the lowest score of 727, followed by New Zealand (757), Australia (805), and Denmark (864). From the bottom, Ukraine has the highest risk score of 1453, followed by South Korea (1453), Thailand (1396), Japan (1281), and Turkey (1267). In comparison to other methods that quantify energy security in four areas: availability, applicability, acceptability, and affordability, the Global Energy Institute method is unique in its breadth, depth, geographic coverage, and completeness. Because this index covers a wide range of energy issues, including price, intensity, import, and environmental quality, we do not include variables that are proxies for such factors (fuel price, energy intensity, energy import, carbon emissions, for example) in the regression model. By employing this index, we can mitigate the problem of omitting relevant problems that might affect renewable energy (Chu et al. 2023), including the price market volatility (the size of energy expense to the economy and the consumer exposure to price shock) and environmental concerns (the human exposure to pollution).

The complexity is described as the number of diverse inputs needed for manufacturing a product (Becker and Murphy 1992). From a country’s perspective, the complexity level is knowledge diversity that is accumulated and combined with a society. Hausmann et al. (2014) call it “economic complexity,” which is a reflection of an economy’s productive capabilities. A complex country holds and manages massive amounts of knowledge effectively, across sophisticated linkages of people and organizations, to produce a diverse mix of knowledge-intensive goods. According to Hausmann et al. (2014), the variety and ubiquity of the items produced by a country are a reflection of its expertise. The first element measures the competitiveness of a nation’s ability to produce certain items whereas the second component measures the number of nations that can manufacture a product competitively. Thus, by comparing the basket of exported goods between nations, one can create an economic complexity index for a country. The Atlas of Economic Complexity is the source for the economic complexity index.

Table 2 provides a detailed description of all variables with their average, standard deviation, min, and max values. The mean of renewable energy production (per capita) for the whole period from 1980 to 2017 is 0.003 tera joule with a standard deviation of 0.004. Germany is the country that has the highest level (on average) of renewable power generation (per capita) of 0.005 tera joule, which is five times larger than the value of France (which has the lowest level). In fact, the renewable energy in Germany has developed at an outstanding rate since the twenty-first century, bypassing the USA and Canada. Although the USA led the G7 over the period 1980 to 1990, there was no significant improvement in renewable energy production per capita for the next two decades. The strong growth in the USA only occurred in the late 2010s. A similar pattern happened in Canada and the United Kingdom over the last 10 years. At the end of the year 2017, Germany ranked 1st (0.0214 tera joules), followed by the United Kingdom 2nd (0.0127 tera joules), the USA 3rd (0.0116 tera joules), and Canada 4th (0.0103 tera joules). Although there was a period from 2012 to 2014 where Italy stood in second place, a slower growth rate after that made Italy standing in fifth place in 2017 (0.0101 tera joules). Japan and France are two countries that have significantly lower levels of renewables per capita, only around 30% of the level of Germany, and the gaps between them and other G7 members have being widened considerably. These differences in renewable energy among G7 countries signify the adoption of quantile regression over the use of conditional mean regression.

Table 2 Descriptive statistics

For the energy security risk index, the index ranges from 568 (the United Kingdom in 2002) to 1395 (Japan in 1981) with an average score of 961. In 2017, among the top 25 energy users, the USA ranked 1st (727), Canada ranked 3rd (802), the United Kingdom ranked 11th (944), Germany ranked 14th (1085), France ranked 15th (1128), Italy ranked 21st (1240), and Japan ranked 22nd (1281). This ranking indicates that the countries in North America face lower energy insecurity than those in Europe while Japan, an East Asian country, will suffer more negative impacts from energy shocks. Concerning economic complexity, the economic complexity holds a mean value of 1.739, which reaches the minimum value of 0.411 (Canada in 2014) and a maximum value of 2.625 (Japan in 1996). Although G7 countries have higher levels of economic complexity over emerging and developing countries, there exists a big difference among them (Doğan et al. 2022). In 2017, Japan ranked the first place (2.309), followed by Germany (2.075), the USA (1.755), the United Kingdom (1.533), France (1.390), Italy (1.117), and Canada (1.057).

Econometric techniques

We begin our analysis by checking the properties of the panel data that determine the choices of estimation methods. First, the spread of globalization, in terms of political, economic, social, and environmental fields, has increased the inter-dependence among countries, especially the developed and emerging markets. Such an inter-country relationship requires us to test the cross-sectional dependence (hereafter CSD) between G7 countries. As a result, this research adopts a CSD test with either stringent cross-sectional independence (Pesaran 2021) or weak CSD (Pesaran 2015) as the null hypothesis.

Based on the outcomes of the CSD test, the next stage is to choose between the first- and second-generation unit root tests to check the stationarity of panel data. If CSD exists, Pesaran’s (2007) second-generation unit root test in heterogeneous panels is used. The null hypothesis expects that all series are non-stationary.

The subsequent stage is to check if there is a co-integration association between renewable energy and its determinants. There are several tests, e.g., Pedroni (1999, 2001) and Westerlund (2007) tests, to check the co-integration. The former test computes the means of each series across panels and subtracts them from the original values to mitigate the problem of CSD. The latter test estimates the short-run adjustment towards the long-run equilibrium and provides robust results in the case of CSD. Both tests provide the results on the co-integration for individual panel members and for the panel as a whole.

The empirical approach consists of panel quantile regression as the primary estimation method, whereas the fixed effect regression with the Driscoll and Kraay (1998) standard errors is included as a comparison. The reasons for choosing the Driscoll-Kraay standard errors come from the fact that the residuals obtained from mean regressions are heteroskedastic, auto-correlated, and cross-sectionally dependent. Appendix 1A shows that the modified Wald statistic rejects the null hypothesis of homoskedasticity. Appendix 1B indicates the rejection of the null hypothesis of no serial in the residuals by Wooldridge (2002) test. In Appendix 1C, the Friedman (1937) and Frees (1995, 2004) tests reject the null hypothesis of cross-sectional independence.

This study adopts the panel quantile regression instead of conditional mean ones because of several reasons. Traditional regressions may overestimate or underestimate the coefficients, and they do not account for the heterogeneous distribution of the panel data. In addition, if outliers occur in the dataset and/or the residuals do not match a normal distribution, the estimation results become not reliable. In contrast, the quantile regression allows flexibility in the distribution and produce the slopes for different quantile of the dependent variables. Given that the G7 economies have different amounts of renewable energy production per capita, it is reasonable to examine the varying roles of economic complexity and energy security at different locations in the renewable energy conditional distribution (as well as economic complexity and energy security). In order to compare the estimated results with those obtained via conditional mean regression, we decide to test the normality distribution of the residuals obtained from estimating Eq. (2). If the findings contradict the null hypothesis of normality, we should use quantile regression.

In order to estimate conditional quantile functions of the outcome variable as functions of the treatment components, Koenker and Bassett (1978) recommended using quantile regression. The inclusion of additive fixed effect variables is a key component of the most extensively used approaches for quantile regression in panel data. However, this inclusion makes it more difficult to comprehend the parameters that were estimated (Canay 2011; Powell 2022). Powell (2022) recommends a panel quantile regression estimator with non-additive fixed effects.Footnote 1 While maintaining the non-separable disturbance property, this method exploits within-group variance for identification aims. As a result, parameter interpretation is equivalent to cross-sectional quantile estimates. Based on the method of Powell (2022), Eq. (2) can be modeled as follows:

$${REN}_{it}={D}_{it}^{^{\prime}}\beta \left({U}_{it}^{*}\right)\; \mathrm{with} \;{U}_{it}^{*}\sim (\mathrm{0,1})$$
(3)

where \({REN}_{it}\) denotes the renewable energy of country i in year t, \({D}_{it}^{^{\prime}}\) is the set of all independent variables in Eq. (2), \(\beta\) represents the estimator of coefficients, and \({U}_{it}^{*}\) is the random error term.

The panel quantile regression model depends on the following circumstance for the nation i in year t in the quantile:

$$P\left({REN}_{it}\le {D}_{it}^{^{\prime}}\beta \left(\tau \right)|{D}_{it}^{^{\prime}}\right)=\tau$$
(4)

According to Eq. (4), for all sets of dependent variables, the probability that the dependent variable is lower than the quantile function is similar and equal to τ. Powell (2022) contends that the generalized method of moments can be utilized to calculate the sample moments if the monotonicity and conditional independence requirements are mutually fulfilled. In the former condition, \({D}_{it}^{^{\prime}}\beta \left({U}_{it}^{*}\right)\) is assumed to strictly increase in \({U}_{it}^{*}\sim (\mathrm{0,1})\). The second condition is a more straightforward articulation of the stationarity assumption such that \({U}_{it}^{*}|{D}_{i}\sim {U}_{is}^{*}|{D}_{i}\) if the explanatory variables are exogenous (or \({U}_{it}^{*}|{Z}_{i}\sim {U}_{is}^{*}|{Z}_{i}\) where \({Z}_{i}\) acts as instruments variables if the explanatory variables are endogenous). Accordingly, the following definition applies to the sample moments:

$$\widehat{g}\left(b\right)=\frac{1}{N}\sum_{i=1}^{N}{g}_{i}\left(b\right) \mathrm{with }{g}_{i}\left(b\right)=\frac{1}{T}\left\{\sum_{t=1}^{T}\left({Z}_{it}-\overline{{Z }_{i}}\right)\left[1\left({Y}_{it}\le {D}_{it}^{^{\prime}}b\right)\right]\right\} \mathrm{and} \overline{{Z }_{i}}=\frac{1}{T}\sum_{i=1}^{T}{Z}_{it}$$
(5)

The parameter set can be generated by

$$B\equiv \left\{b|\tau -\frac{1}{N}<\frac{1}{N}\sum_{i=1}^{N}1\left({Y}_{it}\le {D}_{it}^{^{\prime}}b\right)\le \tau \right\} \;\;\mathrm{for \;all }\;\;t$$
(6)

The parameter can be estimated as follows using some weighting matrix \(\widehat{A}\) that is created using the two-step generalized method of moments:

$$\widehat{\beta \left(\tau \right)}=\mathrm{min}\widehat{g}{\left(b\right)}^{^{\prime}} \widehat{A}\widehat{g}\left(b\right)\;\mathrm{with }\;b\in B$$
(7)

Following the evaluation of the long-term empirical data, the Dumitrescu and Hurlin (2012) causality test is conducted to investigate the causal relationship between the variables. In other words, because policy debates are typically bidirectional, we seek to identify the direction of dynamic bivariate panel causality among the outlined indicators under consideration. This method addresses heterogeneity and CSD and has been used extensively in many studies (Rahman and Sultana 2022; Uzar 2020b; Zhao et al. 2020). The absence of homogeneous Granger causality across all cross-sectional units corresponds to the null hypothesis. The alternative hypothesis, on the other hand, considers that there can be causality for some individuals but not necessarily for all individuals in the panel.

Empirical results and discussion

Preliminary test results

The empirical results for CSD are presented in Table 3. As all statistics are statistically significant at 1% level, the null hypothesis of cross-sectional independence or weak CSD is discarded. This finding confirms a high inter-connected relationship among G7 countries in terms of energy, economic activities, and economic development.

Table 3 Cross-sectional dependence test

Table 4 provides empirical results for unit root tests for all variables at their level and first difference forms. For series at level, trade openness variable is stationary only at 10% significance level, while the rest of the variables are found not at any conventional significance level. After the first difference transformation, the null hypothesis that a series is non-stationary is rejected at 1% significance level for all variables.

Table 4 Unit root test

The outcomes of the CSD and unit root tests direct us to examine the co-integration among the variables by using the Westerlund (2007) test. Table 5 displays the outcomes of panel co-integration Westerlund (2007) tests. The rejection of the null hypothesis in two panel statistics is interpreted as a confirmation of co-integration of at least one of the cross-sectional units.

Table 5 Co-integration test

To examine the multi-collinearity between independent variables, we use the variance inflation factor (hereinafter VIF). Following the rule of thumb, variables demonstrating the VIF > 10 should be subjected to further testing procedures. The outcomes reported in Appendix 2 show that all the VIF is significantly lower than 10, proving that multi-collinearity is not an issue in our data.

To examine the normality behavior of residuals obtained from regressing Eq. (2) using conditional mean methods, the Shapiro and Wilk (1965) and Bera and Jarque (1981) tests are utilized. As shown in Table 6, the statistics reject the null hypothesis of normality at 1% significance level. This outcome implies that the adoption of conditional mean methods will produce less reliable and inconsistent results as compared to those obtained from quantile regression.

Table 6 Normality test

Main results and discussion

Table 7 displays the quantile regression results based on Eq. (2). To facilitate the comparison with the results obtained from conditional mean regression, we add the results from fixed effects with Driscoll-Kraay standard errors in the last column of Table 7. First, the energy security risk index positively influences renewable energy across quantiles. It means that higher energy insecurity is an important reason for the development and deployment of renewable energy. In other words, renewable energy is a strategic response against the backdrop of global geopolitical, socio-economic, technological, and environmental uncertainties causing energy shocks (Valentine 2011). The statistically positive impact of energy security risk on renewables confirms the conclusion of Valdés Lucas et al. (2016) that energy security contributes a key role in the expansion of renewable energy, which opposes the findings of Ibrahiem and Hanafy (2021) and Marques and Fuinhas (2011).

Table 7 Main results

However, there are significant differences in the effect of energy security risk across lower (10th to 30th), middle (40th to 60th), and upper (70th to 90th) quantiles in the conditional distribution of renewable energy. Specifically, at an extremely low quantile, e.g., 10th, a 1% increase in the energy security index causes a 3.605% growth in renewable energy production. However, at the 20th and 30th quantiles, the magnitude of the impact decreases considerably to only 2.291% and 2.495%. At middle quantiles, the effect recovers to stand in a range between 2.920% and 3.182%. The impact of energy security risk on renewable energy drops again to approximate the impact at the 30th quantile when the latter moves to the 70th quantile, followed by a small resumption at the 80th and 90th. While energy security risks is a significant determinant of renewable energy across all quantiles, its impact follows a W-shaped curve (down up down up pattern) with a smaller fluctuation in the second phase. The reason for the diminishing impact of energy insecurity across the renewable energy distribution is that when a country develops renewable energy, its energy system will be less negatively affected by energy shocks, e.g., fossil fuel supply disruption or price fluctuation (Aslanturk and Kiprizli 2020; Chuang and Ma 2013). Higher energy diversification allows an economy to absorb a shock in one energy input, e.g., coal or oil, by increasing the use of another such as wind or solar (Charfeddine and Barkat 2020). Moreover, better environmental welfare due to the increasing consumption of clean energy sources lessens the environmental pressures on the government and enterprises, so the influence of energy insecurity on the renewable energy recedes. On the other hand, in countries with low renewable energy level, the energy transformation is almost an imperative rather than an alternative policy proposal when they face energy shocks. Overall, we may infer that there exactly exists heterogeneity for the impact of energy security/insecurity on renewable energy among G7 countries with different levels of renewables.

Second, the impact of economic complexity on renewable energy is statistically unfavorable and varies between renewable energy quantiles. This negative linkage relates to the advancement of four economic structural factors, representing the economic complexity level of a country (Chu 2021; Stern 2004). The development of the first two factors, the production scale and industry structure, leads to an accumulative energy demand, which may increase the country dependence on fossil fuels because of their availability, large-scale supply, and low producing costs. In contrast, the favorable effects of the third and fourth factors, the production input mix and technology improvement, on renewable energy may not be achieved at the current stage of renewable energy development because of many barriers such as high investment costs, lack of tools for electricity shortage, the decentralization model, the difficult market entry, and unequal playing field in the energy industry (Ibrahiem and Hanafy 2021). Moreover, the development of renewable energy requires advanced technologies, which are more challenging to develop than those of traditional energy sources. It may be the case that sophisticated knowledge has not been directed towards renewable energy sectors enough to create significant benefits for the production of renewables (Alam and Murad 2020; Bamati and Raoofi 2020). In fact, the socio-economic activities of the G7 are still pushing high pressure on exploiting and producing a considerable amount of energy, forcing the increasing reliance on fossil energy (Khan et al. 2021).

The impact of economic sophistication achieves the highest level at the 10th quantile where a 1% improvement in the economic complexity index leads to a 1.588% decrease in renewable energy production. It then decreases gradually along the middle and upper quantiles to reach the minor levels at the 80th and 90th quantiles (− 0.131% and − 0.128%). When a nation develops renewable energy, the positive benefits of the production input mix and technological advancement neutralize the negative consequences of scale and industry structure. This argument is rational as G7 countries have been spending considerable resources on developing and deploying renewable energy sources to meet their increasing energy demand as well as to reduce energy dependence on foreign suppliers (Chalvatzis and Ioannidis 2017; Pacesila et al. 2016). Similar findings are found in the nexus between economic complexity and environmental health, where an increase in productive knowledge initially harms the environment but, later in the economic evolution, its improvement ensures environmental sustainability (Ahmad et al. 2021; Doğan et al. 2022).

Overall, the combined influence of economic structure on renewable energy development is negative. However, because the negative impact of economic complexity decreases as renewables expand, it is expected that the beneficial impacts could be achieved when renewable energy and other determining factors develop to higher levels (Marques and Fuinhas 2011). The finding on the adverse effect of economic sophistication on renewable sources is contrasting to the conclusions of Rafique et al. (2021) but it is consistent with those of Alvarado et al. (2021). However, this analysis suggests that the degree of the adverse impact reduces along with the distribution of renewable energy, contrary to Alvarado et al. (2021)’s finding that the magnitude of the impact increases with the level of renewable energy. This distinction may be attributed to the difference in the sample as Alvarado et al. (2021) focus on Latin American countries, while our paper utilizes the advanced G7 economies. In addition, the implication of the economic complexity-renewable energy nexus aligns with the arguments of Chu (2021), Khezri et al. (2022), and Wang and Wei (2020) that economic complexity improvement related to scale effect causes environmental degradation, while economic complexity improvement related to energy efficiency leads to better environmental welfare.

Third, as expected, the coefficient of GDP per capita variable is positively significant at all quantiles of renewable energy distribution. Increased income may lead to bigger renewables via several channels, including the income channel due to higher energy consumption (Omri and Nguyen 2014) and/or investment channel due to more funds available for renewable energy projects and government supporting policies (Aguirre and Ibikunle 2014; Pfeiffer and Mulder 2013). At the lower and middle quantiles, the magnitude of the impact fluctuates modestly in a range of 4.608% and 5.396%. In contrast, the size of the impact decreases substantially when renewable energy production increases to the upper quantiles of distribution. At the 90th quantile, a 1% increase in income per capita results in a 3.666% growth in renewable energy production. The finding on the productive association between income and renewables is coherent with Gozgor et al. (2020), Li et al. (2021), Omri and Nguyen (2014), and Sadorsky (2009a) for the case of developed countries such as G7 and OECD countries.

Finally, the influence of international trade on renewable energy varies across the distribution of renewables. At the lower quantiles, the coefficient changes from negative (not statistically significant) at the 10th to negative (statistically significant) at the 20th, then positive (not statistically significant) at the 30th. The influence is more extensive at the middle and upper quantiles. The highest impact belongs to the 90th quantile where a 1% increase in trade openness leads to a 0.808% increase in renewable energy production per capita. These changes in the significance and sign of trade openness variables confirm the inconsistent outcomes of Ibrahiem and Hanafy (2021), Omri and Nguyen (2014), and Uzar (2020b). They are quite comparable to the findings of Chen et al. (2021) who discover that the influence of international commerce on renewables is contingent on the level of democracy of 97 developed and developing countries. In addition, the finding also aligns with the result of Altinoz and Dogan (2021), where an increase in trade openness reduces air pollution at high quantile levels of carbon emissions.

In comparison to the results from fixed estimation, the quantile regression provides a different but more comprehensive picture. From the last column of Table 7, we can see that only economic complexity and economic development are two significant determinants of renewable energy while energy security risk and trade openness are not. In addition, the slope of impact is uniform, which fails to capture the diverse role of each driving force across the dispersion of renewable energy.

Overall, the estimation results from Table 7 indicate several important things. The most important factor determining the availability of renewable energy is economic development in terms of income per capita, although its role diminishes significantly as renewables are distributed. While the evolution of economic structure harms renewable energy production, its impact is on a diminishing trend when the renewable energy sector develops. Concerning energy security, a rise in energy insecurity encourages the production of renewables, as well as a country with higher renewable energy development suffers from a small impact from energy insecurity. Economic globalization may act as a facilitator for the deployment of renewable energy in G7 countries.

Although Germany has the highest level of renewable energy production per capita among G7 countries, it ranks second place in terms of economic complexity. Therefore, the complexed economic structure inevitably dampens the development of renewables in this country. In contrast, its currently high energy security risk index requires Germany to accelerate the energy structure towards renewables. The USA faces a quite different situation from that of Germany. While the USA has relatively high levels of renewable energy development and economic complexity, it has a better position in terms of energy security risk (the lowest index among G7 countries). Therefore, the USA faces fewer pressures from energy security to expand renewable energy. A similar pattern occurs in the United Kingdom and Canada. In contrast, not only do France, Italy, and Japan rely more on fossil fuels to generate power, they also suffer from high risk of energy security. This concerned attribute means that three countries should speed up the energy transition towards renewable energy. The situation becomes imperative and more difficult for Japan as this country also has the highest level of economic complexity.

The study applies the Dumitrescu and Hurlin (2012) test to determine the direction of the relationship between variables. The results from Table 8 reveal the feedback effect between economic sophistication and renewable energy in G7 countries. Economic complexity causes renewables and vice versa. In contrast, the outcomes provide the one-way relationships from energy security to renewable energy and from income to renewable energy. An unidirectional causality is also found between trade openness and renewable energy. Economic complexity does not Granger cause renewable energy and vice versa, and renewable energy does not Granger cause economic complexity. There is a two-way causal connection between income and economic complexity but there is a one-way causal connection from trade openness to economic complexity.

Table 8 Granger causality test results

Robustness test results

The previous empirical analysis proves that energy security and economic complexity have diverse positive and negative on renewables in G7, respectively. In this sub-section, several robustness checks are performed to confirm the validity of the main findings.

We repeat the quantile regression of Eq. (2) with different substitutions for the three key factors. First, the dependent variable, measured by renewable energy production per capita, is replaced by renewable energy consumption per capita and the share of renewable energy (% of total final energy consumption) to ensure that the conclusions can be applied to a comprehensive group of renewable energy indicators (Bourcet 2020; Gan et al. 2007). Second, the energy security risk variable is substituted by the energy import (as a proportion of total energy usage), a proxy for energy security that has been used extensively in energy studies (Ibrahiem and Hanafy 2021; Marques and Fuinhas 2012). Third, the improved economic complexity index is utilized to measure the upgradation of economic structure. While this index still appraises the variety and sophistication of a nation’s export structure, it accounts for the difficulties in exporting products and the economic size of the exporting countries (Chu 2021). The estimation results of three sensitivity checks are presented in Table 9 A, B, C, and D, respectively.

Table 9 Robustness test results

Next, the possible reverse causation from renewable energy to energy security risk index may occur as several papers identify the significant impact of renewable deployment on energy security (Aslani et al. 2012; Cergibozan 2022; Vaona 2016). Theoretically, renewable energy can minimize energy insecurity through channels, namely, sovereignty, robustness, and resilience (Cherp and Jewell 2011; Valdés Lucas et al. 2016). Thus, we introduce the one-period lag of explanatory variables as instrumental variables to deal with reverse causation (Albulescu et al. 2019; Chu and Hoang 2022; Elgin and Oztunali 2014). Table 9 E displays the results where the estimations of the long-run relationship between variables are basically consistent with those of Table 7.

Third, as environmental degradation is considered an influential factor determining the growth of renewable energy but the environmental perspective accounts for only 8% of the energy security risk index, we further test the validity of the main findings by replacing the energy security risk index with carbon emissions and energy import. On the one hand, in many renewable energy studies, carbon emissions have been widely used as a proxy for environmental quality. On the other hand, before the adoption of the energy security risk index, papers often employ energy import as a representative of energy security. Again, to deal with the potential reverse causation from renewable energy to carbon emissions, the lag of explanatory variables is used as instrumental variables. The estimated results are presented in Table 9 F, which finds the significantly positive relationships between energy import, carbon emissions, and renewable energy in G7 countries.

Last, we follow earlier studies to add potential determinants of renewable energy such as urbanization rate (Rafique et al. 2021) and foreign direct investment (Akintande et al. 2020) in Eq. (2). Overall, the results from this robustness test (see Table 9 G) still confirm the heterogeneous impacts of driving factors on renewable energy across its distribution.

Conclusion and policy implications

In this paper, we analyze the determining factors of renewable energy in the panel data of G7 countries. To measure these two variables, the paper employs the energy security risk index and economic complexity index from the Global Energy Institute and the Atlas of Economic Complexity, respectively. Annual data over the period 1980–2017 is used in the study. The long-run linkage among interested variables is estimated by Powell (2022) panel quantile regression with non-additive fixed effects. The empirical results provide strong evidence of the long-run impacts of energy security and economic complexity on renewable energy. Specifically, higher energy insecurity encourages renewable energy although its impact fluctuates up and down along the distribution of renewable energy. In contrast, an upgrade in economic complexity hampers the development of renewable sources. However, the size of the impact decreases when renewable energy becomes more popular. The development of renewables over the studied period is also strongly influenced by per capita income and global trade, albeit the latter’s influence shifts from being detrimental to being advantageous as renewable energy expands.

The empirical results imply several straightforward implications for G7 policymakers. First, the preparation and implementation of energy security strategies should be coherent with the development strategies of renewable energy and vice versa. How energy insecurity affects renewable energy depends extensively on the current level of renewables. Although the impact of energy insecurity is smaller in the later phase of renewable energy development, the size of the impact is still significant when it is compared with the role of other factors. Thus, supporting policies for renewables should continue to be maintained and even expanded. The ongoing turbulence in the global energy market due to the geopolitical conflicts adds new urgency to accelerate clean energy transitions and diversification of energy supply. Although looming market uncertainties increase challenges for practitioners, the new attention on energy security provides opportunities for accelerating cleaner energy, energy efficiency, and energy independence.

Second, the role of energy security should be evaluated in a comprehensive framework where various factors such as economics, politics, institutions, and the environment are considered. Focusing on a single indicator as import dependence is not enough to understand the causes and consequences of energy insecurity. Thus, the consistency between a broad range of energy policy dimensions is critical for achieving energy security targets. It is necessary for the G7 governments to restructure their policy strategies that endorse energy security and link them to the renewable energy development targets. In fact, many countries, especially those in Europe, have announced plans to advance the development and deployment of renewables but the inter-corporation between countries should be complied to achieve the maximum benefits of such policies. Moreover, it is necessary to view fossil fuel reform and the expansion of renewables as a two-stage policy process rather than two isolated ones.

The positive influence of energy security on renewables also implies that although energy transition offers an opportunity to build a safer and more sustainable energy system, there is no guarantee that this journey will be a smooth one. The energy transition requires building new clean energy infrastructure and reducing the dependence on existing carbon-emitting structures, making the management of the co-existence between these structures much more challenging. Primarily, the need to look at a broad range of energy security during the energy transition towards renewable energy should be an important pillar for energy development in G7 countries. In addition, the high cost of capital and large upfront capital are two key barriers that hamper prospects for investment. Given the fact that investment in renewable energy has been far below what is needed to meet the increasing demand, enacting policies that encourage and boost investment, e.g., fiscal incentives in clean energy production should be speeded up. On demand side, the switch from fossil to renewable sources should occur concurrently with the changes in the production side. Thus, the shifts in consumer preference and behavior contribute an essential part in developing renewables and ensuring energy security. Finally, a better position in relation to energy suppliers can also be attained via collaboration among G7 countries and new energy-producing countries rather depending on traditional suppliers.

Third, the process of transforming the economy into a highly knowledge-intensive level creates a side effect on the development of renewable sources. While the policymakers should be cautious in dealing with this unwilling effect, they should continue to support renewable energy development. As renewable energy develops, the negative impact of economic complexity decreases in its size and it is expected to be beneficial if renewables reach a certain high level. The G7 governments should direct their policies that support knowledge improvement towards renewable energy research, development, and deployment. Specifically, more fiscal incentives such as subsidized loans, tax deductions, or tax exemption schemes are required to sponsor for exploring and utilizing cleaner, more reliable, and affordable renewable energy sources.

Despite the fact that our results pass a number of robustness tests, there are still a variety of limitations that could be beneficial for further research. The upcoming research can be conducted for a larger sample such as the top energy users, OECD, Belt and Road initiatives, BRICS, or oil-exporting, oil-importing countries given the availability of data. Although the data on renewable energy, energy security risk index, gross domestic product, and trade openness are available from 1980 to 2018, we only collect data of economic complexity from 1980 to 2017. This data availability limits our dataset from 1980 to 2017 and we urge other researchers to update data when it is possible. Furthermore, the significance of energy security and economic complexity in defining different types of renewable sources such as solar, wind, hydro, and biomass is potential for subsequent research. Researchers can also explore the long- and short-run impacts of energy security and sophisticated knowledge to draw more relevant policies for developing renewable energy. Finally, because the transition to renewable energy is more than just a socioeconomic and environmental process, other authors can expand on this framework to include cultural, technological, and political factors.