1 Introduction

The onset of the twenty-first century has witnessed an unprecedented global challenge in the form of climate change and global warming, primarily driven by rising carbon dioxide (CO2) emissions and expanding ecological footprints (Ansari 2022; Rahman 2022; Acaroğlu et al. 2023; Hardi et al. 2023; Li et al. 2023). In the backdrop of escalating global environmental challenges, the importance of understanding the dynamic interplay between energy consumption and environmental impact cannot be overstated. The onset of these challenges is marked by the alarming increase in CO2 emissions and the expansion of ecological footprints, a phenomenon intricately linked to global warming and posing significant risks to the planet's health (Adebayo and Kirikkaleli 2021; Rahman et al. 2021b, 2023; Ansari 2022). Central to this dilemma is the extensive reliance on non-renewable energy sources, which have led to substantial environmental degradation despite their contribution to economic development (Kartal et al. 2023). This study situates itself within the context of these global concerns, with a focused lens on Indonesia, a region that epitomizes the struggle between developmental aspirations and environmental sustainability. Southeast Asia, particularly Indonesia, stands at a crucial juncture where rapid economic growth has been paralleled by an intensifying energy demand, predominantly met through non-renewable sources like coal, oil, and gas (Munir et al. 2020; Idroes et al. 2023b; Hardi et al. 2024; Kostakis 2024). This energy consumption pattern not only contributes to rising CO2 emissions but also exacerbates the ecological footprint, highlighting a critical conflict at the heart of modern development: the balance between economic progress and ecological preservation (Nathaniel 2021; Rahman et al. 2021a; Salman et al. 2022; Idroes et al. 2023a). Indonesia's environmental profile is particularly telling. As a nation grappling with a bio-deficit, where the ecological footprint overshadows the bio-capacity, Indonesia ranks among the top countries globally with a significant ecological footprint. This situation underscores the urgency to delve deeper into the country's energy consumption patterns and their environmental repercussions. However, a noticeable gap in the existing literature is the lack of comprehensive studies that simultaneously address the dual aspects of environmental impact of CO2 emissions and the ecological footprint in the context of Indonesia. While there is substantial research focusing on either of these aspects, a holistic view that encompasses both remains scarce.

Expanding upon the background of the study, it delves into the multifaceted relationship between energy consumption and environmental impact, with a special focus on the Southeast Asian context, particularly Indonesia. This region, amid rapid economic and population growth, is experiencing an increase in energy demands, predominantly met by fossil fuels. This reliance is not without consequence, as it substantially contributes to the growing ecological footprint and CO2 emissions a link that is becoming increasingly undeniable. Indonesia, as a significant player in the Southeast Asian energy landscape, stands at the forefront of this environmental challenge. Accounting for 40% of the region's energy consumption, the country's energy mix is heavily skewed towards coal, which comprises 60% of its total energy consumption, followed by oil and gas. This is in stark contrast to the minimal contribution of renewable energy sources like wind and solar, which currently constitute less than 1% of Indonesia’s energy profile (IEA 2022). The National Electricity Supply Business Plan of Indonesia further underscores the ongoing reliance on coal, projecting an annual energy demand growth of 4.9% for the period 2021–2030, with coal continuing to dominate the energy sector (ESDM 2021). This heavy dependence on coal and other non-renewable resources is not without its repercussions. As depicted in historical data trends, there has been a significant and consistent rise in Indonesia's CO2 emissions per capita since the mid-twentieth century. This escalation in emissions is reflective of broader global patterns, where increased energy consumption, driven by expanding production and a growing global population, contributes to escalating ecological footprints and exacerbates global warming issues (Adebayo and Kirikkaleli 2021; He et al. 2021; Rahman and Majumder 2022; Raihan 2024).

Moreover, Indonesia's environmental challenges are further compounded by its ecological footprint. The concept of the ecological footprint, which measures the demand on Earth's ecosystems, reveals that Indonesia faces a bio-deficit situation. Its ecological footprint exceeds its bio-capacity, placing it among the top ten countries globally with the highest ecological footprints (Kurniawan et al. 2023; Pata et al. 2021; Pirmana et al. 2021; Wackernagel and Beyers 2019). This alarming situation underscores the urgency to reevaluate and reform the country's energy consumption patterns and environmental policies. In response to these challenges, Indonesia has initiated measures to mitigate its environmental impact. The Institute for Essential Services Reform reports on the country's target to reach an accelerated peak in emissions in the power sector by 2030, with an ambitious goal of achieving net-zero emissions by 2050. Key strategies include increasing renewable energy generation to at least 34% by 2030 and implementing early retirement plans for coal power plants (IESR 2022). Based on Fig. 1, a significant trend in Indonesia's environmental impact is evident. The trajectory of the nation's CO2 emissions per capita from 1889 to 2022 showcases a marked escalation. Initially characterized by relatively low emission levels, there emerged a distinct and steady uptick commencing around the mid-twentieth century. This upward trend culminated in a considerable elevation of CO2 emissions per individual by the year 2022. This pattern underscores a pivotal shift in Indonesia's CO2 emissions over the course of more than a century, highlighting the growing environmental concerns associated with its developmental trajectory.

Fig. 1
figure 1

CO2 emissions annual per capita in tonnes trend in Indonesia. Source: Our World In Data

The recent literature provides a comprehensive understanding of the global and regional trends in energy consumption and their environmental impacts. These studies collectively contribute to a nuanced understanding of the dynamic relationship between different forms of energy consumption and their ecological consequences. The relationship between renewable and non-renewable energy use, economic growth, and carbon footprints in Asian emerging economies has been investigated by both Saqib (2022) and Ali et al. (2023). Their findings indicate that although economic expansion and non-renewable energy consumption exacerbate environmental degradation, increasing the use of renewable energy sources can slowly mitigate these impacts over time. Both studies highlight the pressing need for these economies to switch to renewable energy and improve efficiency in order to reduce their carbon footprints. In a study focusing on the G7 countries, Voumik et al. (2023) employed static and dynamic panel assessments and found that renewable energy reduces CO2 emissions, while non-renewable energy boosts them. Their study recommends shifting towards renewables and hydroelectric sources to lower CO2 emissions. Arshad et al. (2020) contributed to this discourse with an empirical investigation into the impacts of renewable and non-renewable energy on environmental quality in South and Southeast Asian countries. Utilizing the cross-sectionally augmented ARDL modeling approach, the study underscores that renewable energy enhances the quality of the environment while non-renewable energy worsens it in these regions.

