Introduction

According to the United Nations Environment Programme (2020), despite the reduction in carbon emissions due to COVID-19, the world is heading towards a temperature rise of more than 3°C. The non-CO2 greenhouse gases (GHGs) such as methane and nitrous oxide continued to increase in 2020. Ms Andersen, Executive Director of the United Nations Environment Programme (UNEP), has emphasised on the urgent need to reduce emissions; otherwise, the goal of limiting the temperature rise to 1.5°C by 2030 will remain a pipe dream (UNEP 2020). This 3°C increase in global temperatures has the potential to cause catastrophic weather events, ozone depletion, and ecosystem degradation, all of which pose a severe threat to humanity. To accomplish long-term energy and climate goals, clean and sustainable energy must be used in production and consumption (IEA 2020). G20 countries account for two-thirds of the global population and account for more than 80% of global energy demand (Rogelj et al. 2016). G20 is a worldwide organisation made up of the world’s 20 largest economies, consuming 95% of its coal and 70% oil and gas. Simultaneously, it accounts for 85% of worldwide renewable energy investment (Goldthau 2017). These countries have experienced energy-led growth and are constantly under pressure to reduce CO2 emissions. These countries invest heavily in developing sustainable energy sources and energy-saving technology to meet their Paris agreement carbon goals (Qiao et al. 2019).

Only revealed preferences have been given priority in traditional economics rather than the psychological aspect, i.e. self-reported preference (Case and Deaton 2017). According to Stiglitz et al. (2009), countries should adopt subjective determinants of wellbeing in order to better comprehend people’s lives beyond their income and material consumption. Subjective wellbeingFootnote 1 (SWB), which is based on subjective assessments of a person’s own life, is one of the indicators used to quantify wellbeing (Diener 2000). It encompasses both positive (happiness), negative emotions (sadness, worry, and tension), and life satisfaction (evaluation of one’s own life). Broadly, there are two types of conceptualization of happiness in the existing literature, i.e. hedonic and eudaimonic. The hedonic philosophy of happiness is centred on maximum pleasure while minimising pain and suffering (Keyes and Annas 2009). At the same time, the eudaimonic idea holds that human beings can only be happy if they are able to realise their full potential and capabilities (Ryan and Deci 2001). G20 countries are the followers of the eastern and western philosophy of happiness. It is argued that western happiness is mostly based on the hedonic principle whereas the eastern idea is based on the eudaimonic perspective of happiness (Kahneman 1999; Joshanloo 2013). According to the eastern view of wellbeing, individual happiness requires particular attributes such as self-cultivation, love, sympathy, self-control, empathy, and self-transcendence (Shamasundar 2008; Kwee 2012; Joshanloo and Rastegar 2012). However, individual freedom, perfectionism, mastery, goal achievement, competence, enjoyment of activities, and successful exploitation of opportunity are central to the western concept of happiness (Ryan and Deci 2001). The economics of happiness has gained popularity in recent decades after Bhutan introduced the Gross National Happiness (GNH) index in 1972 to measure wellbeing (Kumari et al. 2021). In the same decade, Easterlin (1974) discovered that an increase in income does not affect happiness after a certain point of time. However, different prominent economists have attempted to correlate the SWB with income throughout history. Smith (1776) believed that accumulating more riches leads to greater happiness. Despite agreeing with Smith (1776), Malthus (1798) recognised that material consumption acquired through money should not be mistaken with qualitative and interpersonal wellbeing (Bruni 2020). Bentham (1789), one of utilitarianism’s adherents, believed that the ultimate purpose of all economic activities is to obtain pleasure, usefulness, and happiness. “Economics is the math of maximising happiness by obtaining pleasure at a lesser cost”, wrote Jevons (1871). Hicks and Samuelson’s view of happiness is based on ordinal utility or gaining satisfaction from preferences (Bruni 2020). In contrast, Marshall (1890) advised shortened working hours, resulting in a slight loss of money but can capable of providing enjoyment and relaxation. In a similar line, Keynes (2010) argued that material consumption could bring happiness by meeting basic requirements, but income alone could not meet relative or relational needs. However, Sen (1985) agreed that economic progress is just a tool for human development. If a person is not able to meet his basic needs but appears to be happy and contented, his deprivation cannot be justified on the basis of subjective wellbeing. Consequently, while assessing an individual’s wellbeing, both subjective and objective factors should be taken into consideration.

