1 Introduction

The recent decades have observed an immense increase in global FDI flows. FDI inflows around the world were recorded at $1.5 trillion in 2019 with an almost equal share going to both developed and developing economies. Although the advent of COVID-19 caused a collapse in FDI flows—down by 42% to $859 billion—69% of this reduction was concentrated in developed countries. Developing countries only shared 12% of this reduction, and hence, their global share jumped up to 72% (UNCTAD 2021). FDI is considered very important for developing economies since it is usually associated with rapid economic growth, employment creation, industrialization process, and improvement in the standard of living (Balsalobre-Lorente et al. 2019). For all these reasons, developing economies are competing with each other for more FDI inflows (Blanco et al. 2013).

While FDI inflows to developing economies continue to grow, its environmental consequences for the host nations are debated everywhere. To this end, theoretical literature advances competing possibilities on the relationship between FDI and environmental pollution. On the one hand, it is argued that FDI inflows to developing countries result from their lax environmental regulations, and hence, more FDI inflows will lead to environmental degradation in the host economies. This view is based on the pollution haven hypothesis (PHH), advanced by (Copeland and Taylor 1994), where globalization helps developed countries’ firms to relocate their dirty production structures to developing economies. However, an opposing view notes that FDI brings technological improvements to the country, leading to better environmental quality (Abbasi and Riaz 2016; Saud et al. 2019).

The empirical testing of the existence of PHH for developing economies comes up with competing results on the subject (see Table 1). While explaining the perplexity of these empirical outcomes, (Fu 2008) argues that the nature of FDI–pollution emissions nexus depends upon the absorptive capacity of different countries—the latter being determined by human capital. Thus, host countries with low technological capabilities—due to their low human capital—are likely to adopt obsolete technologies and hence experience more CO2 emissions. Developing on this argument, (Lan et al. 2012) assume that the level of technologies introduced by foreign firms should correspond to the education level of host economies. Symmetrically, FDI inflows lower CO2 emissions for countries having good schooling rates. The authors confirm these moderating effects of human capital in the FDI–pollution emissions nexus using regional data of the Chinese economy.

Table 1 Review of income–environment literature with FDI as a control variable

This study is an attempt to fix the perplexity of empirical outcomes on the PHH in developing countries. We argue that foreign firms’ choice of technologies can be determined by host countries’ level of schooling. Developing economies with a better level of human capital are likely to receive environment-friendly technologies, leading to less CO2 due to FDI (Fu 2008). On the other hand, countries with a low level of human capital become pollution havens for foreign firms, and hence, FDI deteriorates their environmental quality. In this way, the net effect of FDI on pollution emissions of developing countries could be determined by their level of human capital accumulation. However, the literature testing the FDI–CO2 emissions nexus simply overlooks these contingency effects of human capital. The existing studies only theorize and test the direct effects of human capital on environmental quality for different economies and bring conflicting outcomes on the subject. On the one hand, it is argued that an improvement in schooling rates will boost the consumption of non-renewable energy sources (Hill and Magnani 2002). On the other hand, an opposing view posits that more education will increase awareness about environmental threats (Lan et al. 2012) and facilitate the use of better production technologies (Williamson 2017). In this way, more education could contribute to better environmental quality. To the best of our knowledge, this study makes a maiden attempt to analyze the indirect effects of human capital on CO2 emissions, appearing through the FDI channel.

For our empirical investigation, we utilize a large panel dataset comprising 108 developing countries for the period 2000–2016. Our empirical strategy relies upon the dynamic OLS (DOLS) method which is quite widely recognized for its better small sample properties. Moreover, this method is also considered efficient for dealing with the reverse causality problem as it makes use of parametric adjustment of the residual term (Kao and Chiang 2001). In addition, we use (Brambor et al. 2006) model for finding out how the relationship between FDI and CO2 emissions changes at different levels of human capital. This method is preferred over its competing methodologies since it allows precise estimation of the level of the human capital necessary to transform the positive FDI–pollution emissions relationship into a negative one. Lastly, we examine the existence of the environmental Kuznets curve (EKC) theory, for the selected sample economies. The proponents of this theory hypothesize an inverted U-shaped relationship between income and environmental pollution (G. M. Grossman and Krueger 1991a, b). The empirical results confirm the presence of a nonlinear relationship between FDI and CO2 emissions, dependent upon the level of education.

The rest of the study is organized as follows: Next section presents a brief survey of previous literature. Section 3 reports our selected econometric methodology and the dataset. Section 4 reports our main findings. Section 5 concludes the study and presents some policy implications for developing countries.

2 Review of literature

The importance of human capital for long-run economic growth has been emphasized for a long in the literature (Becker 1964). In modern economic growth theories, human capital remains an important factor of production in explaining cross-country growth differences (Barro 1991). In addition to these desirable effects of education on economic growth, the former can also influence the environmental quality of developing economies, as mentioned earlier. Indeed, countries’ choice of a particular natural resource as well as the extent of its utilization is determined by the education level. For instance, economies with a low level of education usually rely upon pollution-intensive non-renewable energy sources (Gangadharan and Valenzuela 2001). Likewise, education also helps countries in boosting trade activities across regions and promotes automation in the production processes (Balaguer and Cantavella 2018). All this is likely to establish a positive connection between education and environmental pollution. The empirical literature supporting this direct human capital–CO2 emissions nexus includes the work by Gangadharan and Valenzuela (2001) and Cole and Elliott (2003) for their respective samples of developed and developing economies.