Furthermore, adding to the African perspective, a study by Khan et al. (2023) was conducted in 41 Sub-Saharan countries, focusing on the interplay of renewable and non-renewable energy sources alongside economic factors in shaping environmental quality across the region. Their findings underscore the pivotal role of renewable energy in enhancing environmental conditions, contrasting with the detrimental impact of fossil fuel consumption on the environment. Finally, this study investigated the role of institutional quality, renewable, and non-renewable energy on the ecological footprint of OECD countries. It suggests that institutions and renewable energy can leverage environmental sustainability, emphasizing the importance of governance and policy in environmental management (Christoforidis and Katrakilidis 2021; Chang et al. 2024). As illustrated in Fig. 2, Indonesia's bio-capacity exhibits a declining trend over time, accompanied by a corresponding increase in its ecological footprint.

Fig. 2
figure 2

Ecological footprint and bio capacity trend in Indonesia. Source: Global Footprint Network

The significance of this research lies in its comprehensive approach to analysing the interplay between various energy sources, economic growth, and environmental impact in Indonesia. By examining both non-renewable and renewable energy sources, alongside factors like economic growth and capital formation, the study aimed to provide a deeper understanding of their effects on CO2 emissions and ecological footprint over an extensive period from 1965 to 2022. This research is pivotal in offering data-driven recommendations to policymakers, industry leaders, and stakeholders, thereby guiding Indonesia—and potentially other nations facing similar challenges—towards a future where economic development is harmonized with ecological preservation. The findings of this study were poised to contribute significantly to global efforts in combating climate change and promoting sustainable development, serving as a potential blueprint for environmental policy and energy management.

2 Literature review

The existing body of literature on the determinants of CO2 emissions and ecological footprint offers a multifaceted view, encompassing aspects such as energy utilization, economic growth, and capital allocation. However, a critical analysis of these studies reveals varying insights and gaps, particularly in the context of Indonesia.

Significant portion of the research has focused on the impact of different energy sources on CO2 emissions and environmental quality. Studies by Bhat (2018), Ito (2017), and Ben Jebli et al. (2016) presented a consensus that non-renewable energy sources, such as coal, oil, and gas, are primary contributors to increased CO2 emissions. This view was further supported by AlNemer et al. (2023) and Chen et al. (2019), who highlighted the detrimental impact of these energy types on environmental quality. In contrast, renewable energy sources are consistently shown to mitigate these emissions, a finding echoed in the works of Idroes et al. (2023b). These studies collectively underscore the critical role of energy type in influencing CO2 emissions, suggesting a clear dichotomy between the environmental impacts of renewable and non-renewable energy sources. The relationship between economic growth and ecological footprint has been another area of focus. Salman et al. (2022), Destek and Sinha (2020) and Nathaniel and Khan (2020) found that economic growth often leads to increased ecological footprint, primarily through the heightened use of non-renewable energy. Ehigiamusoe et al. (2023) added to this discourse by illustrating the mitigating effect of renewable energy utilization on the ecological footprint. These studies present a complex interplay between economic activities and environmental impact, highlighting the need for sustainable economic models that align with ecological preservation.

Specific to Indonesia, the research landscape becomes more nuanced. Massagony and Budiono (2023) asserted that fossil energy consumption is a significant driver of CO2 emissions in Indonesia, a view that finds support in the empirical findings of Raihan et al. (2023). These studies suggest a direct correlation between Indonesia’s economic development and its CO2 emissions, with renewable energy playing a critical role in offsetting these emissions. Furthermore, Yahya et al. (2023), Idroes et al. (2023b), and Pujiati et al. (2023) utilized the Autoregressive Distributed Lag (ARDL) model to demonstrate that Indonesia’s CO2 emissions are closely tied to its energy consumption patterns and economic growth. Idroes et al. (2023c) added a different dimension by exploring the impact of biomass and geothermal energy on CO2 emissions, indicating that not all renewable sources have the same environmental implications.

Recent research has illuminated the intricate links between renewable and non-renewable energy sources, ecological footprint, and various socio-economic factors within the discourse on energy consumption's environmental impact. These insights play a vital role in refining our comprehension of sustainable environmental management across diverse global contexts. Adekoya et al. (2022) studied this nexus in net-oil exporting and importing nations. Their study delved into how the reliance on oil, whether as a major export or import, influenced the ecological implications of energy consumption. This research is significant in highlighting the different environmental impacts in countries based on their oil trade status, offering vital policy implications for balancing energy mix to sustainably manage their ecological footprints. Further expanding the scope of this discussion, Dogan et al. (2022) presented a study focusing on South Asian economies, examining the relationship between ecological footprint, unemployment, and both types of energy consumption. Their inclusion of unemployment as a variable in analyzing environmental impacts provides a broader socio-economic perspective. This approach reveals the complex interplay between labor market dynamics and energy consumption patterns, offering insights into the multifaceted challenges faced by developing economies in the region in pursuing sustainable development. Complementing these studies, Amin and Song (2022) conducted a comparative analysis in SEA countries, analyzing the impact of renewable and non-renewable energy in achieving carbon neutrality. Their work stands out for its comprehensive inclusion of factors like trade, economic growth, and urbanization. This comparative approach offers a regional perspective on strategies for achieving carbon neutrality, emphasizing how different Asian regions are addressing the challenges posed by energy consumption, economic and urban development in their quest for environmental sustainability.