Increased GHGs emission and climate change have jeopardised people’s subjective wellbeing (SWB) globally. Previous studies have also attempted to investigate the impact of environmental quality on SWB (Tiwari 2011, Rehdanz and Maddison 2005; Schmitt 2013; Cuñado and Gracia 2013; Song et al. 2020; Guo et al. 2021). Rehdanz and Maddison (2005) reported that variations in weather due to global warming have a negative impact on people’s happiness in 67 countries of the world. Tiwari (2011) and Cuñado and Gracia (2013) found the adverse effects of CO2 emissions on happiness in the sample of 21 countries and Spain, respectively. Schmitt (2013) discovered that increase in carbon dioxide, nitrous oxide, and airborne particulate matter are inversely connected to happiness in Germany. Recently, Ahumada and Iturra (2021) and Guo et al. (2021) found that air pollution has deteriorated the SWB in Chile and China, respectively. Song et al. (2020) discovered that poor air quality inversely affects happiness in healthy, middle-aged, and elderly adults in China.

The seventh goal of the sustainable development goals (SDG) is to provide affordable, reliable, and modern energy to everyone by 2030 (Kalt et al. 2019). A considerable amount of literature has been carried out to examine the linkage between energy consumption and quality of life (Niu et al. 2013; Alam et al. 1991). In 112 nations, Alam et al. (1991) discovered a positive relationship between electricity use and physical quality of life (PQLI). According to Niu et al. (2013), countries with higher economic growth and energy consumption have achieved a greater degree of human development. However, existing literature also clearly indicates that huge energy consumption activities are responsible for the rise in GHG emissions (Sarkodie and Strezov 2019; Ansari et al. 2020; Mujtaba and Jena 2021). Recently, Ibrahim et al. (2021) revealed the detrimental impact of non-renewable energy usage on human development in Sub-Saharan Africa. Recent contradictory study of Okulicz-Kozaryn and Altman (2020) and Mazur (2011) found that the energy consumption has no impact on SWB and human development. However, Amer (2020) and Wang et al. (2020) demonstrated that renewable energy consumption positively correlates with human development in lower-middle-income countries and BRICS countries, respectively. Advancements in renewable energy technologies will help in long-term development (Amer 2020; Ansari et al. 2020).

So far, there has been no attempt to investigate the nexus between energy consumption, environmental quality, and SWB in G20 countries. Moreover, researchers have not investigated the impact of renewable and non-renewable energy consumption together with environmental quality on SWB. Apart from this, previous studies pertaining to energy consumption and environmental quality have used the human development index to measure wellbeing. To fill the literature gap, this study aims to investigate the impact of renewable energy, non-renewable energy, and environmental quality on subjective wellbeing in G20 countries during 2006–2019. The panel-corrected standard error (PCSE) model is used in this work, and the Newey-West approach is used for robustness. First-generation unit root test, i.e. Fisher ADF unit root test and second-generation unit root test, i.e. cross-sectional ADF (CADF) unit root test, are used to test the integration among the variables. In addition, first-generation cointegration tests, i.e. Kao and Pedroni, and second-generation cointegration test, i.e. Westerlund test, are used to establish the long-run relationship among the variables. To assess the short-run causality among the variables, the Dumitrescu-Hurlin panel Granger causality test is used. This study contributes to the literature in the following ways. First, it examines the influence of renewable, non-renewable energy use, and environmental quality on SWB, which has not been considered yet in the existing literature. Second, this is the first study on the impact of energy consumption and environmental quality on SWB in G20 countries. Lastly, this study has used the panel-corrected standard error (PCSE) model which considers the issues of cross-sectional dependency, serial correlation, and group-wise heteroscedasticity. Exploring the link between energy consumption, environmental quality, and subjective wellbeing can provide a fresh rationale to the policymakers of G20 countries to conserve non-renewable energy and reduce pollution while increasing renewable energy consumption through various energy innovations.

Literature review

Economic growth and subjective wellbeing

Many studies have been conducted on the association between SWB and economic growth. Over the past few decades, most studies are based on testing the presence of the Easterlin paradox. In the 1970s, a new discussion started with the pioneer study of Easterlin (1974) where he found that income raises happiness, but after a certain point of time, increase in income has almost no effect on happiness (popularly called as Easterlin paradox). Kenny (1999) and Jebb et al. (2018) also supported the study of Easterlin (1974) that income increases happiness only at some threshold level. Another set of findings claims that there is strong effect of income on SWB in the short run than in the long run (Tella et al. 2003; Hagerty and Veenhoven 2003; Beja 2014). Moreover, Sarracino (2013) found that the income has strong effect on happiness in low-income countries than high-income countries. There is more consensus among the scholars that it is the affective part, i.e. negative and positive emotions (happiness, joy, sadness, and anxiety) which have a weak relationship with income (Diener et al. 2010). However, life satisfaction has no weak connection with income (Kahneman and Deaton 2010). There is a debate among the researchers whether absolute or relative income determines SWB. Veenhoven (2002), Hagerty and Veenhoven (2003), Frijters et al. (2004), and Kollamparambil (2020) believed that absolute income determines SWB. With more income, poor people can fulfil their basic needs, become well nourished, get self-esteem, and education which is necessary for one’s happiness, while affluent people can also get happiness by spending their income on charity (Black et al. 2003; Holden 2005). Majority of scholars accepted that relative income always plays a vital role than absolute income in determining SWB (Ball and Chernova 2008; Caporale et al. 2009; Ma and Zhang 2014) accepted that relative income always plays a vital role than absolute income in determining SWB. Recently, by using the World Value Survey data, Lakshmanasamy and Maya (2021) verified that relative income has more dominance on happiness than absolute income in India. The non-income factor like health, marital status, family, friends, social belonging, freedom, and environment become more important after gain of certain level of income (Mahadea 2013). A detailed summary of the above studies is presented in Table 1.