By contrast, more education can also lead to a better quality of environment due to varying reasons. For instance, education can increase the demand for a clean environment and hence force investors and policymakers to divert the flow of funds toward renewable energy projects. Likewise, as mentioned above, the presence of an educated labor force will motivate both local and foreign firms to introduce better production technologies, leading to both economic growth and improved environmental quality. The empirical panel data studies supporting this negative education–environmental degradation nexus include the work by Torras and Boyce (1998) and Mahmood et al. (2019). Some recent studies also test and confirm a non-linear relationship between human capital and pollution emissions and argue that both these opposing effects of education on CO2 emissions could hold at various levels of schooling (see, Balaguer and Cantavella 2018; Khan 2020). Yet another stream of literature does not find any robust relationship between education and pollution emissions and argues that both these variables move independently (Williamson 2017; Bashir et al. 2019).

Besides these competing effects of human capital on environmental quality, the former is also assumed to play a decisive role in determining the magnitude of FDI inflows to developing countries. The literature identifies a feedback relationship between the two variables since, on the one hand, human capital increases the profitability of foreign firms, while, on the other hand, FDI contributes to the skill enhancement and technological know-how of the host economies (Abbas et al. 2022). The literature testing the effects of human capital on FDI identifies competing possibilities in this relationship. To illustrate, (Rodríguez and Pallas 2008; Naanwaab and Diarrassouba 2016) and (Abbas et al. 2022) report a positive human capital–FDI relationship, whereas (Urata and Kawai 2000) support an adverse association between the two variables.

Likewise, the authors that test the impact of FDI on environmental quality also advance competing views on the subject. For instance, the opponents of globalization opine that it opens avenues for developed countries’ firms to relocate their dirty production structures to developing countries due to weak institutional structures and hence less stringent environmental regulations of the latter group. Weak pollution controls provide comparative advantage and competitiveness to developing countries, and hence, they specialize and export dirty goods to developed nations. It is also argued that developing countries may intentionally keep their environmental controls weak to become the stronger candidate for FDI inflows (Ashraf et al. 2022). Poor environmental control in developing countries also means that consumers in developed countries will enjoy the consumption of pollution-intensive goods at cheaper prices (Gill et al. 2018). This phenomenon of the production of polluted products in developing economies is named PHH in the literature. The opposing view, however, argues that PHH is not likely to exist since the growing income of developing economies, resulting from FDI, will force their policymakers to introduce stringent regulations for foreign firms (Dinda 2004). Likewise, stringent environmental policies of developed countries also can push their firms to introduce clean energies, subsequently resulting in lower marginal costs and higher productivity in these economies (Porter and Van Der Linde 1995).

Amidst all these perplexities and competing outcomes of the empirical literature on FDI, human capital, and environmental pollution, the current study tries to study the contingency effects of education in the FDI–CO2 emissions relationship. We argue that the PHH-type pollution augmenting effects of FDI hold only for developing countries with a low level of education. By contrast, when the respective economies exceed certain minimum threshold levels of schooling, FDI reduces pollution emissions, as argued by the supporters of the pollution halo hypothesis. Using a large sample of 108 developing countries and relying upon advanced econometric techniques, the study also identifies minimum threshold levels of different schooling indicators necessary to transform the ‘pollution haven’ effects into ‘pollution halo’ ones.

Lastly, our study also tests the empirical relevance of the environmental Kuznets curve (EKC) theory for the selected developing economies. The proponents of EKC theory note that economic development will initially rely upon the overuse of natural resources, making a positive relationship between GDP growth and environmental degradation. However, when income levels reach certain levels, more income will lead to better environmental quality (Grossman and Krueger 1991a, b). The empirical support for the EKC theory is mixed, and the authors generally find inflection points of income that are difficult to obtain even for developed economies (Jalil and Feridun 2011). Against this background, our study attempts to test the EKC theory for our selected developing economies.

3 Data and methodology

To perform our econometric analysis, a sample of 108 developing countries is taken for the period 2000–2016.Footnote 1 The sample economies as well as the description of variables are pasted in Appendix. CO2 emissions are measured as metric tons per capita. The control variables include GDP per capita, energy consumption, trade-to-GDP ratio (for trade openness), FDI-to-GDP ratio (for FDI inflows), domestic credit to the private sector (for financial development), and rule of law (for institutions), whereas the explanatory variable is human capital (HC)—proxied by average years of primary, secondary, tertiary, and average schooling. All the selected variables are log-transformed. The only exception is our institutional quality indicator (i.e., rule of law) since it assumes negative values in many cases. In this way, our empirical model utilizes a log-linear specification for testing the hypothesized energy–emissions relationships. Table 2 presents descriptive statistics of the selected variables. A high standard deviation as well as significant differences in the smallest and largest values can be observed.