Expanding on the theme of ecological footprint, a subset of studies has honed in on this aspect, particularly within the Indonesian context, offering insights that complement the broader understanding of environmental impacts. In these studies, the relationship between economic activities, energy consumption, and their effects on ecological footprint takes center stage. Nathaniel (2021) delved into this interplay, uncovering how environmental degradation in Indonesia was not only a consequence of economic growth but also of increased energy consumption. This study is pivotal in establishing a one-way causal relationship where economic growth directly leads to an escalation in the ecological footprint. This finding is critical as it emphasizes the environmental cost of economic expansion in a developing nation like Indonesia. Furthering this discourse, Chien et al. (2023) employed the Quantile ARDL Model to dissect the nuances of this relationship. Their research uncovered that the impact of economic growth on the ecological footprint is not uniform but varies across different levels of economic activity. This positive association between economic growth and ecological footprints across various quantiles presents a more complex and layered understanding of the issue, suggesting that the environmental impact of economic growth might be more significant at certain stages of economic development than others. Kurniawan et al. (2023) contributed a different perspective using Vector Error Correction Model (VECM) analysis. Their study revealed a rapid short-term adjustment in environmental damage in Indonesia, quantified at 246%, in response to imbalances in industrial value-added and energy consumption. This rapid response underscored the sensitivity of Indonesia's environment to economic and energy consumption changes. In the long term, they identified non-renewable energy consumption as a major contributor to the ecological footprint, quantified at 10.207% in 2060, while renewable energy sources were shown to mitigate this impact. This distinction between the short-term and long-term effects offers a deeper understanding of how different energy sources influence Indonesia's ecological footprint over time. Despite these insightful contributions, a gap remains in the literature regarding the simultaneous examination of CO2 emissions and ecological footprint within a single study, particularly in the Indonesian context. This research gap presents a unique opportunity, one that has been explored in different geographical contexts by researchers like Bello et al. (2018) in Malaysia, Pata (2021) in BRICS countries, Acevedo-Ramos et al. (2023) in Colombia, Acaroğlu et al. (2023) in Turkey, Ansari (2022) in ASEAN nations, and Li et al. (2023) in 130 countries. These studies have successfully integrated the analysis of both CO2 emissions and ecological footprint, offering a more holistic view of environmental impact.

Despite these extensive studies, there exists a notable gap in the simultaneous examination of the impacts of energy consumption on both CO2 emissions and ecological footprint, especially in Indonesia. This gap necessitates a comprehensive study that integrates these aspects to provide a more holistic understanding of Indonesia’s environmental challenges. The hypothesis, therefore, is that in Indonesia, the type of energy consumed—renewable or non-renewable—has a significant and differential impact on both CO2 emissions and the ecological footprint. This study aimed to test this hypothesis by critically examining the relationships between energy consumption, economic growth, and their collective impact on the environment, thereby contributing to the existing literature and offering insights for sustainable policy development.

3 Methodology

3.1 Data and variables summary

This study employed yearly data from Indonesia spanning 1965 to 2022. Data on CO2 emissions, non-renewable, and renewable energy were acquired from Our World in Data (OWID 2023). Economic growth and capital formation data were sourced from the World Development Indicators of the World Bank (WDI 2023). Additionally, data on ecological footprint were obtained from the Global Footprint Network (GFN 2023). Table 1 provides a comprehensive overview of the variables. To address potential heteroscedasticity, all data underwent a transformation into natural logarithms.

Table 1 Variable descriptions

3.2 Theoretical framework and empirical model

The theoretical framework widely employed across energy economics literature utilizes CO2 emissions and ecological footprint as a proxy for environmental degradation, establishing linkages between different energy sources and sustainability outcomes. Specifically, comparisons are often made between renewable energy sources (e.g., solar, wind, and hydroelectric) and non-renewable fossil fuel-based sources (e.g., coal, oil, and natural gas) in terms of both environment effect and broader economic impacts such as GDP growth, capital investment, and energy security, among other macroeconomic variables. This allows analyses to quantify environmental and economic trade-offs for various energy policy decisions, ranging from electricity generation using non-renewable energy sources to the impact of economic growth on the environment. By employing CO2 emissions and ecological footprint as common lenses, the energy economics field has developed standardized models for comparing environmental externalities alongside economic costs and benefits for diverse energy planning scenarios, aiming to achieve sustainable development and carbon neutrality.

This study employed the Cobb–Douglas production function framework to investigate the hypothesis proposed by Cobb and Douglas (1928). Focusing on the context of Indonesia, it applied conventional production economics to examine the impact of non-renewable energy, renewable energy, economic growth, and capital formation on CO2 emissions and ecological footprint. By assuming a constant rate of return and utilizing the standard Cobb–Douglas production function, the cumulative output function can be derived as follows (Eq. 1):

$${Y}_{t}=f ({K}_{t},{L}_{t})$$
(1)

where \({Y}_{t}\), \({K}_{t}\) and \({L}_{t}\) represent economic growth, capital and labor at time t.

This study employed an empirical model previously examined by Bello et al. (2018), Pata (2021), Acevedo-Ramos et al. (2023), Acaroğlu et al. (2023), and Li et al. (2023) to explore the impact of economic variables on the environment. Their study uniquely integrated the analysis of both CO2 emissions and ecological footprints, allowing for a comprehensive examination of environmental impact within a singular study. Furthermore, we modified our own model to examine the dynamic impact of non-renewable energy, renewable energy, economic growth, and capital formation on CO2 emissions and ecological footprint. To achieve this aim, the initial function is presented as Eqs. (2)–(3).

$${CO2}_{t} = f ({NRE}_{t},{RE}_{t},{GDP}_{t}, {GFCF}_{t})$$
(2)
$${EF}_{t} = f ({NRE}_{t},{RE}_{t},{GDP}_{t}, {GFCF}_{t})$$
(3)

Where \({CO2}_{t}\) is the CO2 emissions at time \(t\), \({EF}_{t}\) is the ecological footprint at time \(t\), \({NRE}_{t}\) is the non-renewable energy at time \(t\), \({RE}_{t}\) is renewable energy at time \(t\), \({GDP}_{t}\) is economic growth at time \(t\), and \({GFCF}_{t}\) is capital formation at time \(t\).

Furthermore, we divided the non-renewable energy variable into three distinct variables: COAL, OIL, and GAS. Each of these was subject to its own regression analysis to evaluate their direct impact on CO2 emissions and the ecological footprint. Additionally, we introduced the "[]" symbol to abbreviate the function in the equation, signifying that there were three regressions involving the variables coal, oil, and gas, represented as Model 1, Model 2, and Model 3 respectively. The economic model is detailed in Eqs. (4) and (5).

