Effects of Age Dependency and Urbanization on Energy Demand in BRICS: Evidence From the Machine Learning Estimator

This paper examines the effects of age dependency ratio (the young age, old-age and overall age) and urbanization on renewable and non-renewable energy consumption in Brazil, India, China, and South Africa, considering the panel data from 1990 to 2019. We control economic growth and foreign direct investment inflows as key factors in the energy demand function using the Stochastic Impacts by Regression on Population, Affluence and Technology approach. Empirical analysis has been implemented using the Kernel Regularized Least Squares machine learning method to solve possible classification problems in the traditional regressions without relying on the linearity assumption. It is observed that the young age dependency, overall age dependency, and urbanization negatively affect both renewable and non-renewable energy demand. On the contrary, old-age dependency and economic growth are positively associated with renewable and non-renewable energy demand. The mixed effects of foreign direct investment inflows on renewable and non-renewable energy demand patterns are also found. Thus, the findings suggest that environment policymakers in the BRICS economies should prioritize urbanization, young age, and overall age population to improve energy efficiency.


INTRODUCTION
Since the early 1990s, renewable energy consumption and production have risen in developing and developed economies (British Petroleum, 2020). The rise of renewable energy may have four important issues. The first issue is the potential problems of climate change and renewable energy usage in decreasing CO 2 emissions. Therefore, renewable energy can mitigate the adverse effects of climate change on economic performance (Payne, 2009). The second issue is technological progress and declining investment costs on renewable energy facilities (Apergis and Payne, 2010). The third is that governments have provided various policy support for renewable energy consumption and production, e.g., they have implemented credit easing and tax deduction policies on renewable energy investments. There are also rising production standards in renewable energy facilities (Apergis and Payne, 2012). Finally, the volatility and rise in crude oil prices have promoted renewable energy consumption (Gozgor, 2018a). However, non-renewable energy consumption A. Impact of Urbanization on Energy Demand Jones (1989) 59 developing countries 1980 Urbanization, economic growth, industrialization and population density The elasticity of energy consumption for urbanization is found between 0.35 and 0.48 Jones (1991) 59 developing countries 1980 Urbanization, per capita income, industrialization A 10% increase in the population living in an urban area would drive a 4.5% increase in energy consumption per capita GDP. Parikh and Shukla (1995) Around 78 developed and developing countries of the World

1965-87
Urbanization, GNI per capita, population density, the share of agriculture in GDP Urbanization leads to an increase in aggregate energy use Pachauri and Jiang (2008) India and China 1980China -81-2004 Urbanization, income, population size Less than proportionate change in energy use concerning urbanization changes; rural energy consumption exceeds urban energy consumption because of inefficient solid fuels used by households Liu (2009) China 1978-2008 Population growth, urbanization and economic growth Unidirectional causality from urbanization to total energy consumption in the long run and the short run. Significant relationship among all variables Poumanyvong and Kaneko (2010) 99 countries  Population size, economic growth, energy intensity, industrialization and share of services in GDP, CO 2 emissions and emission intensity and urbanization The effect varies in different development stages-a negative relationship between urbanization in low-income countries where the positive relationship is in the middle and high-income group O'Neill et al. (2012) India and China 2004 as the base year Urbanization, economic growth and carbon emissions Less than a proportionate change of urbanization on energy use, whereas the income effect is strong Shahbaz and Lean (2012) Tunisia  Industrialization, economic growth, financial development and urbanization Long-run bidirectional causality between financial development and energy consumption as well as between industrialization and energy consumption Sadorsky (2014) 18 emerging economies which including BRICS