Table 2 Descriptive statistics (2000–2016)

Our baseline theoretical model takes the following form keeping in view the above-mentioned description of variables:

$${\text{CO}}_{2} = f\left( {{\text{GDP}}, \;{\text{GDP}}^{2} , \;{\text{EC}}, \;{\text{TR}},\; {\text{HC}}, \;{\text{FD}},\;{\text{RL}}, \;{\text{FDI}}} \right)$$
(1)

Here, the variable CO2 is carbon dioxide emissions which is a pertinent measure of pollution. Concerning our main explanatory variables, GDP \(({\text{GDP}}^{2} )\) shows income per capita (income per capita square), FDI stands for foreign direct investment, and HC shows the human capital variable which is further proxied by four education variables including primary schooling (PRIM.SCH), secondary schooling (SEC.SCH), tertiary schooling (TERT.SCH), and average years of schooling (AVG.SCH) for the population age 15 years and above. Besides, to avoid the omitted variables bias, Eq. (1) also includes a set of control variables. To this end, EC is energy consumption, TR represents trade openness, FD denotes financial development, and RL symbolizes rule of law. Our baseline model, measuring the standalone effects of FDI and testing the relevance of EKC theory, takes the following form:

$$\begin{aligned} {\text{CO}}_{2\;kt} = & \propto_{1} + \propto_{2} {\text{GDP}}_{kt} + \alpha_{3} {\text{GDP}}_{kt}^{2} + \propto_{4} {\text{EC}}_{kt} + \propto_{5} {\text{TR}}_{kt} + \propto_{6} {\text{HC}}_{kt} \\ & \quad + \propto_{7} {\text{FD}}_{kt} + \propto_{8} {\text{RL}}_{kt} + \propto_{9} {\text{FDI}}_{kt} + \varepsilon_{kt} \\ \end{aligned}$$
(2)

To analyze the moderating effects of human capital in the FDI–CO2 emissions nexus, we modify the above-mentioned EKC framework by adding an interaction (product) term of human capital and FDI variables. The equation takes the form as follows:

$$\begin{aligned} {\text{CO}}_{2\;kt} = & \propto_{1} + \propto_{2} {\text{GDP}}_{kt} + \alpha_{3} {\text{GDP}}_{kt}^{2} + \propto_{4} {\text{EC}}_{kt} + \propto_{5} {\text{TR}}_{kt} + \propto_{6} {\text{HC}}_{kt} + \propto_{7} {\text{FD}}_{kt} \\ & \quad + \propto_{8} {\text{RL}}_{kt} + \propto_{9} {\text{FDI}}_{k} + \propto_{10} {\text{FDI}}_{kt} *{\text{HC}}_{kt} + \varepsilon_{kt} \\ \end{aligned}$$
(3)

In the presence of interaction term, we assume that a PHH type positive FDI–pollution emissions relationship is modified by the human capital if \(\propto_{9}\) and \(\propto_{10}\) take positive and negative signs, respectively. The empirical strategy adopted in the study encompasses five rigorous stages of analysis, detailed in the subsections below.

3.1 Cross-sectional dependence tests

It is necessary to verify whether the data exhibit cross-sectional dependency (CD). Indeed, the appropriate unit root test can only be applied based on the information on the existence or absence of CD. For this purpose, we employ the CD test statistic developed by Pesaran (2004). This test provides consistent estimates when T is large and N is small which is the case in our data. This test is based on the pairwise coefficient of correlation of the OLS residuals obtained from standard augmented Dickey–Fuller estimations for individual variables in the panel setting. The null hypothesis indicates the absence of cross-sectional dependence and the CD statistic follows a normal (N(0, 1)) distribution. The CD statistic is derived as:

$${\text{CD}} = \sqrt {\frac{2T}{{N\left( {N - 1} \right)}}\mathop \sum \limits_{k = 1}^{N - 1} \mathop \sum \limits_{m = k + 1}^{N} \hat{\rho }_{km} }$$
(4)

We selected up to 4 lags for all panel data variables and examine whether the cross-sectional dependence exists.

3.2 Panel unit root tests

A preliminary investigation before conducting a cointegration analysis comprises unit root tests. The series is expected to be either I(0) or I(1). The selection of the unit root test depends upon the existence of cross-sectional dependence described in the previous section. To analyze the unit root in the presence of cross-section dependence, the study employs Cross-Sectionally Augmented IPS (CIPS) test proposed by Pesaran (2007). These tests, commonly known as second-generation stationarity tests, offer distinctive features as compared to their predecessors proposed by Im et al. (2003) and Breitung (2001). Precisely, the test of IPS is appropriate when the cross sections (countries in our case) under analysis exhibit panel heterogeneity (Eggoh et al. 2011). The Ordinary Least Square (OLS) equation of the CIPS test for any representative economy can be written as:

$$\Delta co_{kt} = \alpha_{k} + \rho_{k} {\text{co}}_{k,t - 1} + b_{k} \overline{{{\text{co}}}}_{t - 1} + \mathop \sum \limits_{m = 0}^{p} d_{km} \overline{{{\text{co}}}}_{t - m} + \mathop \sum \limits_{m = 0}^{p} \delta_{km} \Delta {\text{co}}_{k,t - 1} + \varepsilon_{kt}$$
(5)