$${CO2}_{t}={\beta }_{0}+{\beta }_{1}\left[\begin{array}{c}{COAL}_{t}\\ {OIL}_{t}\\ {GAS}_{t}\end{array}\right]+{\beta }_{2}{RE}_{t}+{\beta }_{3}{GDP}_{t}+{\beta }_{4}{GFCF}_{t}$$
(4)
$${EF}_{t} ={\beta }_{0}+{\beta }_{1}\left[\begin{array}{c}{COAL}_{t}\\ {OIL}_{t}\\ {GAS}_{t}\end{array}\right]+{\beta }_{2}{RE}_{t}+{\beta }_{3}{GDP}_{t}+{\beta }_{4}{GFCF}_{t}$$
(5)

Additionally, Eq. (4)–(5) can be expanded into the econometric model represented by Eqs. (6)–(7).

$${CO2}_{t}={\beta }_{0}+{\beta }_{1}\left[\begin{array}{c}{COAL}_{t}\\ {OIL}_{t}\\ {GAS}_{t}\end{array}\right]+{\beta }_{2}{RE}_{t}+{\beta }_{3}{GDP}_{t}+{\beta }_{4}{GFCF}_{t}+{\varepsilon }_{t}$$
(6)
$${EF}_{t} ={\beta }_{0}+{\beta }_{1}\left[\begin{array}{c}{COAL}_{t}\\ {OIL}_{t}\\ {GAS}_{t}\end{array}\right]+{\beta }_{2}{RE}_{t}+{\beta }_{3}{GDP}_{t}+{\beta }_{4}{GFCF}_{t}+{\varepsilon }_{t}$$
(7)

where, the term \({\beta }_{0}\)​ represents the intercept, and \({\varepsilon }_{t}\) denotes the error term, while \({\beta }_{1}-{\beta }_{4}\)​ are the respective coefficients. Additionally, Eqs. (6) and (7) have been converted into logarithmic form, as shown in Eqs. (8) and (9), for time series analysis.

$${lnCO2}_{t}={\beta }_{0}+{\beta }_{1}\left[\begin{array}{c}{lnCOAL}_{t}\\ {lnOIL}_{t}\\ {lnGAS}_{t}\end{array}\right]+{\beta }_{2}{lnRE}_{t}+{\beta }_{3}{lnGDP}_{t}+{\beta }_{4}{lnGFCF}_{t}+{\varepsilon }_{t}$$
(8)
$${lnEF}_{t} ={\beta }_{0}+{\beta }_{1}\left[\begin{array}{c}{lnCOAL}_{t}\\ {lnOIL}_{t}\\ {lnGAS}_{t}\end{array}\right]+{\beta }_{2}{lnRE}_{t}+{\beta }_{3}{lnGDP}_{t}+{\beta }_{4}{lnGFCF}_{t}+{\varepsilon }_{t}$$
(9)

where \({lnCO2}_{t}\), \({lnEF}_{t}\), \({lnCOAL}_{t}\), \({lnOIL}_{t}\), \({lnGAS}_{t}\), \({lnRE}_{t}\), \({lnGDP}_{t}\), and \({lnGFCF}_{t}\) represent the logarithmic forms of CO2 emissions, ecological footprint, non-renewable energy (coal, oil, and gas), renewable energy, economic growth and capital formation at time \(t\), respectively. Prior to performing regression analysis, various tests must be conducted, including unit root tests to assess data stationarity and cointegration tests to examine long-term relationships.

3.3 Unit root and cointegration tests

This section focuses on applying the Augmented Dickey-Fuller (ADF) and Phillips-Perron (PP) tests to assess the stationarity of our time series data (Dickey and Fuller 1979; Phillips and Perron 1988). The ADF test, which adds lagged differences to an autoregressive model to check for a unit root, and the PP test, known for its robustness to heteroskedasticity, both aim to determine whether the time series is stationary (alternative hypothesis) or has a unit root and is non-stationary (null hypothesis). We compared the generated test statistics against critical values to conclude stationarity; rejecting the null hypothesis suggested stationarity, guiding our subsequent methodological choices in the analysis. In this section, after establishing that the data was stationary in the first difference, we continued to explore cointegration within our time series data using the Johansen cointegration test by Johansen (1988) and Engle-Granger cointegration test by Engle and Granger (1987). These tests are pivotal in identifying long-term equilibrium relationships among non-stationary time series. The Johansen test is adept at handling multiple time series and is used to ascertain the number of cointegrating relationships. The Engle-Granger test, suitable for pairs of series, involves estimating the long-run relationship between series and then examining the stationarity of the residuals. The presence of cointegration suggested that, despite short-term discrepancies, there is a consistent long-term relationship between the variables, which is a vital aspect for our subsequent analysis and predictive modeling in time series data.

3.4 Dynamic tests with FMOLS and DOLS

In this study, we employ the Fully Modified Ordinary Least Squares (FMOLS) and Dynamic Ordinary Least Squares (DOLS) methodologies to estimate the long-term relationships in our cointegrated time series data. FMOLS is tailored to address the challenges of serial correlation and endogeneity that often accompany cointegrated systems, refining the least squares estimation for more dependable long-term coefficient estimates (Phillips and Hansen 1990). Meanwhile, DOLS, with its augmented regression approach that includes leads and lags of the first differences of regressors, effectively mitigates feedback in the cointegrating equation and counteracts potential endogeneity and sample bias issues. This method is particularly robust in small sample scenarios, providing consistent and efficient estimators (Stock and Watson 1993). By integrating FMOLS and DOLS into our analysis, we aimed to extract precise and comprehensive insights about the long-term dynamics between the variables in our study, thereby enhancing the overall reliability and depth of our time series analysis.

3.5 The robustness test with CCR

This study further reinforced the findings by conducting a robustness test using the Canonical Cointegrating Regression (CCR) method. CCR is particularly adept at addressing issues of simultaneity and endogeneity in cointegrated relationships, which are common challenges in time series analysis (Park 1992). This approach enhances the robustness of our estimates by utilizing a fully modified OLS framework that corrects for both serial correlation and endogeneity biases. By incorporating CCR, we ensured that our analysis accounted for any potential distortions in the long-term relationships identified. The application of CCR was especially crucial in validating the consistency and reliability of our findings, providing an additional layer of confidence in the results of our FMOLS and DOLS estimations. Employing this robustness test underscored our commitment to a thorough and nuanced analysis, ensuring that the conclusions drawn from our study are not only insightful but also stand firm against rigorous statistical examination.

3.6 Pairwise Granger causality