1971-2008
Income, urbanization and industrialization Urbanization depresses energy consumption, whereas industrialization and income increase it in the long run Ghosh and Kanjilal (2014) India  Economic activity, urbanization Unidirectional causality from energy consumption to economic activity and from economic activity to urbanization Li and Lin (2015) 73 has steadily risen due to the increasing demand for household consumption and production in different sectors (Belaid and Youssef, 2017). This paper examines non-renewable and renewable energy consumption determinants in four emerging economies, i.e., Brazil, India, China and South Africa, within a panel data framework primarily focusing on urbanization and age dependency factors. Unlike previous papers, the current study controls the effects of different age-dependency measures with urbanization to capture the role of demographics on the energy demand. Given that there is vast literature investigating the relationship between urbanization and energy demand, previous papers have not adequately examined the effects of urbanization combined with age-dependency on renewable and non-renewable energy demand (see Table 1). To the best of our knowledge, a limited number of studies have investigated population dynamics and age dependency as determinants of energy demand, particularly in developing and emerging economies. Population dynamics, for example, a higher young population, can create additional demand for energy in developing countries. There can be a significant role of aging in the structural transformation of economies. It is important to note that age-dependency affects energy consumption patterns and can shift towards more relevant and energy-saving products for the elderly. For instance, the energy sector, housekeeping, and health services create a higher demand in countries with an elderly population (Aiyar et al., 2016). Therefore, economies' structural transformation will occur on the supply-side and translate the manufacturing sector's economy to services (Siliverstovs et al., 2011;Gozgor, 2018b).
The paper focuses on the cases of Brazil, China, India, and South Africa as a part of the BRICS region for empirical testing within a panel data framework. These countries are important in terms of energy demand. According to World Bank (2021), China, India, and Brazil are the first, the third, and the tenthlargest economies in 2019 when we consider the Gross Domestic Product (GDP) based on Purchasing Power Parity. These countries have also experienced a consistent increase in renewable energy demand in the 2010s (Gozgor, 2016). For example, China became the largest renewable energy consumption in the World in 2019. Brazil and India are also the top ten economies globally in terms of GDP, but they are also the largest renewable energy consumers (British Petroleum, 2020).
Furthermore, these countries also have an increasing middleclass, which will create demand for different aspects of energy, including renewable energy. Therefore, they will have a growing demand in the domestic market in the forthcoming years, and hence they can be attractive markets for renewable energy sources. At this stage, investors from abroad are very keen to invest in these developing countries. Expanding the domestic market and foreign investments will increase demand for all energy segments due to rising globalization (Gozgor et al., 2020). Therefore, we control the GDP and Foreign Direct Investments (FDI) to build a theoretical framework using the Stochastic Impacts by Regression on Population, Affluence and Technology (STIRPAT) model. We suggest that urbanization, economic growth, FDI attraction, and the different demographics will translate into large energy demand in renewable and nonrenewable energy. A limited number of existing studies analyzed the effects of age-dependency, an indicator of demographic change, on energy demand. At this stage, we aim to use the Kernel Regularized Least Squares (KRLS) machine learning method of Hainmueller and Hazlett (2014). Besides, previous studies show a nonlinear relationship between aging and economic growth (see, e.g., Hirono, 2021). Therefore, there can be a possible nonlinear relationship between aging and energy demand. In short, it is better to use the novel machine learning method of Hainmueller and Hazlett (2014) to model the nonlinearities and instabilities in determinants of renewable and non-renewable energy demand in the BRICS region except Russia.
A higher dependency ratio might lead to less overall energy demand and a higher share of non-renewable sources due to income distribution. It is challenging to decode the complex relations of the environment with population dynamics. High population creates pressure on limited energy sources, migration of population living in the city creates a problem on infrastructure, congestions and high energy demand. Therefore, analyzing the impact of age dependency and increasing urban areas would be important in sustainable energy sources. Moreover, such issues have not been addressed, especially in the catalyst group of emerging economies of BRICS. Further empirical research is required to prove this relationship, and accordingly, policymakers can use more renewable energy sources to meet the additional demand of the urban sector in developing countries.
Furthermore, the increasing population of young and working-age people will generate substantial additional demand for energy. Many studies proved that population and urbanization have an essential role in energy demand. These factors also triggered the demand for non-renewable resources due to low per capita income and difficulty affording clean energy sources. Given these countries' demographic and economic structure, analyzing the population dynamics such as age dependency may have an essential role in guiding the energy policies and renewable energy demand in the right direction. Most studies have taken only one dimension of population, i.e., population size, when analyzing the demographic effect on energy use and the environment. In contrast, other demographic dimensions such as age dependency also have an essential role in analyzing the environmental effect.
To the best of our knowledge, this study is the first research in the empirical literature to examine the effects of age dependency ratio and urbanization on renewable energy and non-renewable energy consumption in the BRICS region by considering the KRLS machine learning method for the panel analysis. We find that the young age dependency, overall age dependency, and urbanization negatively affect renewable and non-renewable energy demand. On the contrary, the old-age dependency, economic growth and FDI are positively associated with renewable and non-renewable energy consumption.
The rest of the paper is organized as follows. Literature Review provides a brief review of the studies. In Model, Estimation Methods, and Data model, methodology and data have been discussed. Discussion of the Results and Policy Implications presents the results, and finally, Conclusion concludes the study with the policy implications.