Table 1 Literature on economic growth and subjective wellbeing

Energy consumption and subjective wellbeing

Energy consumption is one of the critical wheels of any economy; without it, holistic development cannot be realised. Some studies are based on energy consumption and quality of life (Martinez and Ebenhack 2008; Mazur 2011; Pirlogea 2012; Pirlogea and Cicea 2012; Lekana and Ikiemi 2021). Pirlogea (2012) obtained a strong positive link between energy use and HDI in a group of 120 nations. Following Martinez and Ebenhack (2008), Sarpong et al. (2020) verified that renewable energy use positively impacted the quality of life in eight South African countries. Lekana and Ikiemi (2021) investigated the impact of energy usage on HDI in Economic and Monetary Community of Central African nations from 1990 to 2019. In comparison to industrialised countries, Mazur (2011) found that electricity usage is a substantial positive indicator of the quality of life in less-developed countries. Pirlogea (2012) reported that fossil fuel consumption had a negative impact on HDI in Romania and Bulgaria. However, there are relatively few studies on the association between energy usage and subjective wellbeing (Afia 2019; Okulicz-Kozaryn and Altman 2020; Churchill et al. 2020). Ibrahim et al. (2021) used the system GMM technique to evaluate the effects of non-renewable energy on the quality of life in 43 Sub-Saharan African nations from 1990 to 2019. Their research revealed that non-renewable energy consumption had a negative impact on quality of life. Recently, Okulicz-Kozaryn and Altman (2020) analysed the relationship between energy usage and subjective wellbeing in the USA. They discovered that there is no link between energy use and subjective happiness. In a similar line, Mazur (2011) noticed that power use has no connection with subjective wellbeing. From 1990 to 2015, Amer (2020) explored the impact of renewable energy consumption on the human development index in low-income, high-income, lower-middle-income, and upper-middle-income nations using GMM techniques. With the exception of lower-middle-income countries, the study showed no significant effects of renewable energy use on HDI in all sample panels using the Driscoll-Kraay model. Churchill et al. (2020) studied the impact of fuel poverty on subjective wellbeing in Australia using survey data. They found that fuel poverty had a negative effect on one’s subjective wellbeing. In a similar line, Afia (2019) concluded that energy consumption has a positive impact on happiness in the panel of 67 countries from 2001 to 2014.

Environmental quality and subjective wellbeing

In the past few decades, research has been carried out to explore the impact of environmental quality and SWB. In most of the research findings, there is a decline of SWB of people with the deterioration of environmental quality (MacKerron and Mourato 2009; Luechinger 2010). In a panel of 67 countries, Rehdanz and Maddison (2005) utilised the panel-corrected least squares method to find that people are happier when the effects of global warming are less and vice versa. Similarly, Welsch (2006) examined the association between SWB and air pollution using data from eleven European nations. It was demonstrated that nitrogen dioxide and lead particles have a harmful impact on SWB. Cuñado and Gracia (2013) used the European Social Survey data to investigate the nexus between air pollution, climate change, and subjective wellbeing in Spain. They revealed that higher levels of carbon dioxide, nitrous oxide, and airborne particulate matter (PM) are associated with lower subjective wellbeing levels. During periods of extreme heat and precipitation, Spaniards feel dissatisfied. In a sample of 23 developed countries, Tiwari and Mutascu (2015) discovered a negative relationship between happiness and environmental degradation in 23 developed economies. Zhang et al. (2017) investigated the association between air pollution and SWB using China Family Panel Studies data. In Chinese individuals, a greater air pollution index diminishes hedonic happiness and increases depression symptoms. Gu et al. (2020) investigated the influence of air pollution on mental health, utilising data from the China Migrant Dynamic Survey. People who dwell in areas with high PM2.5 levels suffer from despair, restlessness, and weakness. Song et al. (2020) highlighted the relevance of subjective pollution evaluation using the Chinese General Social Survey. The results demonstrated that the detrimental impact of poor air quality on happiness is concentrated among sick, middle-aged, and elderly people of China. As a result, these people are more prepared to pay for environmental protection. The effects of air quality on mental health were investigated by Giovanis and Ozdamar (2018). Pensioners in European countries are willing to spend €221 and €88 per year for a one-unit decrease in sulphur dioxide and ozone levels, respectively, to improve mental health. Menz (2011) observed that individuals are not accustomed to living in high PM10 air pollution locations. A detailed summary of the relationship between environmental quality and SWB is displayed in Table 2.