This study extended analysis to include pairwise Granger causality tests, a crucial step in understanding the directional dynamics between the variables in our time series data (Granger 1969). Granger causality operates on the principle that if variable X Granger-causes variable Y, then past values of X should provide predictive information for Y beyond what is contained in past values of Y alone. It's crucial to recognize that Granger causality does not imply genuine causation in the philosophical sense, but rather denotes a predictive association.

The pairwise Granger causality approach involves testing each possible pair of variables in our dataset to determine whether one variable can be used to predict another. This method is particularly useful in uncovering the dynamic interdependencies and influence mechanisms among the variables, which might not be apparent from standard correlation analysis or cointegration tests. The results from these tests could provide valuable insights into the temporal precedence and potential influence pathways among the variables, thereby enriching our understanding of the complex interactions within our time series data. Integrating the pairwise Granger causality tests into our study was instrumental in drawing a more comprehensive and nuanced picture of the relationships and interactions at play in our analysis.

3.7 Summary of the stages of the analysis process

The summary of the methodology states that the statistical process for analyzing time series data, as presented in Fig. 3 (the flowchart of analysis), began with a unit root test (ADF and P-P) to determine if the data were stationary. If the data were stationary, a cointegration test (Johansen and Engle-Granger test) was applied to check for long-term equilibrium relationships between variables. For data that were found to be cointegrated, regression analysis follows using methods FMOLS and DOLS, followed by robustness tests with CCR. Furthermore, the causality test (pairwise Granger causality) is used to picture the relationships and interactions in our analysis. The process included a diagnostic inspection to validate the regression model before concluding the analysis.

Fig. 3
figure 3

The flowchart of the analysis

4 Empirical findings

4.1 Descriptive statistics

The descriptive statistical results presented in Table 2 offer a comprehensive summary of eight important economic variables based on 58 observations. The descriptive statistical analysis of the dataset revealed that CO2 and EF exhibited similar distributions, with means around 2.56e + 08, indicating significant environmental impacts across the sampled entities. COAL, OIL, and GAS showed considerable variability, with means of 12.43, 60.43, and 22.64, respectively. Notably, COAL displayed a particularly wide range of values, as evidenced by its high standard deviation. Additionally, RE exhibited lower mean usage at 4.48, suggesting lesser adoption or production across the observations. In economic terms, GDP had a notably high mean of 4.23e + 15, with a substantial standard deviation reflecting economic disparity, while GFCF showed a lower mean of 1.26e + 15, indicating a varied level of capital investments. This concise overview underscores the disparities in environmental and economic indicators within the dataset, highlighting the necessity for targeted analysis in areas with extreme values.

Table 2 Descriptive statistics

4.2 The results of unit root and cointegration tests

 The unit root test results in Table 3 show that all variables were non-stationary at levels but became stationary in the first difference. The tests' significance at the 1% level across the ADF and P-P methods confirmed this behavior consistently. When considered collectively, the various unit root tests consistently indicated that the variables were of first-order integration. Determining the order of integration for these variables formed the basis for accurately specifying the cointegration framework in subsequent parts of the analysis.

Table 3 The results of ADF and P-P unit root test

On the other hand, the Johansen cointegration test results presented in the Table 4 indicate that the null hypothesis of no cointegration was strongly rejected for zero up to five cointegrating relationships (R = 0, R ≤ 1, R ≤ 2, R ≤ 3, R ≤ 4, and R ≤ 5) as evidenced by the significant Fisher statistics from the trace test, while the max-eigen test only reject the null hypothesis for zero (R = 0), with p-values below the 0.05 threshold. This suggests the presence of at least one cointegrating relationships among the variables tested. However, for hypotheses testing more than five cointegrating relationships (R ≤ 6 and R ≤ 7), the statistics were not significant, indicating that the null hypothesis could not be rejected. Therefore, it was concluded that there were five long-term equilibrium relationships within the dataset.

Table 4 The Results of Johansen Cointegration Test

Table 5 presents Engle-Granger cointegration test results, which rejected the null hypothesis of no cointegration. All variables exhibited cointegration, supported by negative tau- and z-statistics. Rho standard error represents the corrected coefficient standard error, while residual variance estimates long-term variance. The presence of cointegration encouraged further analysis with FMOLS and DOLS methods to estimate long-run coefficients.

Table 5 The results of Engle-Granger cointegration test

4.3 The results of diagnostic and parameters stability tests

Table 6 details diagnostic tests for statistical models related to CO2 emissions and ecological footprints. The table indicates that both models have high R-squared values, signifying strong explanatory power. The Jarque–Bera test outcomes, with p-values above 0.05, confirmed that the residuals were normally distributed. Serial correlation was absent, as suggested by the Breusch-Godfrey LM test results, and both the Breusch-Pagan-Godfrey test and the Harvey and Glejser tests indicated no heteroscedasticity, with p-values exceeding the 0.05 threshold. The Ramsey test results, with p-values also above 0.05, affirm that the models were correctly specified. Furthermore, the accompanying CUSUM charts for both CO2 and ecological footprint, presented in Fig. 4, show cumulative sum lines comfortably within the 5% significance bounds, illustrating the models' parameter stability from 1965 to 2022. Collectively, these results support the statistical robustness and reliability of the models over the examined period.

Table 6 The result of diagnostic test
Fig. 4
figure 4

The parameters stability test with CUSUM for CO2 emissions (a) and ecological footprint (b)

4.4 The results of DOLS, FMOLS and CCR

4.4.1 FMOLS and DOLS of CO2 emissions