Here \(\overline{{{\text{co}}}}_{t - 1} = \left[ \frac{1}{N} \right]\sum\nolimits_{k = 1}^{N} {{\text{co}}_{k,\;t - 1} }\) and \(t_{k} N,\;T\) are the t-statistics of the estimate of \(\rho_{k}\) in Eq. (1) which are utilized to get the representative ADF statistics. Furthermore, using the individual CADF statistics, the CIPS test can be attained in the following way:

$${\text{CIPS}} = \left( \frac{1}{N} \right)\mathop \sum \limits_{k = 1}^{N} t_{k} \left( {N,\;T} \right)$$
(6)

Pesaran (2007) reports the tabulated critical CIPS test values for various deterministic terms.

3.3 Panel cointegration tests

Following the unit root tests, a cointegration analysis is conducted to examine the long-term association among the variables under analysis. The presence of this relationship would signify that the variables share the same stochastic trends and hence can be combined in the long run. Even if they show deviating behavior in the short run, they retain their behavior in the long run. Here, we use Pedroni (1999) cointegration test for identifying long associations among the analyzed variables. This cointegration technique relies upon seven residual-based cointegration tests, as in the standard cointegrating method of Engle and Granger (1987). The estimated parameters of this model vary across samples to account for the existence of heterogeneity in the model. It is important to note here that we can examine the stationarity of the residual under consideration and establish cointegration if the residuals are stationary at the level. The cointegration test uses the following estimation:

$$y_{kt} = \alpha_{k} + \delta_{k} t + \beta_{1k} x_{1k,t} + \beta_{2k} x_{2k,t} + \ldots + \beta_{Mk} x_{Mk,t} + \epsilon_{k,t}$$
(7)

here both y and x are assumed to be I(1). Integration among the errors can be retrieved using the following method:

$$\varepsilon_{kt} = \rho_{k} \epsilon_{kt - 1} + u_{kt}$$
(8)
$$\varepsilon_{kt} = \rho_{k} \epsilon_{kt - 1} + \mathop \sum \limits_{m = 1}^{n} \varphi_{km} \Delta \epsilon_{kt - m} + v_{kt}$$
(9)

Estimations (8) and (9) can be used for each cross-section.

3.4 Long-run parameter estimates