Table 2 Literature on environmental quality and subjective wellbeing

Based on the above studies, it can be concluded that there are mixed findings concerning the impact of environmental quality and energy consumption on SWB. Previous studies have been limited in a number of ways. First, objective measures (such as HDI) of wellbeing are used frequently to analyse the nexus between energy consumption and wellbeing rather than subjective measure (Martinez and Ebenhack 2008; Pirlogea 2012; Pirlogea and Cicea 2012; Sarpong et al. 2020; Ibrahim et al. 2021; Amer 2020). Second, the studies pertaining to the linkage between SWB and environmental quality are mainly concentrated in China and few European countries (Luechinger 2010; Menz 2011; Zhang et al. 2017; Yuan et al. 2018; Giovanis and Ozdamar 2018; Guo et al. 2021). Third, most of the earlier studies have used cross-sectional survey data to establish the link between energy consumption, environmental quality, and subjective wellbeing (Ferrer-i-Carbonell and Gowdy 2007; Ambrey et al. 2014; Song et al. 2020). Fourth, previous studies have failed to separate the effects of REC and NREC on SWB (Afia 2019; Okulicz-Kozaryn and Altman 2020). Since G20 are the largest emitters of carbon and an investor of renewables, it is worthy to examine their SWB concerning environment and energy perspective. Against this backdrop, the study investigates the impact of energy consumption and environmental quality on subjective wellbeing in G20 countries from 2006 to 2019. This study employs the panel-corrected standard errors model, which considers cross-sectional dependence, serial correlation, and group-wise heteroscedasticity. Conclusively, the study offers new insights to policymakers of the G20 countries to curtail energy consumption and environmental pollution for achieving sustainable development goals. In this regard, G20 governments can act as a torchbearer for many low-income countries that requires more energy.

Data sources and methods

Data sources

The paper uses the panel data of nineteen G20 countries for the period 2006–2019. This time period and sample G20 countries are chosen on the basis of data availability. Argentina, Germany, India, Indonesia, Italy, Japan, Mexico, Russia, Australia, Brazil, Canada, China, France, Saudi Arabia, South Africa, South Korea, Turkey, the UK, and the USA are among the countries that have been picked. Subjective wellbeing (SWB) is a dependent variable that is measured using data from the World Happiness Report on self-reported life satisfaction (Yuan et al. 2018). SWB is measured by asking the respondents to rate their satisfaction level with their lives on a scale of 1 (not at all satisfied) to 10 (very satisfied) (very satisfied). Figure 1 shows the happiness rankings of the selected G20 countries for the year 2019. Renewable and non-renewable energy consumption, economic growth, and CO2 emissions are independent variables. The natural logarithm form of variables is used to explain the obtained coefficients in the elasticities form. Table 3 provides a full overview of the variables. The trend of each variable from 2006 to 2019 is shown in Fig. 8.

Fig. 1
figure 1

G20 countries in World Happiness Report 2019

Table 3 Description of the variables

Methodology

Unit root tests

Fisher augmented Dickey-Fuller (ADF) unit root test and the cross-sectionally augmented Dickey-Fuller (CADF) unit root test are used to examine variables’ stationarity. Fisher ADF test is a first-generation type of unit root test. Maddala and Wu (1999) and Choi (2001) developed this test. The main problem of first-generation unit root tests is that they are all constructed on the assumption that the panels are cross-sectionally independent. While CADF is the second generation unit root test developed by Pesaran (2007), it eliminates the first-generation unit root test’s limitations.

Panel-corrected standard error model

A panel-corrected standard error (PCSE) approach is used to explore the impacts of renewable energy usage, non-renewable energy usage, and environmental quality on subjective wellbeing. Cross-sectional dependence (CSD), autocorrelation, and group-wise heteroscedasticity issues are generally found in panel data. PCSE model controls the problems of CSD, autocorrelation, and heteroscedasticity (Reed and Ye 2011). Moreover, this model is suitable when the dataset has larger cross-sectional units (N) than the time period (T). In our study, cross-sectional units (19 countries) are greater than the time period (14 years). As a result, the PCSE model is used in this research. Several researchers have recently used the PCSE method (Bailey and Katz 2011; Nathaniel et al. 2021; Kumar et al. 2021a; Kumar et al. 2021 ; Kongkuah et al. 2021). For the purpose of robustness, we have applied the Newey-West standard error model. This model also gives robust result in the presence of heteroscedasticity and serial correlation. This model is used by multiple authors in the literature (Baloch et al. 2019; Hafeez et al. 2019; Ahmad et al. 2020).

Dumitrescu-Hurlin panel causality test