Table 7 presents the FMOLS and DOLS estimations for CO2 emissions across three econometric models, each exploring the impact of various independent variables. In Model 1, a 1% increase in COAL led to a 0.0764% (FMOLS) and 0.0907% (DOLS) rise in CO2 emissions. Model 2 found that OIL was statistically insignificant in relation to CO2 emissions. Conversely, Model 3 shows that a 1% increase in GAS corresponded to a statistically significant 0.1831% (FMOLS) and 0.2496% (DOLS) increase in CO2 emissions. Moreover, renewable energy (RE) consistently exerted a negative impact on CO2 emissions in all three models. A 1% rise in RE resulted in a reduction of CO2 emissions by 0.1797% (FMOLS) and 0.2132% (DOLS) in Model 1, 0.1772% (FMOLS) and 0.1917% (DOLS) in Model 2, and 0.1240% (FMOLS) and 0.1328% (DOLS) in Model 3. Additionally, economic growth (GDP) significantly and positively influenced CO2 emissions. A 1% increase in GDP resulted in a rise of CO2 emissions by 1.0350% (FMOLS) and 1.0160% (DOLS) in Model 1, 1.0508% (FMOLS) and 1.0002% (DOLS) in Model 2, and 1.4462% (FMOLS) and 1.5375% (DOLS) in Model 3. Finally, capital formation (GFCF) was only significant in Model 3, where a 1% increase in GFCF reduced CO2 emissions by 1.5375% (FMOLS) and 0.3381% (DOLS). Overall, renewable energy consistently reduced CO2 emissions across all models. Increases in GDP correlate with substantial emission increases. The impact of coal, oil, and gas varies but generally indicates that fossil fuel consumption elevates CO2 emissions, underscoring the complex interplay between economic activity, energy consumption, and environmental impact.

Table 7 Results of FMOLS and DOLS estimations for CO2 emissions

4.4.2 FMOLS and DOLS of ecological footprint

The analysis examined the influence of energy consumption and economic indicators on the ecological footprint (EF), as outlined in Table 8. In Model 1, COAL demonstrated a positive effect on EF, although statistically insignificant. Model 2 introduced OIL, revealing a significant positive impact on EF; a 1% increase in OIL raises EF by 0.1686% (FMOLS) and 0.2679% (DOLS). Conversely, Model 3 found gas to be insignificantly related to EF. Renewable energy significantly reduced EF in Model 1; a 1% increase led to a 0.0260% (FMOLS) and 0.0444% (DOLS) decrease in the ecological footprint. Moving on to Model 2, the impact of renewable energy became insignificant, but in Model 3, it significantly reduced EF, with a 1% increase resulting in a 0.0232% (FMOLS) and 0.0292% (DOLS) decrease in EF. Moreover, economic growth (GDP) consistently and significantly positively influenced EF. A 1% increase in GDP led to a rise in EF by 0.8336% (FMOLS) and 0.8096% (DOLS) in Model 1, 0.9233% (FMOLS) and 0.9492% (DOLS) in Model 2, and 0.8389% (FMOLS) and 0.8673% (DOLS) in Model 3. Finally, capital formation (GFCF) exerted a negative influence on EF across all models. A 1% increase in GFCF reduced EF by 0.2747% (FMOLS) and 0.2583% (DOLS) in Model 1, 0.2934% (FMOLS) and 0.2880% (DOLS) in Model 2, and 0.2661% (FMOLS) and 0.2845% (DOLS) in Model 3. These results indicate that economic growth, as measured by GDP, tends to increase EF, highlighting a potential environmental cost of development. Conversely, investments in renewable energy and capital formation appear to mitigate EF, emphasizing their roles in environmental sustainability. The significance of these variables varies, reflecting diverse economic structures and energy consumption patterns.

Table 8 Results of FMOLS and DOLS estimations for ecological footprint

4.4.3 The robustness test with CCR of CO2 emissions and ecological footprint

The CCR result shown in Table 9 has been applied as a robustness test to validate the results from FMOLS and DOLS analyses concerning CO2 emissions and the ecological footprint. The CCR analysis reaffirmed the robustness of the earlier FMOLS and DOLS findings. Specifically, for CO2 emissions, the CCR method corroborated the positive impact of coal and gas on CO2 emissions and the negative impact of renewable energy on CO2 emissions across all models, with the coefficients being significant. The increasing and significant coefficients for GDP across CCR models also confirmed the robust positive impact of economic growth on CO2 emissions identified in the FMOLS and DOLS models. The CCR results showed a significant negative impact of capital formation on CO2 emissions in the third model, aligning with the negative coefficients observed in the earlier analyses.

Table 9 Results of the Robustness test for dependent variable CO2 emissions and ecological footprint with CCR

In the context of the ecological footprint, the CCR findings were consistent with the non-significant impact of coal and gas, the significant positive impact of oil in the second model, and the significant negative impact of renewable energy in the first and third models, aligning well with the FMOLS and DOLS results. Moreover, the CCR confirmed the positive impact of GDP on the ecological footprint as robust, with significant coefficients across all models, mirroring the earlier results. The consistently significant negative impact of GFCF on the ecological footprint across CCR models also validated capital formation and the ecological footprint in the FMOLS and DOLS analyses.

In summary, the CCR robustness test supported the validity of the FMOLS and DOLS analyses, indicating that the results of these models were robust reflections of the independent variable on the environmental quality of Indonesia. The consistency of the CCR results with the FMOLS and DOLS analyses across different models and variables lends confidence to the conclusions drawn about the impact of energy consumption, economic growth, and capital formation on CO2 emissions and the ecological footprint.

4.5 The results pairwise Granger causality

The results of the Granger causality analysis presented in Table 10 concerning CO2 emissions indicate that there was no causality with COAL, OIL, and GDP. However, a unidirectional causality was evident from CO2 emissions to GFCF and RE, and from GAS to CO2 emissions. Additionally, concerning the ecological footprint, the results demonstrate unidirectional Granger causality from EF to OIL, GDP, and GFCF. Furthermore, bidirectional causality was detected between EF and RE.

Table 10 Result of Pairwise Granger Causality

5 Discussion

The findings from the econometric analysis of CO2 emissions and the ecological footprint within the context of Indonesia highlight the environmental implications of the country's energy usage, economic activity, and capital formation. The results were robust based on the FMOLS and DOLS, as confirmed by the CCR model. The overview of the dynamic impact on CO2 emissions and ecological footprint is presented in Fig. 5.

Fig. 5
figure 5

Overview of the long-term impact on CO2 emissions (a), and ecological footprint (b)

5.1 Non-renewable energy, CO2 emissions and ecological footprint