LITERATURE REVIEW
With increasing energy demand and consumption in emerging economies, many empirical studies (see Table 1) have analyzed the link between urbanization, energy consumption, and economic growth in recent decades. Some of these studies have shown a significant positive effect of urbanization on energy consumption (Jones, 1989;Jones, 1991, Parikh andShukla, 1995;Pachauri and Jiang, 2008;Liu, 2009;Zhao and Zhang, 2018), whereas other researchers found a negative relationship between these two variables (Ghosh and Kanjilal, 2014;Sadorsky, 2014). Few other studies have shown a mixed relationship which varies with the various income group of countries and can be explained by the inverted U shaped relationship (Poumanyvong and Kaneko, 2010;Li and Lin, 2015), where at first urbanization has a positive role in energy consumption after that it shows a negative effect on energy consumption. Precisely, most of the research has found out that urbanization increases energy demand, especially in middle and high-income countries. The reason behind this relationship is that growth causes an increase in urban population density. High levels of population concentration in urban areas are often associated with energy demand in various sectors such as transport mobility (O'Neill and Chen, 2002), industrial production and employment (Jones, 1989;Sadorsky, 2014;Liu et al., 2015), residential energy use and changing lifestyle (Poumanyvong and Kaneko, 2010;Estiri and Zagheni, 2019). These sectors and income are detrimental to the relationship between energy consumption and urbanization in many countries. The recent development and sustainability concern has also started looking at this relationship from the lens of energy sources, broadly segregated into renewable and non-renewable. However, not enough research has been carried out to highlight the impact of urbanization on renewable energy demand.
Similarly, the role of age dependency has been ignored in probing its relationship with renewable and non-renewable energy consumption given the demographic dividend, energy demand, economic growth and concern for sustainability (Sinha et al., 2019) in BRICS countries. The literature review critically analyses the role of urbanization and age dependency in total energy demand and discusses these two on renewable energy Frontiers in Energy Research | www.frontiersin.org August 2021 | Volume 9 | Article 749065 demand. Table 1 presents a summary of the significant studies in this connection. The early studies done by Jones (1989Jones ( , 1991 found that the proportion increase in the population living in an urban area would increase energy consumption per capita. Madlener and Sunak (2011) recommend urban energy planning for better energy use. Salim and Shafiei (2014) and Mrabet et al. (2019) opined that urbanization has a massive effect on non-renewable energy consumption compared to any other factor. Sadorsky (2014) segregated the long-term and short-term effects of urbanization and industrialization on energy demand in emerging economies, including BRICS, except for Russia. The study stated that in the long run, urbanization decreases energy demand, whereas industrialization increases it.
Though numerous studies (Liddle, 2000;Liddle and Lung, 2010;Liu et al., 2015;Sheng et al., 2017) directly probed the connection between the urbanization, population and energy demand using the STIRPAT model in case of various developed and developing countries; the literature is scarce which has analyzed the role of age dependency on energy demand in BRICS economies. This phenomenon can play a significant role in the renewable and non-renewable energy consumption pattern and help achieve sustainable development, given the vast population and demographic dividend in the fastest-growing emerging BRICS economies. Most of the existing literature has taken population size and growth as main drivers and analyzed its role in an Environmental Impact Population, Affluence and Technology (IPAT) framework to see the demographic impact on energy demand (such as Liddle, 2013;Liddle, 2014). These studies proved that energy demand grows as the population rises. Moreover, in recent years, few researchers (Liddle and Lung, 2010;Hasanov and Mikayilov, 2017) segregated the population into various age groups and analyzed the role of people's working age and young age effect on energy demand.
Notwithstanding, the age dependency aspect has mostly been missed in various studies (see Table 1). Because of the immense potential of development and high working-age population, middle-income countries have exerted high pressure on environmental resources and energy demand in manifold ways. For example, Kim and Seo (2012) did a dynamic panel analysis for 53 countries over 35 years and found an inverted U-shaped relationship between aging and energy demand in the long run. This effect is more extensive in residential energy use than industrial energy use because older people use more energy due to health reasons and breakaway in the labor force. Unlike the previous studies, a recent study done by Estiri and Zagheni (2019) has taken the Bayesian Generalized Linear model instead of IPAT or STIRPAT model and found that residential energy consumption increases with life course in the Unites States.
The above studies have not discussed the impact of increasing urbanization and economic growth on renewable energy demand. Few studies (Pachauri and Jiang, 2008;O'Neill et al., 2012) found a strong income effect on household consumption leading to a switch on renewable energy sources such as electricity and natural gas. Salim and Rafiq (2012) found income and pollutant emission as major determinants and have long-term bidirectional causality with renewable energy in Brazil, India, China and a few other emerging economies. They claimed that a 1% increase in GDP causes a 1.228% increase in renewable energy consumption. Yang et al. (2016) have shown that the energy mix effect, i.e., the ratio of renewable energy to total energy consumption, economic growth, and population, significantly affects renewable energy consumption.
In contrast, urbanization has a different role during various growth stages of renewable energy. The authors defined the three stages of renewable energy consumption as slow, fluctuant and accelerated growth stage. Urbanization has the highest contribution (76%) in the accelerated growth stage of renewable energy consumption.
In BRICS countries, a recent study by Banday and Aneja (2020) segregated renewable and non-renewable energy consumption. It revealed a unidirectional causality from nonrenewable energy to GDP growth and bidirectional causality from renewable energy to GDP growth. They suggested that all these emerging nations have the potential to develop sustainable energy sources. A similar feedback hypothesis between economic growth and renewable energy has been found by Sebri and Ben-Salha (2014). Zakarya et al. (2015) have explored the connection between energy demand, FDI and economic growth in BRICS countries. They mention that FDI may help invest in renewable energy sources, technology transfer and increasing energy efficiency. The same connection has been found by Doytch and Narayan (2016), who suggested that sectoral FDI reduces non-renewable energy consumption.
In contrast, an augmenting effect of FDI has been found in the case of renewable energy consumption. Amri (2016) found a 1% increase in renewable energy drives FDI by 0.185%; on the other hand, FDI enhances renewable energy by 0.292% in BRICS countries, excluding Russia. The above studies show that urbanization, economic growth, population and FDI may have a catalyst role in the penetration of renewable energy. Therefore, more empirical analyses are required to shed light on the potential and specific ways urbanization and age dependency may affect BRICS countries' renewable energy.
Though diverse literature is available in probing the link between urbanization and energy demand, studies have not segregated urbanization in renewable and non-renewable energy demand. No study rarely talks about the population dynamics and age dependency on energy demand. The role of age dependency and urbanization on renewable and nonrenewable energy demand is neglected in the BRICS nations to the best of our knowledge. To fill the existing literature's cavity and provide a comprehensive analysis of the role of age dependency and urbanization while considering renewable and non-renewable energy resources are the primary focus of this research. Given these research gaps, this work differs from existing studies and contributes to the literature in various ways. First, it will analyses urbanization in renewable and non-renewable energy demand, which has not been discussed much in BRICS countries. Second, In the case of demographic characteristics and age structure, most research has been carried out for China or developed countries. However, the age dependency factor has been neglected. No study rarely segregated this effect from population age distribution, which may give significant insights for making an effective energy policy. Third, it will also analyze other renewable and non-renewable energy demand determinants such as industrialization, FDI, and economic growth within a panel framework.

STIRPAT Model
The empirical farmworker draws upon the STIRPAT framework developed) to study the effects of age dependency and urbanization on energy demand of renewable and nonrenewable in selected BRICS economies. The STIRPAT model presents unique features. First, it does not impose a prior functional form between variables. Second, the STIRPAT framework avoids the quadratic transformation of nonstationary variables. Finally, the STIRPAT framework model relaxes the underlying assumption that environmental impact population elasticity is united by not scaling environmental and other covariates by population (Fang et al., 2021;Liddle, 2014). Accordingly, we utilize the STIRPAT model, which takes the following form: Where I it signifies the renewable and non-renewable energy demand impact, P it , A it , and T it are population, affluence, and technology, respectively. The parameter a is the constant term, while, γ, δ, and ξ elasticities of the respective variables that relate to I it . Since the objective of this study is to assess the effect of age dependence and urbanization on renewable and non-renewable energy demand via nonparametric methods, we first conduct benchmark exercises by estimating the parametric version of the STIRPAT model. Along with a set of covariates to minimize omitted variables bias, the specification of the same is given below: Where i represents countries, t is the time, P it shows urbanization, young-age, old-age and overall age dependence A it is real GDP and T it is used for FDI. Further, OIL it it shows that oil consumption, COAL it representing coal consumption,GAS it is the natural gas consumption and RE it represents renewable energy consumption. The parameters α 0 , α 1 , α 2 , and α 3 are the constant term and β 1 , β 2 , β 3 . . ..β 12 are the slope coefficient concerning independent variables. The termε it is country-specific fixed-effect, v it is the time fixed-effect, andξ it is the random error term.

Estimation Method: Kernel-Based Regularized Least Squares
The Kernel-based Regularized Least Squares (KRLS) is a nonparametric machine learning method developed by Hainmueller and Hazlett (2014). The KRLS estimation technique has the advantage over classical regression estimators for solving classification and efficiency problems without relying on the linearity assumption. The KRLS estimator is a very flexible estimator to minimize the errors in the estimators. Therefore, this approach can successfully model nonlinearities and instabilities (Hainmueller and Hazlett, 2014). We think capturing the possible presence of nonlinearities and instabilities in the series is essential since renewable energy investments are long-term projects requiring complicated technology. This long-run process can create possible nonlinearities and instabilities in the renewable and non-renewable energy variables, especially in developing economies. This technique allows tackling regression problems without manual specification search while retaining ease-of-use and interpretability and considering the possible nonlinear interaction among variables. The KRLS operates a wider space of possible functions based on the observations with similar expected covariate values to have similar average outcomes.
Furthermore, KRLS employs regularization that gives a prior preference for smoother functions over erratic ones. Indeed, it reduces the variance and fragility of estimates over-fitting and diminishing the influence of "bad leverage" points. This novel method of KRLS has manifold advantages as compared to other methods. First, given its combination of flexibility and interpretability, KRLS can be used for a wide variety of modeling tasks. Second, it is suitable for modeling problems whenever the correct functional form is unknown, including exploratory analysis, model-based causal inference, prediction problems, propensity score estimation, or other regression classification problems. Finally, the KRLS is superior to many other machine learning approaches for both (continuous) regression and (binary) classification tasks.

Data
The study uses the annual data from 1990 to 2019 for the BRICS economies except for Russia. Therefore, the study is targeting Brazil, India, China and South Africa. Both the annual data and country selection are decided based on the data available for countries. The data brief is explained in  Table 3 shows that the average mean is the highest for GDP, which takes a value of 5168.849, followed by coal consumption (379.440), oil consumption (144.357), overall age (54.0844), urbanization (52.945), young age (45.386), gas consumption (27.804), renewable energy consumption (12.438), old age (8.697), and FDI (2.120). In the case of variances, the variance of GDP has the highest value (3561.815) followed by coal consumption (557.334), oil consumption (137.900), gas consumption (38.887), renewable energy consumption (30.294), urbanization (20.645), young age (11.992), overall age (10.443), old age (1.820), and FDI (1.571). The standard deviation for all the variables except economic growth (GDP) and coal is small and predictable. A similar trend is also observed in the appendix of Supplementary Figure S1. Since all variables show a stable trend over time, it is fine with moving for the panel estimation for the BRICS region.

Empirical Results
The lower section of Table 4 describes the correlation between the dependent and independent variables. Economic growth, old age people, and FDI inflows positively and significantly correlate with non-renewable energy consumption patterns (i.e., coal, oil and natural gas) and renewable energy consumption. In contrast, urbanization, young age and overall age people are negatively and significantly interlinked with it. Moreover, the pattern of nonrenewable energy consumption and renewable energy consumption are positively correlated with each other. The low correlation between the independent variables does not produce any threat of multi-collinearity for the estimated models. Interestingly, both positive and negative significant correlations between the independent variables provide us with an expected sign of effects on the BRICS region's primary energy pattern.
Tables 5, 6 show the significant results and Hainmueller and Hazlett Kernel-based Regularized Least Squares (2014) models to capture the possible nonlinearity interactions, rich explanation, etc., heterogeneous effects (Hainmueller and Hazlett, 2014). In Table 5, oil consumption, gas consumption, coal consumption, and renewable energy consumption are the dependent variables, while economic growth, FDI and urbanization are the independent variables. Moreover, we take urbanization, young age, old age, and overall age dependency as independent variables across all the models.
In Model 1, the results show that economic growth positively impacts renewable energy consumption and non-renewable energy consumption (i.e., oil, coal, gas) while urbanization negatively impacts it. Moreover, in Model 2, while we use a young age in the absence of urbanization, results show that economic growth positively influences and young age negatively affect both renewable and non-renewable energy demand. We also find the mixed effects of foreign direct investment on the pattern of renewable and non-renewable energy. Table 6 again reports the Hainmueller and Hazlett Kernelbased Regularized Least Squares (2014) results. In Model 3, while we use overall age in the absence of young and old age, we get consistent findings with Model 2. Moreover, economic growth has positively connected, while overall age dependence has negatively influenced renewable energy consumption and nonrenewable energy demand. Simultaneously, in Model 4, all the variables such as economic growth, foreign direct investment, and old-age dependency positively impact it. Overall, we find that the young age dependency, overall age dependency, and urbanization negatively affect renewable-and non-renewable energy demand. On the contrary, old-age dependency and economic growth are positively associated with renewable-and non-renewable energy demand. We also find the mixed effects of foreign direct  investment inflows on the pattern of primary energy demand for both renewable and non-renewable energy sources.

Policy Implications
The results show that economic growth is one of the drivers in raising the demand for renewable and non-renewable energy in the BRICS economies. This evidence is in line with previous studies (e.g., Gozgor et al., 2018). This evidence implies that as economic conditions rise or the people's living standard increases due to the income raised from rising employment and inclusive growth process. Therefore, people mainly focus more on nonrenewable energy consumption than renewable energy consumption. This evidence can be related to costlier renewable energy consumption and lack of knowledge about clean energy utilization. They also have more comfortable following the traditional pattern of energy consumption. Similarly, older people demand renewable and non-renewable energy, and their demand for fossil fuels (coal, oil, and natural gas) is higher than renewable energy. This evidence may be related to the fact that old-age people are also comfortable using non-renewable energy, lacking clean energy knowledge. At this stage, clean energy is also expensive for them to choose more fossil fuels in their consumption and production activities.
On the other hand, urbanization, young age and overall age reduce renewable and non-renewable energy consumption. However, old age depends more on renewable and the pattern of non-renewable energy consumption. Simultaneously, foreign direct investment, young age and overall age depend on nonrenewable energy consumption. It means that both young and overall are inelastic with foreign direct investment while impacting the renewable and pattern of non-renewable energy consumption. Nevertheless, urbanization and old age dependence are elastic with FDI while using renewable and non-renewable energy consumption.
The study's empirical findings have important policy implications for energy efficiency and quality protection of the natural environment. We find that urbanization, young age, and overall age dependency reduce renewable and non-renewable energy usage in the BRICS economies. It can be argued that growing urbanization has proved to be beneficial now as migrated   people living in urban cities of this region require less energy in their consumption and production activities. Moreover, young people also reduce energy usage in their consumption and production activities because they want to save the electricity bills. Reducing renewable and non-renewable energy consumption can save the households and green environment ships for the selected BRICS economies. The more significant will be households' savings if young people use less energy while driving a car and using the utilities. This issue can improve the natural environment and increase output while not compromising its profit levels. This can be possible if they use energy-saving and product-enhancing technologies because young age people in the selected BRICS economies are more careful about the beneficial effects of increased savings and a green environment in the long run. A similar attitude is also coming from the overall age population while improving energy efficiency. Thus, the findings suggest that environment policymakers in the BRICS economies should prioritize urbanization, young age, and overall age population to improve energy efficiency.

CONCLUSION
This paper investigated the effects of age dependency ratio (the young age, old-age and overall age) and urbanization on renewable and non-renewable energy consumption (coal, oil and natural gas) in the selected BRICS economies, considering the panel data from 1990 to 2019. We included economic growth and foreign direct investment inflows to build a theoretical framework for the energy demand function using the STIRPAT model. We used the KRLS machine learning technique in the empirical analysis to solve regression and classification problems without relying on the linearity assumption. According to the findings, the young age dependency, overall age dependency, and urbanization negatively impact renewable and non-renewable energy demand. However, old-age dependency and economic growth are positively associated with renewable and non-renewable energy consumption. The mixed effects of FDI inflows on renewable and non-renewable energy are found. We also find the increasing effects of old age people and economic growth on the BRICS region's renewable and nonrenewable energy demand. This evidence implies that people consume more fossil fuels as part of non-renewable energy in driving their consumption activity. They lack the knowledge of operating electricity/using clean energy at their home. Similarly, rising economic growth increases the demand for primary energy (renewable and non-renewable) in the BRICS region, but non-renewable energy usage was higher than renewable energy. It may be possible because people with increased income levels and employment opportunities demand and consume fossil fuels, primarily in the transport sector. This evidence is a sign of fuel inefficiency if people drive more powerful petrol and diesel usage. Fuel inefficiency can also occur if business firms continue to grow more and more output using higher energy amounts. Lastly, foreign direct investment inflows in renewable and nonrenewable energy can have both positive and negative effects. On the positive side, foreign investors' inflows can demand more energy if they do not use energy-saving technology in their business activities. In contrast, foreign investors' inflows can also stimulate a green environment using energy-saving technology in the BRICS region. In line with these findings, we can also suggest that climate policymakers should not ignore the importance of old age people, economic growth and FDI in the dynamics of renewable and non-renewable energy demand in the selected BRICS economies as long as renewable energy demand is in association with old age people and economic growth, it is beneficial for the health of the natural environment as it is clean energy in nature.
Nevertheless, higher consumption of non-renewable energy sources is harmful to the natural environment. However, our evidence is limited to the BRICS economies. Future research can use a global data set within a panel framework to generalize findings across all countries and benefit climate policymakers from effective climate mitigation and energy efficiency policies.

DATA AVAILABILITY STATEMENT
The original contributions presented in the study are included in the article/Supplementary Material, further inquiries can be directed to the corresponding author.