This study uses a Granger causality test, which was created by Dumitrescu and Hurlin (2012) to establish the causal relationship between the variables. This test is flexible in nature as it can be applied in heterogeneous panels and in cases where the time period is less than or higher than cross-sectional units. This test considers cross-sectional dependence in estimating causality among the variables Mahalik et al. (2021). The test can be represented in the following equation:

$$ {y}_{it}={\alpha}_i+{\sum}_{i=1}^k{\gamma}_i^{(k)}{y}_{i,t-k}+{\sum}_{i=1}^k{\beta}_i^{(k)}{x}_{i,t-k}+{\varepsilon}_{it} $$
(1)

Model specification

Consumption of energy includes both renewable and non-renewable sources. Conventional energy sources include coal, natural gas, oil, and nuclear power. Solar energy, tidal energy, hydropower, geothermal energy, and bioenergy come under renewable energy sources (Owusu and Sarkodie 2016). Non-renewable energy consumption (NREC) is the most significant contributor to higher economic growth. Kraft and Kraft (1978) reported that energy consumption has no causal relationship with economic growth, but the vice versa is correct from 1950 to 1970 in the USA. Similarly, Yu and Choi (1985) obtained a unidirectional relationship between natural gas and liquid fuel consumption to GNP for the UK and South Korea. Moreover, NREC is the most significant contributor to CO2 emissions faced by these countries (Paramati et al. 2017; Ahmed and Shimada 2019).

It is evident that REC promotes green growth (Shahbaz et al. 2020) and reduces CO2 emissions for developed countries in both the short run and long run (Paramati et al. 2017; Qiao et al. 2019). In the panel of 30 developed and developing nations, Ahmed and Shimada (2019) found a bidirectional correlation between REC and economic growth. Subjective wellbeing is connected with energy consumption from two channels: environmental degradation (CO2 emissions) and economic growth. On the one hand, an eco-friendly environment, i.e. lesser carbon emissions, enhances SWB while, on the other hand, economic growth meets the basic needs and brings material prosperity. As a result, the empirical model investigates the effects of renewable and non-renewable energy use and CO2 emissions on subjective wellbeing. The functional form of the variables is represented in the equation given below:

$$ {SWB}_{it}=f\left({REC}_{it},{NREC}_{it},{CO}_{2 it},{GDP}_{it}\right) $$
(2)

The general specification of model is represented in Eq. (3) by taking the natural logarithm of Eq. (2), is given as:

$$ \mathit{\ln}{SWB}_{it}={\alpha}_0+{\alpha}_1{lnREC}_{it}+{\alpha}_2{lnNREC}_{it}+{\alpha}_3{lnCO}_{2 it}+{\alpha}_4{lnGDP}_{it}+{\mu}_{it} $$
(3)

where SWBit defines the subjective wellbeing of a country at a time t; RECit represents the country’s renewable energy consumption per capita of the country; NRECit signifies the country’s non-renewable energy consumption per capita; CO2it signifies the country’s environmental quality; GDPit denotes the GDP per capita; and μit denotes the error term of the equation. The detailed methodology is presented in Fig. 2.

Fig. 2
figure 2

Scheme of methodology

Energy consumption, environmental quality, and subjective wellbeing in G20 countries

We have generated scatter plot diagrams to visualise the relationship between SWB, renewable energy consumption (REC), non-renewable energy consumption (NREC), CO2 emissions, and economic growth in each G20 countries. For these scatter plots, data are averaged from 2006 to 2019. The relationship between REC and SWB is presented in Fig. 3. The scatter plot depicts the positive relationship between SWB and REC. Canada has the highest level of REC as well as SWB among the sample G20 countries. However, Australia, UK, Mexico, Germany, France, and Saudi Arabia have a high level of happiness (near 7) despite less REC. It might be possible due to the use of energy-efficient technologies.

Fig. 3
figure 3

Renewable energy consumption and subjective wellbeing

The relationship between NREC and SWB is shown in Fig. 4. It shows that among the selected G20 countries, high NREC does not bring a higher level of happiness. This result supports the energy-subjective wellbeing paradox (Okulicz-Kozaryn and Altman 2020). Moreover, China has more NREC than the USA, but high level of NREC has not resulted into a higher happiness level. In contrast to China, European countries like Australia and Canada have performed well in preserving their happiness despite low NREC. India’s SWB is the lowest in the sample of G20 countries even though after increasing NREC.

Fig. 4
figure 4

Non-renewable energy consumption and subjective wellbeing

In Fig. 5, the relationship between SWB and CO2 emissions is presented. In this figure, different scenarios can be observed. Countries like Australia, Canada, and the USA have a higher level of SWB with more CO2 emissions. In contrast to this, India has the lowest level of SWB with the lowest carbon emissions. Countries like South Korea, Japan, South Africa, China, and Russia have high carbon emissions but near to the average level of SWB, while Brazil, France, Mexico, Argentina, and Italy have lesser carbon emissions and their SWB level is above the average.