Non-renewable energy, encompassing coal, gas, and oil, manifests a nuanced impact on environmental factors, particularly CO2 emissions. The results highlight a positive impact of non-renewable energy on CO2 emissions from coal and gas, aligning with the findings of Kartal et al. (2023), Voumik et al. (2023), Idroes et al. (2023b), Acaroğlu et al. (2023), Ansari (2022), Hanif et al. (2019) and Saboori and Sulaiman (2013), all of which demonstrate an increase in CO2 emissions. This substantiates the consensus on the significant contribution of coal and gas to atmospheric CO2 levels. Indonesia's heavy reliance on non-renewable energy sources, particularly coal and natural gas, has led to a significant increase in CO2 emissions, exacerbating environmental degradation and contributing to global climate change. These results underscore the urgent need for Indonesia to reassess its energy policies and expedite the transition towards cleaner alternatives. Coal, in particular, has been a major contributor to the country's CO2 emissions, as its combustion releases large amounts of greenhouse gases into the atmosphere. Additionally, while natural gas is often considered a cleaner alternative to coal, its extraction and combustion still result in CO2 emissions, albeit to a lesser extent. Therefore, both coal and natural gas worsen the environmental impact by increasing CO2 emissions levels. Given Indonesia's rich renewable energy potential, there is a compelling argument for the country to prioritize the development and deployment of these sustainable alternatives. Policymakers must implement supportive policies and incentives to accelerate the transition towards renewable energy sources, thereby mitigating CO2 emissions and promoting environmental sustainability. By reducing reliance on coal and natural gas and embracing renewable energy technologies, Indonesia can mitigate the adverse impacts of climate change, protect the environment, and secure a sustainable future.

Contrastingly, the impact of oil is more profound, especially in terms of the ecological footprint. An increase in oil usage is associated with an increase in the ecological footprint, underscoring its substantial environmental consequence. This finding underscores the broader understanding that oil, with its intricate processes and extraction methods, leaves a more conspicuous mark on ecological sustainability compared to coal and gas. Furthermore, the negative impact of oil on Indonesia's ecological footprint extends beyond just its consumption. The entire lifecycle of oil, from extraction to transportation and refining, contributes significantly to environmental degradation. Extraction processes often involve habitat destruction, soil contamination, and water pollution, leading to the loss of biodiversity and ecosystem services. Moreover, the transportation of oil through pipelines or tankers poses risks of spills, further jeopardizing fragile marine ecosystems and coastal communities. Additionally, the refining of crude oil releases toxic pollutants into the atmosphere, exacerbating air quality issues and contributing to climate change. These cumulative effects highlight the urgent need for sustainable alternatives to mitigate the detrimental consequences of oil on Indonesia's environment and biodiversity. These results are consistent with findings from various studies conducted by Ehigiamusoe et al. (2023), Kurniawan et al. (2023), Apergis et al. (2023), Salman et al. (2022), Ansari (2022), Nathaniel & Khan (2020), Destek & Sinha (2020), Usman & Makhdum (2021), and Alola et al. (2019).

Furthermore, the identified unidirectional causality from gas to CO2 emissions implies that targeting reductions in gas usage can effectively lower CO2 emissions (Lv et al. 2019). Similarly, the finding of unidirectional causality from ecological footprint to oil suggests that initiatives reducing the ecological footprint may influence and optimize oil usage. This underscores the potential for targeted strategies in both energy and environmental conservation efforts. These differentiated impacts of coal, gas, and oil on both CO2 emissions and ecological footprints emphasize the intricate nature of non-renewable energy sources' environmental repercussions. The findings underscore the necessity of adopting sustainable energy practices to mitigate adverse consequences, particularly given the significant role of these energy sources in contributing to greenhouse gas emissions. As the world grapples with the challenges of climate change, a nuanced understanding of these relationships becomes imperative for formulating effective and targeted strategies to foster a more sustainable and environmentally conscious energy landscape.

5.2 Renewable energy, CO2 emissions and ecological footprint

This study delves into the feasibility of harnessing renewable resources to foster environmental sustainability in Indonesia. With its diverse ecological landscapes and unique environmental challenges, Indonesia stands to benefit significantly from embracing renewable energy solutions. The analysis conducted in this study underscores robust results that demonstrate how renewable energy usage enhances the environment, particularly in relation to mitigating CO2 emissions and reducing the ecological footprint. This segment of the findings aligns with the CO2 emissions results reported by Khan et al. (2023), Idroes et al. (2023b), Voumik et al. (2023), Raihan et al. (2023), Li et al. (2023), Kartal et al. (2023), Acaroğlu et al. (2023), Afjal et al. (2023), Raihan and Tuspekova (2022), Rahman et al. (2022), Koc and Bulus (2020) and Acheampong et al. (2019), as well as with the ecological footprint findings from Kurniawan et al. (2023), Ehigiamusoe et al. (2023), Salman et al. (2022), Radmehr et al. (2022), Usman and Makhdum (2021), Usman and Hammar (2021) and Destek and Sinha (2020).

The Granger causality analysis reveals a unidirectional relationship from CO2 emissions to renewable energy, suggesting that shifts in CO2 emissions precede changes in renewable energy usage. These findings align with the results presented by Lv et al. (2019) and Ansari (2022). Furthermore, the results found a bidirectional causality between ecological footprint and renewable energy, showcasing a synergistic interplay. As renewable energy usage increases, the ecological footprint decreases, establishing a reinforcing feedback loop. These results support findings by Radmehr et al. (2022), Kongbuamai et al. (2021), Usman and Hammar (2021), and Nathaniel and Khan (2020).

Significant potential for mitigating greenhouse gas emissions lies within renewable energy sources such as solar, wind, hydropower, and geothermal, particularly in reducing CO2 emissions and ecological footprint, a major contributor to global climate change. Indonesia, blessed with abundant sunlight, strong winds, and extensive water resources, and ranking as the world's second-largest geothermal energy producer, is poised to transition towards renewable energy as a viable strategy for reducing its carbon footprint. The country boasts vast hydroelectric potential, estimated at approximately 75 GW, alongside a substantial biomass resource base exceeding 20 million tonnes annually, further augmenting its renewable energy capabilities. In comparison to conventional fossil fuel-based generation, renewable technologies offer a markedly smaller ecological footprint, minimizing resource extraction, air and water pollution, and habitat destruction. Embracing renewables not only aligns with global sustainability objectives but also positions Indonesia as a frontrunner in sustainable development across Southeast Asia. Through targeted investments, policy reforms, and technological advancements, Indonesia can lead the way towards a resilient, low-carbon future, ensuring enduring environmental sustainability and economic prosperity.

5.3 Economic growth, CO2 emissions and ecological footprint