The dynamic OLS (DOLS) estimator was introduced by Stock and Watson (1993) to obtain the optimal cointegrating long-run parameter estimates. Within this framework, the alternative model employed in the literature is a Fully Modified OLS (FMOLS) (Al-Mulali et al. 2015). However, DOLS is preferred over OLS and FMOLS for its better-limited sample properties (Kao and Chiang (2001). Furthermore, the DOLS estimation technique is advantageous for correcting bias arising from endogeneity as it uses parametric adjustment of the error term by incorporating the past and future information of the differenced regressors. DOLS estimator also provides heterogenous cointegration which is best suitable for our panel study. Based on these distinguishing features, we employ the DOLS methodology in the current study. The following equation gives our DOLS estimator:

$$Z_{kt} = \alpha_{k} + X_{kt}^{^{\prime}} \beta + \mathop \sum \limits_{{m = - q_{1} }}^{{m = q_{2} }} c_{km} \Delta X_{k,t + m} + v_{kt} ,$$
(10)

where Z is an exogenous variable, X is a corresponding matrix of exogenous variables, \(c_{ij}\) is the coefficient of a lead or lag of the first differenced explanatory variables. The DOLS estimates are estimated from the following equation:

$$\hat{\beta }_{{{\text{DOLS}}}} = \mathop \sum \limits_{k = 1}^{N} \left( {\mathop \sum \limits_{t = 1}^{T} \hat{X}_{kt} \hat{X}_{kt}^{\prime } } \right)^{ - 1} \left( {\mathop \sum \limits_{t = 1}^{T} \hat{X}_{kt} \hat{Z}_{kt}^{ + } } \right),$$
(11)

where \(\hat{X}_{kt} = \left[ {X_{kt} - \overline{X}_{k} ,\Delta X_{i,t - q} , \ldots ,\Delta X_{k,t + q} } \right]\) is a vector of regressors, and \(\hat{Z}_{kt}^{ + }\) (\(\hat{Z}_{kt}^{ + } = Z_{kt} - \overline{Z}_{k}\)) is the transformed variable of the endogenous variable, that is CO2 emissions here.

3.5 Short-run estimates and panel causality tests

In the last step, the short-run estimates of the model are established using the panel vector error correction model (P-VECM) developed by Pesaran et al. (1999). Since the cointegration is found to have existed in the previous step, the estimator obtained through P-VECM can be used to perform Granger causality tests. The dynamic form of the P-VECM is expressed below:

$$\begin{aligned} \Delta {\text{CO}}_{2\;kt} = & \beta_{1m} + \mathop \sum \limits_{p = 1}^{s} \beta_{11kp} \Delta {\text{CO}}_{2\;kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{12kp} \Delta {\text{GDP}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{13kp} \Delta {\text{EC}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{14kp} \Delta {\text{FD}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{15kp} \Delta {\text{FDI}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{16kp} \Delta {\text{TR}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{17kp} \Delta {\text{RL}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{18kp} \Delta {\text{HC}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{19kp} \Delta {\text{HC}}_{kt - p} *\Delta {\text{FDI}}_{kt - p} + \lambda_{1k} \varepsilon_{kt - 1} + v_{1kt} \\ \end{aligned}$$
(12a)
$$\begin{aligned} \Delta {\text{GDP}}_{kt} = & \beta_{2m} + \mathop \sum \limits_{p = 1}^{s} \beta_{21kp} \Delta {\text{CO}}_{2\;kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{22kp} \Delta {\text{GDP}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{23kp} \Delta {\text{EC}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{24kp} \Delta {\text{FD}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{25kp} \Delta {\text{FDI}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{26kp} \Delta {\text{TR}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{27kp} \Delta {\text{RL}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{28kp} \Delta {\text{HC}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{29kp} \Delta {\text{HC}}_{kt - p} *\Delta {\text{FDI}}_{kt - p} + \lambda_{2k} \varepsilon_{kt - 1} + v_{2kt} \\ \end{aligned}$$
(12b)
$$\begin{aligned} \Delta {\text{EC}}_{kt} = & \beta_{3m} + \mathop \sum \limits_{p = 1}^{s} \beta_{31kp} \Delta {\text{CO}}_{2\;kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{32kp} \Delta {\text{GDP}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{33kp} \Delta {\text{EC}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{34kp} \Delta {\text{FD}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{35kp} \Delta {\text{FDI}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{36kp} \Delta {\text{TR}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{37kp} \Delta {\text{RL}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{38kp} \Delta {\text{HC}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{39kp} \Delta {\text{HC}}_{kt - p} *\Delta {\text{FDI}}_{kt - p} + \lambda_{3k} \varepsilon_{kt - 1} + v_{3kt} \\ \end{aligned}$$
(12c)
$$\begin{aligned} \Delta {\text{FD}}_{kt} = & \beta_{4m} + \mathop \sum \limits_{p = 1}^{s} \beta_{41kp} \Delta {\text{CO}}_{2\;kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{42kp} \Delta {\text{GDP}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{43kp} \Delta {\text{EC}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{44kp} \Delta {\text{FD}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{45kp} \Delta {\text{FDI}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{46kp} \Delta {\text{TR}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{47kp} \Delta {\text{RL}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{48kp} \Delta {\text{HC}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{49kp} \Delta {\text{HC}}_{kt - p} *\Delta {\text{FDI}}_{kt - p} + \lambda_{4k} \varepsilon_{kt - 1} + v_{4kt} \\ \end{aligned}$$
(12d)
$$\begin{aligned} \Delta {\text{FDI}}_{kt} = & \beta_{5m} + \mathop \sum \limits_{p = 1}^{s} \beta_{51kp} \Delta {\text{CO}}_{2\;kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{52kp} \Delta {\text{GDP}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{53kp} \Delta {\text{EC}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{54kp} \Delta {\text{FD}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{55kp} \Delta {\text{FDI}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{56kp} \Delta {\text{TR}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{57kp} \Delta {\text{RL}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{58kp} \Delta {\text{HC}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{59kp} \Delta {\text{HC}}_{kt - p} *\Delta {\text{FDI}}_{kt - p} + \lambda_{5k} \varepsilon_{kt - 1} + v_{5kt} \\ \end{aligned}$$
(12e)
$$\begin{aligned} \Delta {\text{TR}}_{kt} = & \beta_{6m} + \mathop \sum \limits_{p = 1}^{s} \beta_{61kp} \Delta {\text{CO}}_{2\;kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{62kp} \Delta {\text{GDP}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{63kp} \Delta {\text{EC}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{64kp} \Delta {\text{FD}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{65kp} \Delta {\text{FDI}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{66kp} \Delta {\text{TR}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{67kp} \Delta {\text{RL}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{68kp} \Delta {\text{HC}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{69kp} \Delta {\text{HC}}_{kt - p} *\Delta {\text{FDI}}_{kt - p} + \lambda_{6k} \varepsilon_{kt - 1} + v_{6kt} \\ \end{aligned}$$
(12f)
$$\begin{aligned} \Delta {\text{RL}}_{kt} = & \beta_{7m} + \mathop \sum \limits_{p = 1}^{s} \beta_{71kp} \Delta {\text{CO}}_{2\;kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{72kp} \Delta {\text{GDP}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{73kp} \Delta {\text{EC}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{74kp} \Delta {\text{FD}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{75kp} \Delta {\text{FDI}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{76kp} \Delta {\text{TR}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{77kp} \Delta {\text{RL}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{78kp} \Delta {\text{HC}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{79kp} \Delta {\text{HC}}_{kt - p} *\Delta {\text{FDI}}_{kt - p} + \lambda_{7k} \varepsilon_{kt - 1} + v_{7kt} \\ \end{aligned}$$
(12g)
$$\begin{aligned} \Delta {\text{HC}}_{kt} = & \beta_{8m} + \mathop \sum \limits_{p = 1}^{s} \beta_{81kp} \Delta {\text{CO}}_{2\;kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{82kp} \Delta {\text{GDP}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{83kp} \Delta {\text{EC}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{84kp} \Delta {\text{FD}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{85kp} \Delta {\text{FDI}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{86kp} \Delta {\text{TR}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{87kp} \Delta {\text{RL}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{88kp} \Delta {\text{HC}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{89kp} \Delta {\text{HC}}_{kt - p} *\Delta {\text{FDI}}_{kt - p} + \lambda_{8k} \varepsilon_{kt - 1} + v_{8kt} \\ \end{aligned}$$
(12h)
$$\begin{aligned} \Delta {\text{HC}}_{kt} * \Delta {\text{FDI}}_{kt} = & \beta_{9m} + \mathop \sum \limits_{p = 1}^{s} \beta_{91kp} \Delta {\text{CO}}_{2\;kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{92kp} \Delta {\text{GDP}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{93kp} \Delta {\text{EC}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{94kp} \Delta {\text{FD}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{95kp} \Delta {\text{FDI}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{96kp} \Delta {\text{TR}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{97kp} \Delta {\text{RL}}_{kt - p} \\ & \quad + \mathop \sum \limits_{p = 1}^{s} \beta_{98kp} \Delta {\text{HC}}_{kt - p} + \mathop \sum \limits_{p = 1}^{s} \beta_{99kp} \Delta {\text{HC}}_{kt - p} *\Delta {\text{FDI}}_{kt - p} + \lambda_{9k} \varepsilon_{kt - 1} + v_{9kt} \\ \end{aligned}$$
(12i)

where \(\Delta\) shows that the variable is in the first-difference form. For all the equations from 12a to 12i, the causality relationship is established if \(\lambda\) is significant using a t-statistic of the error correction term, \({\varepsilon }_{it-1}\).

4 Results and discussion

This section summarizes the main results of all the four-step investigations, described earlier, for our sample of 108 developing economies. Table 3 presents the outcome of CD tests. The tests indicate the existence of cross-sectional dependence at all 4 lags. This presence of CD leads us to the application of the second-generation unit root test, proposed by Pesaran (2007). Table 4 reports our results of Pesaran (2007) panel unit root test at both levels and the first differences of the included variables. At a 1% level of significance, the outcomes of this test show that most of the variables except FDI are non-stationarity at the level. Overall, the stationarity tests confirm that our included variables are stationary at 1st difference. Additionally, mixed stationarity of the variables at the level also makes the choice of DOLS suitable for testing the growth–emissions nexus in the selected developing economies.

Table 3 Results of cross-sectional (CD) dependence test
Table 4 CIPS Pesaran (2007) panel unit root test results

Table 5 presents the outcomes of Pedroni (1999) cointegration test for the selected panel series. For all the seven test statistics of the Pedroni panel cointegration test, the results overwhelmingly support the presence of a long-run cointegrating relationship between CO2 emissions, income, energy use, financial development, FDI, trade openness, rule of law, and human capital. These results are robust across all four proxies of education, namely, primary, secondary, tertiary, and average years of schooling. These outcomes complement the previous studies showing a long-run cointegration relationship between CO2 and its main determinants (see Hafeez et al. 2018; Pao and Tsai 2011; Bilan et al. 2019). Recently, Nasir et al. (2019) support a long-run cointegrating relationship between CO2 and its main determinants for selected ASEAN-5 economies.

Table 5 Pedroni panel cointegration tests

After the confirmation of the long-run cointegration relationship among the included variables, our next task is to precisely measure the impact of FDI on CO2 emissions and to test the moderating role of human capital in the FDI–CO2 emissions nexus, as hypothesized by this study. This is achieved through the DOLS model which is considered a preferred methodology (Abid 2017) since it chooses lagged and lead variables in the model to control the errors of autocorrelation on the error term Uit. The results of this estimation process along with the important diagnostic tests are reported in Table 6. Here we discuss the most notable outcomes of our DOLS regressions. In specification 1, we report the DOLS regression results of Eq. (2). Here, the coefficient of the GDP variable is positive showing a direct relationship between income and pollution emissions for the selected developing economies. This direct effect of the linear income variable is in line with a vast majority of literature showing the adverse effects of economic activity on the environmental quality of different countries. Indeed, a higher income leads to more use of energy input for production and consumption purposes and hence causes environmental degradation (see Abid 2017; Wang et al. 2016).

Table 6 FDI, human capital, and CO2 relationship: dynamic OLS estimations

However, this positive coefficient of the GDP variable does not reveal a complete picture of income–emissions nexus since the coefficient of the quadratic term of income variable is negative and statistically significant showing that more income could reduce environmental degradation once the selected economies exceed certain levels of GDP. The negative sign of the income square coefficient also lends support to the environmental Kuznets curve (EKC) hypothesis. As per the proponents of EKC theory, in the beginning, countries meet their energy demand through fossil fuel making a positive relationship between income and pollution emissions. However, once the income level reaches a certain level, more income leads to higher public pressure and more resources for the use of renewable energy. These actions lead to better environmental quality after the inflection point of EKC (Grossman and Krueger 1991a, b). Based on the coefficient estimates of income and income square variables, the turning point of EKC is 9.89 and its anti-log gives USD 19,732 as the threshold level of income for our panel economies. These threshold estimates seem quite achievable compared to some other studies that find very high levels of income as inflection points of the EKC even for developed countries (Rodríguez et al. 2016; Abid 2017). Our results regarding the existence of EKC are consistent with some recent studies including (Apergis 2016; Khan and Eggoh 2021; Balaguer and Cantavella 2018). Indeed, a higher level of income creates awareness about clean energy, increases public pressure for renewable energy sources, and leaves public funds for RandD in clean energy technologies. All this develops a positive relationship between income and better environmental quality for the rich economies.

The next covariate, energy consumption, exhibits a positive relationship signifying a pollution-augmenting role of energy use for the panel countries. The coefficient of this variable is around 0.69 showing that a 1% increase in energy consumption causes a 0.69% increase in pollution emissions. Energy use remains a very important covariate of the empirical growth–environment literature, and most of the studies find its positive effect on CO2 emissions (see Table 1). Financial development also remains positive and significant illustrating the fact that financial intermediation brings more pollution-intensive activities in the sample economies. In the previous energy–environment literature, some authors argue that financial development facilitates credit access to buy more consumer goods and promotes business activities, all leading to higher CO2 emissions (Sadorsky 2011). Our results are consistent with this school of thought reporting the direct relationship between financial development and CO2 emissions.

The standalone effects of the FDI variable on pollution emissions are also positive and significant, reflecting the fact that higher foreign investment in developing economies could cause environmental degradation in these countries (Cole et al. 2005). Indeed, as argued by the opponents of globalization, in developing countries, the scale effects of FDI dominate its technique effects. The dominance of scale effects in developing countries implies that FDI will fuel economic activities causing depletion of natural resources and degradation of environmental quality (Antweiler et al. 2001). This direct relationship between the two variables, widely known as PHH, has been supported by a large number of studies in the literature (Solarin et al. 2017). However, these results contradict the findings by (Rafique et al. 2020) who report a negative effect of FDI on CO2 emissions of the BRICS economies. A similar justification comes for our trade openness variable, where we find its positive and significant effect on pollution emissions of the selected developing economies. Indeed, globalization and increased openness to trade are the main responsible factors for a rapidly increasing share of developing countries in global CO2 emissions (Ertugrul et al. 2016). Carvalho et al. (2013) argue that globalization and trade openness are also responsible for the turning points of EKC since these factors allow developed countries to shift their dirty industries to developing economies and hence reduce their national emissions.

The institutional quality indicator, rule of law, appears negative and significant at the conventional level. As argued by several studies in the previous literature, a strong governance quality enhances cooperation and minimizes opportunism (Panayotou 1997), controls market failure (Olson 1996), and forces firms to follow pollution control procedures (Welsch 2004). An improvement in institutional quality is also considered to be adversely linked to the speed of deforestation (Bhattarai and Hammig 2001). By contrast, countries with weak governance quality opt for sub-optimal decision-making concerning the use of their natural resources and overall pollution policies (Lopez and Mitra 2000). Our results are consistent with some recent studies showing an adverse relationship between institutional quality and pollution emissions in emerging economies (see, Sarkodie and Adams 2018; Zakaria and Bibi 2019).

The last variable of specification 1, human capital—represented by primary years of schooling—comes with a negative sign illustrating the pollution-inhibiting effects of this variable. The earlier literature presents opposing views on the relationship between education and environmental quality. On the one hand, it is assumed that more education will spur the consumption of non-renewable energy resources (Hill and Magnani 2002) and increase economies’ reliance on machines for both production and consumption purposes (Balaguer and Cantavella 2018). All this, in turn, increases the emissions of hazardous gases into the environment. However, more education can also enhance environmental quality by promoting the use of environmentally friendly technologies (Williamson 2017) and increasing awareness among masses concerning the environmental threats (Lan et al. 2012). Our results support this direct relationship between education and the environmental quality of the selected panel economies.

Our results of specification 2 are based on Eq. (3) where we estimate the indirect effects of human capital via the FDI channel. As hypothesized by this study, the pollution haven effects of FDI can be translated into pollution halo effects if the respective countries improve their education levels and hence facilitate the inflow of environmentally friendly technologies from abroad. To test this hypothesis, the present study introduces a multiplicative interaction term of human capital and FDI in specification 2. The negative and significant coefficient of this variable illustrates that the adverse effects of FDI on environmental quality are mitigated with improvements in schooling. Improvement in educational levels not only facilitates the adoption of environmentally friendly technologies but also generates social pressure on policymakers to introduce stringent legislation regarding the FDI inflows (Lange and Ziegler 2017; Balaguer and Cantavella 2018). These outcomes of the moderating effects of human capital in the FDI–pollution nexus are in line with the findings of Lan et al. (2012) for China. In specifications 3–8 of Table 6, we test the robustness of these two models using secondary, tertiary, and average years of schooling, respectively.

Although the multiplicative interaction terms confirm the presence of moderating role of human capital in the FDI–pollution nexus, we cannot precisely analyze how this relationship evolves with improvements in schooling rates and associated thresholds. To study this evolution and to precisely gauge the moderating effects of human capital, we rely upon the graphical methodology, proposed by Brambor et al. (2006). An interesting feature of this methodology is that its use allows us to observe the FDI–CO2 emissions relationship at different levels of schooling. Relying upon DOLS estimations, we retrieve this graphical depiction for all four proxies of human capital. These results are reported in Fig. 1. As can be noticed, the PHH-type positive FDI–CO2 emissions relationship is present only for countries with low levels of schooling. Taking the case of primary schooling (Fig. 1A), here the marginal effects of FDI on CO2 emissions remain positive for economies having the (log) value of education below 1.2. For economies having primary schooling rates between 1.2 and 1.8, the effects of FDI on pollution emissions remain insignificant. Lastly, for economies having the (log) value of primary education above 1.8, FDI inflows reduce environmental pollution. In this way, for countries with good performance on schooling fronts, the undesirable effects of FDI turn into pollution halo effects due to improved technologies introduced by foreign firms (Tang and Tan 2015).

Fig. 1
figure 1

Human capital and FDI–CO2 emissions nexus

The final step of our empirical investigation comprises testing the short-run and long-run relationship between CO2 emissions and our selected covariates in the presence of moderating terms. These results are reported in Table 7. In the majority of the cases, the short-run bidirectional causality with CO2 emissions is confirmed for income and energy consumption. The long-run effects, however, reveal a very strong connection between CO2 emissions and the included variables including FDI, human capital, and their constitutive terms using all four proxies of schooling.

Table 7 Panel VECM based on Granger causality test results

5 Conclusion and policy implications

The recent decades have observed increasing trends in FDI inflows to developing countries, mainly due to the process of globalization. FDI is considered beneficial for emerging economies as it brings investment to these capital-scarce countries and introduces them to new technologies and production systems. However, the opponents of globalization argue that FDI will make developing nations a pollution haven in the advanced countries and the latter will shift their production of pollution-intensive goods to the former group. This phenomenon, commonly known as the pollution haven hypothesis (PHH), has been widely investigated by numerous studies, albeit the results support competing possibilities on the existence of a positive FDI–pollution nexus.

The perplexing results of the earlier literature on the existence of PHH become the main motivation of this study. We argue that the nature of the FDI–CO2 emissions relationship can be determined by developing economies’ stock of human capital. This is because foreign firms’ choice of particular technologies depends upon host countries’ level of skills as well as their adaptability to advanced technologies. For countries having a low level of human capital, foreign firms will mainly rely upon obsolete technologies and will only come to benefit from cheap labor, large consumer markets, and lax environmental regulations. However, for countries with an educated labor force, foreign firms will not be reluctant in introducing advanced and environmentally friendly technologies. This will contribute to both higher GDP and better environmental quality of the host economies. Our study tests this hypothesis by employing large panel data from 108 developing countries over the period 2000–2016. For testing this moderating effect of human capital in the FDI–CO2 emissions nexus, we use panel data techniques including dynamic OLS (DOLS) and panel vector error correction (P-VECM) models. To analyze the evolution of the FDI–CO2 emissions relationship at different levels of human capital, we use a graphical method by Brambor et al. (2006).

Our empirical findings confirm the existence of PHH for the selected sample economies. More importantly, for all four proxies of education, the positive FDI–pollution emissions relationship exists only for countries with a low level of schooling. When schooling levels exceed certain limits, the PHH turns into a pollution halo hypothesis where more FDI starts contributing to better environmental quality in developing countries. Furthermore, we also confirm the existence of EKC for the sample economies. Concerning our control variables, energy consumption, financial development, and trade openness increase CO2 emissions, whereas a better institutional quality (rule of law) reduces the latter. The results of the study have important policy implications for developing countries. While the relevance of FDI for rapid economic growth has been widely acknowledged by policymakers, the opponents of globalization warn against the adverse environmental consequences of FDI for developing economies. Based on these outcomes, we can conjecture that the desirable effects of FDI on environmental quality can be enjoyed if developing countries invest in education and improve their readiness for the absorption and adaptability of new technologies. Indeed, as shown by our empirical results, human capital is a prerequisite of globalization not only for stable long-run economic growth but also for the sustainability of economic development. This also implies that countries can invest in specific skills that will make adaptability and absorption of FDI-related energy-efficient technologies easy for local firms. The negative sign of rule of law variable also implies that improvements in governance quality may have beneficial effects on their environmental quality. Indeed, a strong institutional quality increases incentives (punishment) for respecting (violating) the environmental standards by both local and foreign firms. Developing countries should therefore focus on adherence to the ‘rule of law’ for better economic performance and low pollution emissions. The present study tests the existence and sensitivity of PHH concerning the human capital variable. Future work can extend this framework and test the relevance of other socio-economic and political factors for a positive FDI–CO2 emissions relationship. For example, future studies could analyze how countries' regulatory environment and/or their overall institutional quality could moderate the effects of FDI on CO2 emissions.