Fig. 5
figure 5

CO2 emissions and subjective wellbeing

Lastly, Fig. 6 shows the relationship between economic growth and SWB. A positive linear relationship is found for most of the countries. India, China, and South Africa have lower SWB with lower GDP per capita. In contrast to this, Canada, Australia, and USA have attained higher SWB with increased economic growth. However, Mexico and Brazil have attained nearly the same level of SWB without higher per capita GDP as compared to Germany and France. Although Japan has a high GDP per capita, it has just above the average SWB level.

Fig. 6
figure 6

GDP per capita and subjective wellbeing

Results and discussion

Table 4 shows that the mean value is highest for GDP (25,285.810), followed by REC (4082.244), NREC (18.147), CO2 (8.753), and SWB (6.157), respectively. Variance of REC (6477.885%) is highest, followed by GDP (18245.970%), NREC (26.267%), CO2 (5.414%), and SWB (0.895%). Table 5 displays the correlation matrix among the variables, i.e. SWB, REC, NREC, GDP, and CO2. It is found that all the variables are positively related to subjective wellbeing except for NREC.

Table 4 Summary statistics of the variables
Table 5 Correlation matrix

Table 6 shows the empirical results of the cross-sectional dependence (CSD) test. The null hypothesis of cross-sectional dependence should be rejected because the p-value is less than 0.05. It demonstrates that all the variables have cross-sectional dependence. As a result, evidence indicates that CSD exists for REC, NREC, CO2, and GDP.

Table 6 Cross-sectional dependency test

The first-generation Fisher ADF unit root results are shown in Table 7. Subjective wellbeing is found to be stationary at the level of intercept and trend, but REC, NREC, economic growth, and CO2 emissions are found to be stationary at the first difference. Overall, the considered variables are stationary either at level or at first difference. Table 8 reports the second-generation unit root test, i.e. CADF. The results reveal that the variables, i.e. SWB, REC, NREC, GDP, and CO2 emissions, contain unit roots at their level. However, at their first order, they become stationary. We can deduce that all variables are either integrated at I (0) or at I (1).

Table 7 Fisher ADF unit root test
Table 8 CADF unit root test results

The variables of interest should be cointegrated in order to analyse the long run associated between them. This study uses three-panel cointegration tests, namely the first-generation Kao, Pedroni cointegration, and second-generation Westerlund (2007) variance tests to assess the long-run association between variables. The paper initially explores the feasible long-run relationship among the variables using Kao (1999) panel cointegration test. According to the empirical findings, three out of five statistics reject the null hypothesis of having no long-run association between the variables (Table 9). According to the Kao test, this indicates that there is a long-run relationship among the variables. Pedroni’s (1999) test is also employed in this article. Three out of three statistics in this test reject the hypothesis that the variables do not have panel cointegration (Table 9). As a result, the Pedroni test also indicates that the variables have a long-term relationship. However, Kao and Pedroni tests have a disadvantage. Both the cointegration tests do not consider the presence of CSD among the variable. To overcome this, we use a second-generation cointegration test, i.e. the Westerlund test. Table 9 shows the findings of this test. This test indicates the presence of panel cointegration among the variables.

Table 9 Cointegration tests

To investigate the impact of REC, NREC, CO2, and GDP, firstly, the pooled OLS, fixed effect, and random effect model are applied for preliminary analysis. The results of these three models are presented in Table 10. It is found from these three models that non-renewable energy consumption has a negative relationship with subjective wellbeing. The literature suggests that fixed effect and random effect models have cross-sectional dependence, serial correlation, and group-wise heteroscedasticity problems. Moreover, Jarque-Bera test statistics fails to reject the null hypothesis. It implies that data follow the normal distribution (Table 11). This is also supported by diagnostic tests, which are presented in Table 11. These diagnostic tests conclude that the fixed effect model suffers from cross-sectional dependence, serial correlation, and panel group-wise heteroscedasticity (Table 6 and Table 11).

Table 10 Panel regression models
Table 11 Diagnostic tests