The influence of economic growth emerges as a crucial factor affecting both CO2 emissions and the ecological footprint. A noticeable correlation is apparent, demonstrating that an increase in GDP corresponds to a simultaneous rise in both CO2 emissions and ecological footprint. This segment of the findings resonates with the results obtained by Maulidar et al. (2024), Li et al. (2023), Hardi et al. (2023), Yusuf et al. (2023), Idroes et al. (2023b), Raihan et al. (2023), Ehigiamusoe et al. (2023), Ansari (2022), Raihan and Tuspekova (2022), Salman et al. (2022), Kongbuamai et al. (2021), Nathaniel and Khan (2020), and Alola et al. (2019). Furthermore, unidirectional causality running from ecological footprint to economic growth means that changes in a region's environmental impact, as measured by ecological footprint, directly influence its economic output. This challenges the conventional view and highlights the importance of ecological sustainability in shaping economic outcomes. These findings align with the results presented by Tarkang et al. (2023) and Naveed et al. (2023).

This empirical results from Indonesia unequivocally demonstrate that economic growth is correlated with an increase in CO2 emissions and ecological footprint. As Indonesia undergoes rapid industrialization and urbanization, driven by economic expansion, there is a corresponding surge in energy consumption, largely reliant on fossil fuels. This reliance contributes significantly to CO2 emissions, exacerbating the country's ecological footprint. Despite efforts to mitigate these impacts through policy interventions and technological advancements, the scale and pace of economic growth often outstrip these measures, resulting in a net rise in emissions and ecological footprint. To address this challenge, Indonesia must prioritize sustainable development strategies, including investment in renewable energy sources, enhancement of energy efficiency measures, and implementation of stringent environmental regulations.

5.4 Capital formation, CO2 emissions and ecological footprint

The findings of this study indicate that an increase in capital formation is associated with a reduction in both CO2 emissions and the ecological footprint. This suggests that investments in infrastructure, machinery, and technology can lead to enhanced efficiency and cleaner production processes, ultimately resulting in lower emissions and a smaller ecological footprint. These results are consistent with the findings of Maulidar et al. (2024), reinforcing the notion that targeted investments in capital can play a crucial role in driving environmental sustainability. However, it is essential to acknowledge divergent viewpoints, such as those presented by Chekouri et al. (2023) and Aderinto and Ogunro (2021), who argued that capital formation may contribute to increased CO2 emissions. Despite these discrepancies, the potential for capital investment to mitigate environmental impact underscores the importance of implementing policies and incentives to encourage sustainable capital formation practices in Indonesia. This may involve promoting investments in renewable energy infrastructure, eco-friendly technologies, and sustainable transportation systems, alongside the implementation of rigorous environmental regulations and the facilitation of public–private partnerships. By leveraging the potential of gross fixed capital formation to reduce CO2 emissions and ecological footprint, Indonesia can advance its efforts towards achieving environmental sustainability goals while fostering inclusive and resilient economic growth.

6 Conclusion, policy implications, and limitations

This study investigates the dynamic impact of non-renewable energy sources (coal, oil, and gas), renewable energy, economic growth, and capital formation on CO2 emissions and the ecological footprint in Indonesia from 1965 to 2022. By utilizing FMOLS and DOLS, and conducting a robustness test using CCR techniques, empirical findings indicate that a 1% increase in coal and gas led to a direct increase in CO2 emissions by 0.07% and 0.18%, respectively, without affecting ecological footprints. Conversely, a 1% increase in oil led to a rise in ecological footprints by 0.16%, but not in CO2 emissions. On the other hand, an increase in renewable energy was associated with reductions in both CO2 emissions and ecological footprints by approximately 0.16% and 0.02%, respectively, thereby improving Indonesia's environmental quality. Moreover, an increase in economic growth was linked to increases in both CO2 emissions and ecological footprints by approximately 1.17% and 0.87%, respectively, while an increase in capital formation resulted in a reduction in the ecological footprint by approximately 2.23%. The Granger causality test revealed a unidirectional causality from CO2 emissions to renewable energy, with bidirectional causality between the ecological footprint and renewable energy.

In addressing environmental challenges in Indonesia, policymakers must prioritize reducing dependency on non-renewable energy sources such as coal, oil, and gas, which contribute significantly to CO2 emissions and ecological footprints. Strategies should focus on diversifying the energy mix, enhancing energy efficiency, and phasing out subsidies for fossil fuels within Indonesia's energy sector. Simultaneously, promoting the adoption and expansion of renewable energy sources, including solar, wind, hydro, and geothermal energy, is crucial. Incentives such as subsidies, tax breaks, and regulatory support should be tailored to encourage this transition, thereby reducing emissions and ecological footprints in Indonesia. Integrating environmental considerations into economic policies is imperative to ensure sustainable development amidst economic growth. Carbon pricing, environmental taxes, and emissions trading systems should be implemented to internalize environmental costs within Indonesia's economic landscape. Additionally, investment in capital formation, infrastructure, technology, and human capital should be prioritized to promote sustainable development practices specifically tailored to Indonesia's unique circumstances. This investment can lead to reduced ecological footprints and enhanced environmental management. Lastly, establishing robust monitoring mechanisms and regulatory frameworks specific to Indonesia is crucial. Strengthening environmental laws, enhancing monitoring and reporting requirements, and implementing penalties for non-compliance can effectively mitigate CO2 emissions and ecological footprints in Indonesia.

This study provides valuable insights into the dynamic impact of energy sources, economic growth, and capital formation on CO2 emissions and ecological footprints in Indonesia from 1965 to 2022. However, several limitations should be acknowledged. Firstly, the methodologies employed, while robust, may have inherent assumptions and limitations. Researchers could explore other econometric methods such as ARDL, VECM, GMM, and others to enhance the analysis. Moreover, expanding the scope to include additional economic variables, such as trade openness, foreign direct investment, and government expenditure, could offer a more comprehensive understanding of the factors influencing environmental outcomes. To address these limitations and advance understanding in this field, future studies could incorporate more granular data, extend the analysis to include recent years, explore alternative econometric techniques, and employ qualitative research methods. By addressing these gaps and avenues for future research, scholars can contribute to more robust and actionable insights for policymakers and stakeholders striving to balance economic development with environmental sustainability.