The panel-corrected standard error (PCSE) regression model is used to address the concerns mentioned above. Table 12 displays the outcomes of this model. At a 5% significance level, results reflect that renewable energy usage has a favourable impact on SWB. There is a 0.01% rise in SWB for every 1% increase in renewable energy use. A possible explanation of this finding might be that the better utilisation of renewable energy gives happiness to the people as they feel less threatened by their actions on the environment (Zhang et al. 2017). This finding is in accordance with the studies (O'Brien 2013; Zhang et al. 2017; Sarpong et al. 2020) that found a positive effect of renewable energy consumption on SWB. Sarpong et al. (2020) found a positive association between REC and SWB for South African countries. Dhandra (2019) noted the importance of sustainable consumption on enhancing life satisfaction. Moreover, O'Brien (2013) discussed that shifting from non-renewable to renewable, switching the electronic gadgets for some time can promote sustainable happiness.

Table 12 Results of panel-corrected standard errors (PCSE)

Furthermore, at a 1% significance level, the coefficient of NREC is negative and significant. SWB is shown to decrease by 0.01% for every 1% increase in NREC. A possible reason for having a negative NREC coefficient may be explained by the fact that non-renewable energy is the most significant contributor to greenhouse gases and climate change, negatively affecting people’s quality of life (Ibrahim et al. 2021). The findings broadly support the work of Okulicz-Kozaryn and Altman (2020), who demonstrated that increasing energy usage does not significantly affect SWB in the USA. Ibrahim et al. (2021) recently established that non-renewable energy has a detrimental impact on the quality of life in 43 nations in Sub-Saharan Africa. NREC is the biggest contributor of carbon emissions in China, Pakistan, and India (Belaid and Youssef 2017; Chen et al. 2019; Ansari et al. 2020). Taghizadeh-Hesary and Taghizadeh-Hesary (2020) found that NREC can cause a variety of health issues as well as water and food insecurity in low- and middle-income countries. Moreover, non-renewable energy consumption is the leading source of pollution, leading to lung disease, vascular stiffness, chronic cough, asthma, and mental illness (Smith et al. 2013). However, our findings contradict Churchill et al. (2020), who found the positive impact of fuel energy consumption on SWB in Australia.

Table 12 shows that the CO2 emissions coefficient is negative and significant at the 5% significance level. It means that every 1% increase in CO2 emissions results in a 0.12% decrease in SWB. This result is following previous studies (Tiwari 2011; Cuñado and Gracia 2013). Tiwari (2011) argued that greater CO2 emissions in the air should be blamed for the lower level of happiness. In coherence with our finding, Cuñado and Gracia (2013) claimed that increased CO2 emissions lower happiness in Spain. Furthermore, Orru et al. (2016), Yuan et al. (2018), and Rehdanz and Maddison (2008) also indicated that environmental degradation negatively affects SWB. Moreover, Zhang et al. (2017) and Xie et al. (2019) have found the adverse impact of pollution on human health. Xie et al. (2019) reported that higher PM2.5 levels could cause hypertension and numerous severe diseases, leading to mortality. According to the latest World Health Statistics (2020) report, air pollution puts approximately 9 out of 10 people at risk of stroke, lung disease, pneumonia, and cancer. Although, this result contradicts the findings of Song et al. (2019), who explained that haze pollution promotes SWB in China. The SWB is compensated by the higher income generated at the expense of pollution.

Finally, at a 1% level of significance, findings suggest that per capita GDP positively impacts subjective wellbeing. SWB increases by 0.12% for every 1% increase in per capita GDP. This outcome aligns with previous research (Hagerty and Veenhoven 2003; Frijters et al. 2004). It implies that G20 countries can utilise the fruits of their economic growth to improve the subjective wellbeing of their citizens. According to Frijters et al. (2004), an increase in real household income has contributed to the improvement in life satisfaction in East Germany by 35–40%. Similarly, Hagerty and Veenhoven (2003) found that higher income leads to greater happiness in the long run in the USA, Germany, and Italy. Increased income satisfies the basic requirements, provides a comfortable lifestyle, and aids in the achievement of development goals in various G20 countries. Our findings contradict the study of Di Tella and MacCulloch (2008), who found that increased per capita GDP does not lead to happiness in Germany and other wealthy European countries. Australia, France, Germany, Japan, and the UK have experienced the Easterlin paradox at some point in their economic history (Easterlin 1995; Blanchflower and Oswald 2005). The summary of the findings is presented in Fig. 7.

Fig. 7
figure 7

Summary of findings

Fig. 8
figure 8figure 8figure 8figure 8figure 8

Trends of the variables for G20 countries during 2006–2019

Robustness check

The Newey-West standard model is used to ensure the robustness of the estimated coefficient in the PCSE model. Table 13 displays the results of this model which provide similar estimates to the PCSE model. As a result, it confirms the robustness of the PCSE model’s calculated coefficients. Table 13 illustrates that a 1% increase in REC results in a 0.004% rise in SWB. Furthermore, a 1% rise in GDP per capita increases SWB by 0.12. At a 5% significance level, a 1% increase in CO2 emissions reduces the SWB by 0.02%.

Table 13 Results of Newey-West standard error model

Dumitrescu-Hurlin panel Granger causality test findings

The panel Granger causality test among the variables is also investigated using the Dumitrescu and Hurlin (2012) test. Table 14 displays the results of this test. There is a bidirectional correlation between CO2 and GDP, REC and GDP, NREC and CO2, REC and CO2, CO2 and GDP, and REC and NREC. Pao and Tsai (2011) discovered that economic growth and CO2 have a bidirectional causal relationship. Furthermore, Sebri and Ben-Salha (2014) and Ummalla and Samal (2019) found bidirectional causality between NREC and GDP per capita. A one-way causal association was shown between SWB and CO2, SWB and NREC, and NREC and GDP per capita.

Table 14 Dumitrescu-Hurlin panel Granger causality tests

We have discovered that income in G20 countries had a significant impact on SWB. From the finding, it is clear that G20 countries have maintained their economic growth, and as a result, they did not experience a shortage of commodities while switching from NREC to REC. Paramati et al. (2017) verified that renewable energy had a more significant influence on economic growth than NREC in G20 countries, which supports this claim. As a result, REC has not hindered the economic growth and aided in promoting SWB by meeting the material requirements of G20 citizens. According to Kaika and Zervas (2013), the environmental Kuznets curve is relevant in the situation of G20 countries, where increasing levels of growth have improved environmental quality due to the usage of more renewable energy sources. Ansari et al. (2021) also argued that REC and economic growth improve the environmental quality in the top renewable energy user countries. Mujtaba et al. (2020) came to the same conclusion stating that increased economic growth can reduce CO2 emissions, but the opposite is also true. As a result, the G20 countries can give priority to green growth, sustainable happiness, and economic development.

Conclusion

The world is dealing with the crisis of food, energy, and climate change. It is urgently needed to increase renewable energy production and improve energy efficiency for creating a low carbon global society. It is only possible when the G20 countries will reduce their emissions and come forward to help underdeveloped nations where a significant portion of the population has no access to electricity and clean fuels yet. The present study empirically investigates the impact of energy consumption and environmental quality on subjective wellbeing in G20 countries during 2006–2019. First-generation unit root test, i.e. Fisher ADF, and second-generation unit root, i.e. CADF tests, are applied for the stationarity of the variables. Panel-corrected standard error (PCSE) model is used because of the group-wise heteroscedasticity, serial correlation, and cross-sectional dependence issues. Further Newey-West standard model is utilised to check the robustness of the results of the PCSE model. First-generation cointegration tests, i.e. Kao and Pedroni, and second-generation cointegration test, i.e. Westerlund cointegration tests, establish the long-run relationship among the studied variables. The study found the positive effect of renewable energy consumption on SWB. Moreover, subjective wellbeing is negatively affected by non-renewable energy consumption in selected G20 countries. Subjective wellbeing is positively determined by environmental quality. Further economic growth is also found as the positive determinants of subjective wellbeing. After applying the Dumitrescu-Hurlin model, a unidirectional causality is obtained running from subjective wellbeing to environmental quality, subjective wellbeing to NREC, and NREC to economic growth. A bidirectional causality is found between environmental quality and economic growth, REC and economic growth, and NREC and environmental quality.

Policy suggestions

The study found the positive effects of REC and economic growth on subjective wellbeing. In contrast, the adverse effects of NREC and CO2 emissions on subjective wellbeing are observed in selected G20 countries. It is suggested that G20 countries’ governments should subsidise renewable energy production while taxing polluting sectors. Strengthening environmental institutions can also aid in the achievement of carbon reduction goals. It is also benefical to realise people that increased non-renewable energy use does not equate to higher SWB. In the name of growing renewable energy generation, a dedicated fund should be established. To improve energy efficiency in these countries, technologically innovative research should be encouraged. Public awareness about reducing non-renewable energy consumption should be raised at the local level through various media channels. Public-private partnerships (PPP) can also facilitate the move from non-renewable to renewable energy production and consumption. Apart from that, the G20 countries forum can be used to enhance environmental quality and, therefore, raise subjective wellbeing.

To reduce the CO2 emissions among sample countries, the quota for their non-renewable energy consumption can be curtailed at a certain level. According to our findings, economic growth has a beneficial impact on SWB; thus, G20 countries should promote green growth. Various studies have demonstrated that lowering carbon emissions and adopting renewable energy have no adverse effects on the economic growth of G20 countries (Paramati et al. 2018; Qiao et al. 2019). The G20 climate change meeting should be taken seriously to pursue a green growth path and sustainable energy consumption, resulting in green happiness.

The following are some of the limitations of the study: first, according to Gallup world statistics, the time span of the study is restricted, i.e. 2006–2019. Second, several G20 countries are eliminated because of data issues. Finally, different types of pollution and ecological footprint could have been used as proxy for environmental quality. The paper’s future scope will investigate the influence of REC and NREC in countries of various income groups, predominantly Asian and African countries, bringing more insights to the existing literature. Furthermore, the impact of various forms of REC and NREC can be used better to understand the relationship between energy and subjective wellbeing. Household-level studies based on primary data can be used to gain a deeper grasp of this link.