Exposing the Effects of Environmental Regulations on China’s Green Total Factor Productivity: Results From Econometrics Analysis and Machine Learning Methods

With the increasingly obvious restriction of the ecological environment on economic development, environmental regulations are widely used to achieve “green production,” that is, to improve green total factor productivity (GTFP). First, through the econometric model, it can be concluded that command-based environmental regulations could improve GTFP, while market-based environmental regulations have no significant impact on GTFP. Unlike traditional econometric models, machine learning has no specific data requirements and research assumptions. We use Lasso regression to verify the above results by obtaining the optimal tuning parameter. Furthermore, considering that the leap of China’s economy is inseparable from foreign direct investment (FDI), we use FDI as a threshold variable. The threshold model results showe that when the intensity of FDI in China ranges between 1.2492 and 1.588, both types of environmental regulations can significantly promote GTFP. These conclusions passed the robustness test. Given the differences in economy and resource endowment among different regions in China, a regional heterogeneity test is conducted. The results show that the current environmental regulations in eastern and central China have no significant impact on GTFP. However, when the intensity of FDI in central China is greater than 3.6868, environmental regulations have a significant promoting effect on GTFP. In western China, when FDI intensity ranges between 1.3950 and 1.5880, market-based environmental regulations can significantly promote GTFP. Further, the path test of the mediation effect model reveals that command-based environmental regulations reduce GTFP by reducing FDI. The above conclusions provide empirical data for the intensity of FDI in different regions of China to improve GTFP.


INTRODUCTION
Since the reform and opening up in 1978, China has adopted a sloppy production strategy in the industrial sector. While this approach and inappropriate economic growth strategies (Nathaniel et al., 2021a) have greatly contributed to the economic growth of China, China's environmental problems have become increasingly serious, for example, the haze in the Beijing-Tianjin-Hebei region in 2015 and dust storms in Inner Mongolia in 2017. Thus, achieving green development is urgently required in China. The essence of green development is to reduce resource consumption, reduce environmental pollution, and achieve comprehensive, coordinated, and sustainable development of the economic, social, and ecological environment (Wu et al., 2021a). This proposes increased requirements for national sustainability practices (Nathaniel et al., 2021b).
The Chinese government has made substantial efforts to achieve sustainable development by adopting various measures, such as establishing carbon markets and implementing environmental taxes/charges (Liao and Shi, 2018) and green energy infrastructure (Cheng et al., 2021). , and has focused on the application of hydrogen energy and fuel cell electric vehicles in ASEAN countries. Its economic competitiveness and environmental implications may inspire future developments (Li and Kimura, 2021).
Our study focuses on the effects of environmental regulations on green development. Given that the proportion of public participation in environmental protection in China is still low, the main forms of environmental regulation are command-based environmental regulations and market-based environmental regulations. The effectiveness of different environmental regulations also depends on the degree of marketization and government decision-making behavior in each region, as well as FDI (Jiang et al., 2020). Whether environmental regulations can improve the GTFP and whether this effect varies regionally in China are two issues that need to be addressed.
To quantify "green production," we used the Malmquist-Luenberger index (ML index) under the Slacks-Based Measure (SBM) model and max-Data Envelopment Analysis (DEA) to measure green total factor productivity (GTFP) in each Chinese province (except Tibet). Simultaneously, we also used China's provincial macro data to measure environmental regulation. We not only studied the impact of environmental regulations on GTFP, but also considered the impacts of FDI intensity. Considering the regional differences in China (Wu et al., 2021b), the impact of environmental regulations in various regions of China on GTFP will be studied separately. Finally, through the intermediary effect model, we explored the mechanism path of the effects of environmental regulations on GTFP.
In view of the research on environmental regulations and GTFP, few studies have introduced machine learning into this field. Moreover, traditional econometric models often have certain data requirements and research assumptions, but in reality, we cannot make assumptions about real data. Machine learning has no such limitations. Therefore, we used machine learning to introduce Lasso regression in this research field to verify the results of the traditional econometric model to achieve breakthrough research on the effect of the traditional single econometric model on environmental regulations. We hope to provide some advice for different regions of China to improve GTFP. To the best of our knowledge, few papers have focused on the effects of environmental regulations by combining econometrics and machine learning. This paper is structured as follows: Literature Review section reviews the literature, Data and Methodology section presents the data and methods used, Results and Discussion section presents the results, and Conclusion section presents the conclusions.

Measurement of GTFP
Since the last century, some scholars have attempted to obtain adjusted GDP values by deducting the market value of environmental externalities from normal GDP values (Nordhaus and Tobin, 1972), namely green GDP. However, green GDP cannot easily quantify environmental and natural resource damage. This has prompted academics to develop GTFP by considering environmental performance in conjunction with environmental variables based on traditional total factor productivity (TFP) indicators.
In the past decades, the GTFP has become an important indicator for examining the quality of China's economic development. Consequently, a large body of relevant literature has emerged (Long et al., 2016;Wang et al., 2018;Ai et al., 2020). Various studies on GTFP were conducted considering environmental performance. The main productivity measures are the traditional Malmquist index (Yue et al., 2019) and Fischer index. However, these indexes do not consider the non-desired output in the production process during measurement, consequently, leading to errors. Therefore, researchers have introduced the ML index (Wang et al., 2020), which considers a non-desired output. ML indices have also been used in combination with directional distance functions (Chung et al., 1997), which relaxed the assumption of equal proportionality between the expected output increase, energy saving, and emission reduction (Zhou et al., 2012). Zhang and Choi (2013) considered relaxation errors and infeasible solution problems to construct a total factor CO 2 emission indicator based on the non-radial directional distance function. The combination of ML and distance function considers the non-desired output while calculating GTFP, and comprehensively measures the quality of economic growth.
To summarize, because traditional methods, such as Malmquist index and Fischer index, do not account for undesirable output, we preferred to use the ML index method under the SBM model and Max DEA to calculate GTFP for all Chinese provinces (except Tibet) from 2000 to 2017.

Environmental Regulations and GTFP
Several scholars have studied the relationship between environmental regulations and TFP (Ambec et al., 2013;Zhao et al., 2015;Dong et al., 2015). Most of the earlier studies concluded that environmental regulations increased the production costs of firms, leading to varying degrees of productivity loss (Barbera and Mcconnell, 1990;Wayne and Ronald, 1998;Gray and Shadbegian, 2003;Greenstone, et al., 2012;Rexhäuser and Rammer, 2014). Moreover, manufacturing firms prefer to use cheap and polluting fossil fuels to address the rising economic policy uncertainty , which is not conducive to GTFP. However, some studies have come to a more optimistic conclusion that environmental regulations may improve productivity by forcing firms to carry out technological innovation and reduce compliance costs (Porter and Van, 1995). The above two completely opposite opinions are because researches are based on two different theories, the "compliance cost theory" and the "innovation compensation theory." Based on the classification of environmental regulations, we analyzed the effects of command-based environmental regulations and market-based environmental regulations on GTFP separately, as shown in Figure 1. The use of legislation by the government to enact a series of legal policies that can directly regulate emitters is known as command-based environmental regulations. Emission standards, manufacturing process standards, and energy or waste reduction standards are examples of specific initiatives. It is generally believed that command-based environmental regulations do not play a strong role in promoting GTFP because of its administrative nature.
The use of market mechanisms to incentivize polluters to reduce pollution is referred to as market-based environmental regulations. Emissions levies, tradable permit systems, and emission reduction subsidies are some of the specific approaches. By taking German enterprises as the research sample, Bitat (2018) found that only long-term objectives and market incentives are positively associated with eco-innovation. Greater the government's intervention in markets, greater is the incentive for firms to "rent-seek." The "rent-seeking" behavior populates most corporate innovations  and weakens the incentive for corporates' green technology innovation. This is not conducive to GTFP.
Thus, the impact of environmental regulations on GTFP is still uncertain. Environmental regulations may increase costs, thus, crowding out the amount of firms' innovation expenditure, consequently, resulting in low GTFP. However, environmental regulations may also force firms to conduct green technology innovation to promote GTFP. In addition, the impact of environmental regulations on GTFP may change with the intensity of environmental regulations or other variables. On this basis, we further considered the nonlinear relationships between environmental regulations and GTFP.

Environmental Regulations, FDI, and GTFP
In the past years, China has actively promoted FDI in the hope that it will bring advanced thinking technology, management Frontiers in Environmental Science | www.frontiersin.org November 2021 | Volume 9 | Article 779358 experience, and green technology. However, national environmental regulation policies determine whether or not FDI has a spillover effect in China. Qiu et al. (2021) suggested that the impact of environmental regulations on FDI inflows was negative. Under the constraint of environmental regulations, enterprises must increase investment in pollution control, which directly increases the cost of enterprises and reduces FDI. Murshed et al. (2021) confirmed the validity of "pollution heaven hypothesis" in South Asia. FDI inflows are detrimental to the prospects of achieving environmental sustainability within the concerned South Asian countries. Further, FDI brings forward advanced technology while causing environmental pollution in developing countries and regions (Dou and Han, 2019). Qiu et al. (2021) conducted an empirical analysis and confirmed that the "pollution heaven hypothesis" existed in the eastern and central regions of China. In addition, some scholars have pointed out that the FDI spillover effect hinders the progress of industrial technology in China. The solution is to strengthen environmental regulations (Yu and Li, 2020). However, some scholars disagreed and argued that the "pollution heaven hypothesis" was not valid in China. Some scholars have suggested that the positive interaction between FDI and environmental regulations has indirectly led China to strengthen its environmental regulations. In turn, strict environmental regulations could effectively raise the environmental threshold for foreign investment entry and played a "screening" role for FDI (Qiu et al., 2021).
In fact, there is still no unified conclusion on whether the "pollution heaven hypothesis" has been established in China. However, we observed the impact of FDI on the environmental regulations' effect on GTFP. The existing studies have focused more on the relationship between FDI and environmental regulations or GTFP, but few studies have considered FDI as a threshold variable to study the impact of its intensity change on the effects of environmental regulations. Therefore, in this study, we focused on the effect of changes in FDI intensity on the effect of environmental regulations on GTFP. We used FDI as a threshold variable to consider the effect of FDI intensity change on the effect of environmental regulations on GTFP.

Review of Research Methods
The effect of environmental regulations on GTFP is studied using the linear probability and the proportional hazards models (Ai et al., 2020), systematic generalized estimation method (GMM), dynamic count data model (Bitat, 2018), difference-in-difference (DID) model , bootstrap panel Granger causality test (Liu et al., 2021), spatial model (Peng, 2020) and evolutionary game theory (Ulph, 2000). It is concluded that environmental regulations have an "innovation compensation effect," thus, increasing productivity. The above econometric models are not only the mainstream research approaches in the study of environmental regulations and GTFP, but also one of the main methods used in this study.
In addition, in the field of environment, several researchers have used machine learning to study air pollution, CO 2 emissions, and energy consumption. Some researchers have used machine learning to identify causal relationships (Payne, 2012). Mele and Magazzino (2020) used a causal direction from depth (D2C) algorithm to derive higher pollution caused by economic growth concentrations, which may contribute to neocrown pneumonia by making the respiratory system more susceptible to infection. Similarly, Cosimo et al. (2021) used the D2C algorithm to identify and predict the causality of coal consumption, solar wind production, economic growth, and CO 2 emissions in China, India, and the United States.
Among the existing studies, most of the research on environmental regulations and GTFP has been based on econometric models. In their linear regression studies, none of the scholars have introduced machine learning into the field. Therefore, we combined econometric models with machine learning and used the least absolute shrinkage and selection operator (Lasso) regression to test the results of the econometric empirical. Subsequently, the regional heterogeneity of the impact of environmental regulations on GTFP was analyzed.

Core Variables
The explained variable included green total factor productivity (GTFP), which is the inclusion of environmental pollution caused by production as a non-desired output in the calculation of TFP. We used the ML index method under the SBM model to measure the GTFP of Chinese provinces from 2000 to 2017. According to the Malmquist-Luenberger index (ML index)-based approach proposed by Chung et al. (1997): The ML index can be decomposed into two components, the efficiency improvement index (EFFCH) and the technological progress index (TECH). An ML > 1 indicates that TFP grows. An EFFCH > 1 indicates an improvement in efficiency. A TECH > 1 indicates technological progress. ML is the growth rate of the GTFP, and t represents time. D is the production unit, and x, y, and b are the input factors, desired output, and non-desired output, respectively. The input elements include 1) the capital stock of each province: K it I it +(1-δ it )K it −1, where I it is the total fixed capital formation. δ is the depreciation rate of fixed assets, 2) the number of employed persons in each province at the end of each year, and 3) resources (standard coal) consumed by each province annually. The expected output is the total GDP of each province. The non-desired output is the industrial solid waste Frontiers in Environmental Science | www.frontiersin.org November 2021 | Volume 9 | Article 779358 emissions of each province. By applying Max DEA software, the GTFP of 30 Chinese provinces from 2000 to 2017 was measured. Core explanatory variables are market-based environmental regulations (MER) and command-based environmental regulations (IER). We used the amount of sewage charges collected by each Chinese province as a percentage of the province's GDP during 2007-2017 as market-based environmental regulations. We chose the percentage of actual pollution control investment in the GDP of each Chinese province from 2007 to 2017 as the indicator of command-based environmental regulations. The actual pollution input refers to industrial pollution control investment, construction projects' "three simultaneous" investment in environmental protection, waste gas, and wastewater pollution control facilities operating costs. Specific control variables can be seen in Table 1.

Sources of Data and Descriptive Analysis
We selected the panel data of 30 provinces, autonomous regions, and municipalities directly under the central government in China from 2007 to 2017 as sample data. All data were obtained from the China Statistical Yearbook, China Statistical Yearbook of Industrial Economy, China Statistical Yearbook of Energy, China Environmental Yearbook, and the statistical yearbooks of each province in previous years. Descriptive statistics of the variables are shown in Supplementary Table   S1. The correlations between the core explanatory variables and the explained variables are visualized and analyzed in Figure 2.
From Figure 2, GTFP is concentrated between 1.0 and 1.2. The values of IER are concentrated between 0.5 and 1.5. The values of MER are all concentrated between 0 and 0.1. IER was negatively correlated with GTFP, but MER was not correlated with GTFP. This was further validated using econometric models and machine learning.

Orthogonal Least Square Regression
To explore the relationship between the two variables, we used the regression method of econometrics. The regression model equation can be expressed as follows: where y i is the dependent variable, x i is the explanatory variable, α is the intercept term, and ε i is the residual term. For the above regression models, OLS is the most commonly used method for estimating model coefficients (Helwig, 2017). The OLS method estimates the parameters in the regression model by minimizing the error between the predicted and observed values of the outcome variable, which can provide the most accurate linear unbiased estimates for the current sample (Chartterjee and Hadi, 2006). In the standard OLS regression, the parameter estimates of the regression model can be obtained by the following optimization problem:β ols arg min However, the OLS approach focuses on unbiased estimation of the current dataset, which can easily lead to overfitting of the model (Yarkoni and Westfall, 2017).

Lasso Regression
With the rise and development of machine learning, more statistical tools have emerged. These tools continue to compensate for the limitations of the traditional methods. Among them, the regularization method represented by the least absolute shrinkage and selection operator (Lasso) method (Tibshirani, 1996) can effectively optimize OLS estimation and deal with the overfitting problem (Candes and Tao, 2007). By adding a penalty term to the model estimation, the regularization method can compress regression coefficients that are too small or zero at the cost of some estimation bias to obtain higher model prediction accuracy and model generalization capability.
Compared to the OLS estimation mentioned above, the Lasso method adds λ( p j 1 |β j |) as a penalty term (also called the regularization function): where p j 1 |β j | is the L 1 norm of β (L q norm is p j 1 |β j | q ). λ( p j 1 |β j |) denotes the penalty function and λ is the tuning parameter used to control the severity of punishment. Crossvalidation (CV), adaptive, and plugin are usually used to determine the value of λ, that is, to determine the λ that minimizes the mean square error (MSE) of the sample. When λ 0, the loss function does not penalize the model.β is the loss function of the OLS model.
In addition, there is another use of Lasso, called postselection. In other words, Lasso regression was used to screen independent variables, and then the model without penalty was used for regression. The results of this method can be used as a reference for comparing the results of various models and can also be used for variable screening. However, because too many variables were eliminated when Lasso screened variables, Zou and Hastie (2005) proposed elastic net regression, which can be represented as the following Eq. 5: where α is the penalty coefficient of the elastic net. α 0 is ridge regression, and α 1 is Lasso regression.

Threshold Model
The threshold effect refers to the phenomenon in which when one parameter reaches a certain value or range, its effect on another parameter is reversed. This threshold value is the threshold value referred to in the threshold model. Compared with the linear model, the threshold model can explore the relationship between explanatory variables and explained variables more accurately. Threshold regression eliminates the interference of subjective factors of data, and it can also complete a significance test of the threshold value when calculating the threshold value of the sample data. Its model form is as follows: where y it is the dependent variable, x it is an independent variable, q it is a threshold variable, c is the threshold value, and ε it is the interference term. The individual intercept term u i represents the fixed-effect mode. Using the indicative function I(·), the model can be simplified as follows: where x it ′ indicates other dependent variables. β 1 ′ and β 2 ′ represent the influence of x it on y it of the threshold variables under q it ≤ γ and q it > γ, respectively. Double threshold panel regression model:

Mediation Model
The mediating effect is an important statistical method. The influence of independent variable X on dependent variable Y indirectly acts on the dependent variable Y through intermediary variable M. This type of effect is an intermediary effect. According to Baron and Kenny (1986), the following model can be constructed to describe the relationship between the variables: Y i 1 + c′X + e 2 (9) M i 2 + aX + e 1 (10) where M is an intermediate variable, Y is the dependent variable, and X is an independent variable. Baron and Kenny (1986) recommend testing using Eqs 9-11. Further, the Sobel Z-test used to test the indirect path of a × b can be represented as: where s 2 a and s 2 b are the squared standard errors of a and b, respectively.
However, Zhao et al. (2010) criticized the above test method and suggested that Baron and Kenny's "three tests and Sobel" could be replaced with one test: a Bootstrap test of indirect effect Frontiers in Environmental Science | www.frontiersin.org November 2021 | Volume 9 | Article 779358 6 a × b. Thus, we adopted the Bootstrap test to test the mediating effect of environmental regulations on GTFP.

Empirical Results
To verify the effects of different types of environmental regulations on GTFP, we examined the effects of commandbased environmental regulations and market-based environmental regulations on GTFP using data from 30 provinces in China as a sample. The following panel linear regression model was constructed.
where GTFP it denotes the GTFP of province i in year t. Further, ER it denotes the environmental regulations of province i in year t, including IER it and MER it , which denote the command-based environmental regulations and market-based environmental regulations of province i in year t, respectively. Control variables include economic development level (PGDP), industrial structure (INS), intensity of research and development (INN), foreign direct investment (FDI), government intervention (GOV), and pollution control investment (POL). ξ it is the error term. We used a panel model to regress Eq. 13, and the results are listed in Table 2.
After the Hausman test, we chose a fixed-effects panel model. The empirical evidence shows that command-based environmental regulations have a negative effect on GTFP, which is significant at the 5% significance level. We believe that command-based environmental regulations increase firm costs, which is counterproductive to improving GTFP. Marketbased environmental regulations have no significant impact on GTFP. Most studies show that market-based environmental regulation provides enterprises with increased autonomy and is more conducive to stimulate the green technology innovation of enterprises (Peng et al., 2021). However, there is a time lag in the response of enterprises to market-based environmental regulation (Liu et al., 2021). In addition, the basis for the market-based environmental regulation is a sound market economy system (Zhang, 2021). China's incomplete and inadequate market economy system results in no significant effect of market-based environmental regulations on GTFP. Among the control variables, industrial structure and government intervention can significantly contribute to the development of GTFP, while other control variables have no significant effect on GTFP.

Machine Learning
Econometric models have concluded that command-based environmental regulations are negatively associated with GTFP, while market-based environmental regulations have no significant effect on GTFP. Furthermore, the above empirical results were validated by Lasso regression in machine learning.

Selection of the Optimal λ
Lasso regression is usually used to determine the value of the tuning parameter λ, that is, to find the λ that minimizes the outof-sample MSE. We selected the optimal λ based on the above four methods of CV, adaptive, plugin, and elastic network regression. It is worth noting that the default of elastic network regression is still a CV test. Initially, we compared the MSEs of the above four methods to select the optimal model. As seen in Table 3, when the core variable was IER, the elastic network regression had the smallest MSE; therefore, the optimal model should be the elastic network model. When the core variable was MER, the adaptive method of Lasso regression had the smallest MSE. Therefore, the optimal model should be the adaptive method of Lasso regression. Based on the elastic network model and adaptive method of Lasso regression, we selected the optimal λ. The penalty coefficients α of the elastic net were 0.25, 0.5, and 0.75.
According to Table 4, the core variable was IER, and when the penalty coefficients of elastic net were α 0.75 and α 0.5, seven variables were included. There were two final values of λ, but neither was optimal. When α 0.25, the optimal λ value was λ 0.0005494. The CV mean prediction error was 0.004464, which was the minimum value. When the core variable was MER, Lasso regression selected the optimal λ 0.0012456. At this time, the number of variables was 7, implying that some variables were removed. Moreover, the CV mean prediction error was 0.0044455. Figures 3, 4 indicate that λ cv is the minimum λ value under the elastic network regression cross test and Lasso regression. The optimal λ values were 0.0005494 and 0.0012456. The process of λ selection in the elastic network model and Lasso regression is shown in Table 5. As the optimal λ occurred when α 0.25, we only showed the results of α 0.25 in the elastic network regression.
As the optimal λ value had been obtained previously, the selection process for different λ values is further examined comprehensively in Table 5. When the core variable was IER, α 0.25, ID 276, and λ 0.0005494, all seven variables were entered. At this time, the minimum CV mean prediction error was 0.004464, and λ 0.0005494 was also the optimal λ. When the core variable was MER, ID 95, λ 0.0012456 and the number of variables was 6.
At this time, CV mean prediction error reached the minimum of 0.0044455, and λ is also the optimal λ. However, when ID 98, the last variable MER entered, but λ was not the optimal value, and CV mean prediction error was bigger than that of ID 95. This indicates  Frontiers in Environmental Science | www.frontiersin.org November 2021 | Volume 9 | Article 779358 8 that when λ reaches the optimal value, variable MER is not included. We further performed sensitivity analysis.
Finally, a sensitivity analysis was conducted according to the results in Table 5. The tuning parameter λ′ (ID 277/ID 94) near the optimal λ value was manually selected, and the result was denoted as "Hand." The results are shown in Supplementary Table S2 that indicated that the MSEs of the Hand was larger. Hence, λ 0.0005494 and λ 0.0012456 were the optimal λ.

Causal Inference
It has been concluded that the optimal λ 0.0005494 when the core explanatory variable includes command-based environmental regulations, and the optimal λ 0.0012456 when the core explanatory variable includes market-based environmental regulations. In this section, we explore the causal relationship between the core explanatory variables and GTFP. In this study, cross-fit partialing out Lasso linear regression was used to conduct a Lasso regression for causal inference.
Lasso regression results are shown in Table 6 and indicate that the regression coefficient of command-based environmental regulations on GTFP is negative and significant; that is, command-based environmental regulations cannot promote GTFP. The regression coefficient of market-based environmental regulations on GTFP is negative but not significant, that is, market-based environmental regulations have no impact on GTFP. These results are consistent with those of the econometric model.

Threshold Effect Model
Most of the previous studies have used linear models to study the effects of environmental regulations on GTFP. However, if the relationship between environmental regulations and GTFP is nonlinear, the former results are biased. We further analyzed the nonlinear relationships between environmental regulations and GTFP using a threshold panel model with FDI as the threshold variable.
The threshold panel model was set as given below. It is assumed that for a specific threshold ξ, the effect of environmental regulations on GTFP differs significantly when FDI ≤ ξ and FDI > ξ. GTFP it α 1 + β 11 ER it × I(FDI it ≤ ζ) + β 12 ER it × I(FDI it > ζ) where I( · ) are indicative functions. FDI is a threshold variable. β 11 and β 12 denote the coefficients of the effect of environmental regulations on GTFP for FDI ≤ ξ and FDI > ξ, respectively. First, we conducted a self-sampling test on the threshold effect of environmental regulations on the GTFP. The corresponding results are shown in Supplementary Table S3 that revealed that two types of environmental regulations had a double threshold effect on GTFP, with FDI as the threshold variable. The first and second threshold values were 1.2492 and 1.5880, respectively.
The regression results of the panel threshold model are presented in Table 7. When FDI is less than 1.2492, command-based environmental regulations are significantly unfavorable to the increase in GTFP. When FDI is between 1.2492 and 1.588, it promotes GTFP. When FDI is greater than 1.588, there is no significant influence on GTFP. Similarly, when FDI intensity is between 1.2492 and 1.588, market-based environmental regulations significantly promote GTFP. Further, at other FDI intensities, market-based environmental regulations have no significant impact on GTFP. Therefore, to enhance the promoting effect of environmental regulations on GTFP, FDI intensity must be controlled between 1.2492 and 1.588.

Robustness Test
First, we added the control variable human capital level (the natural logarithm of the average number of institutions of higher learning per 100,000 population in each province). Second, to overcome the influence of the outliers and non-randomness of GTFP on the model estimation results, we eliminated the 1% maximum and minimum values of GTFP. The results are shown in Supplementary Table S4.
The robustness results showed that command-based environmental regulations were still significantly unfavorable to the improvement of GTFP after the addition of control variable education, while market-based environmental regulations had no significant impact on GTFP. In addition, the impact of environmental regulations on GTFP had a double threshold effect, and the optimal FDI intensity should be between 1.2492 and 1.5880, so that the two types of environmental regulations could promote GTFP. After screening the outliers of GTFP, we can obtain the same results. The robustness of the results is demonstrated in Supplementary Table S4.

Regional Heterogeneity Analysis
Environmental regulations as a policy will have a time lag. In addition, traditional panel models may suffer from problems, such as endogeneity of variables, different initial conditions, and the development of each province. Therefore, China's provinces were divided into eastern, central, and western regions for  analysis. The linear and nonlinear effects of environmental regulations in different regions on GTFP were tested using the econometric model, as shown in Tables 8-11. Table 8 shows that environmental regulations in eastern China had no significant impact on GTFP. Moreover, there was no threshold effect of command-based environmental regulations on GTFP in eastern China, but there was a threshold effect of market-based environmental regulations on GTFP with FDI as the threshold variable. When FDI intensity was between 11.1268 and 11.2256, market-based environmental regulations had a significant negative effect on GTFP.
As shown in Table 9, the environmental regulations in central China had no significant impact on GTFP. However, there is a threshold effect of FDI as the threshold variable. When the FDI intensity was greater than 3.6868, both types of environmental regulation had a significant promoting effect on GTFP. Therefore, it is necessary to increase the intensity of FDI in the central region. Table 10 showed that command-based environmental regulations in western China were significantly detrimental to the growth of GTFP, while market-based environmental regulations had no significant impact on GTFP. In addition, through the threshold test, it was found that when FDI intensity was between 1.2098 and 1.2404, command-based environmental regulations had a significant hindrance effect on GTFP. When FDI intensity was between 1.3950 and 1.5880, market-based environmental regulations could significantly improve GTFP. Therefore, the optimal FDI intensity in western China should be between 1.3950 and 1.5880.

Intermediation Effect Test
In the previous econometric model and machine learning validation, command-based environmental regulations had a significant effect on GTFP. Furthermore, we analyzed the mechanism of command-based environmental regulations on GTFP. The following mediation model was developed: where t represents time, i represents the province, and μ it is a random disturbance term. The intermediate effect model estimation results are presented in Table 11.
Since the Sobel test is prone to Type I errors in the hypothesis test (Zhao et al., 2010), the Bootstrap method was used for the mediation test. The test results are presented in Table 11. The result of the bootstrap test was negative and significant at the 1% significance level, implying

Discussion
First, we studied the effects of environmental regulations on GTFP using econometric analysis and machine learning methods, such as panel models, machine learning Lasso regression. The results confirmed that the current command-based environmental regulations are significantly detrimental to GTFP, and market-based environmental regulations have no significant effect on GTFP. However, these results were not consistent with those by Zhang (2021), who argued that both types of environmental regulations promote green productivity. However, command-based environmental regulations can be effective but are often less efficient (Peng et al., 2021). Further, there is a time lag in the response of enterprises to market-based environmental regulation (Liu et al., 2021) and China's market system does not function well, which will affect the impact of market-based environmental regulations. We then used machine learning Lasso regression to confirm the previous findings and derived the optimal λ 0.0005494 and λ 0.0012456, which indicate the breakthrough of machine learning applications in estimating the effect of environmental regulation policy.
Second, we observed that when the intensity of FDI ranged between 1.2492 and 1.5880, both types of environmental regulations significantly affected GTFP. According to an analysis of regional heterogeneity, environmental regulations in eastern China have no significant impact on GTFP. Central China's environmental regulations have a significant promoting effect on GTFP when the FDI intensity is greater than 3.6868. In western China, when the FDI intensity is between 1.2098 and 1.2404, command-based environmental regulations significantly hinder GTFP. Further, when the FDI intensity ranges between 1.3950 and 1.5880, market-based environmental regulations can significantly improve GTFP. Therefore, the optimal FDI intensity in western China should range between 1.3950 and 1.5880. Moreover, command-based environmental regulations are detrimental to the increase in GTFP by reducing FDI. This is consistent with the study of Qiu et al. (2021), who reported that FDI reduces GTFP. This provides a theoretical basis for formulating environmental regulation policies according to local conditions in China.
However, our research can be improved further. First, while selecting samples, we can consider the data of other Chinese cities. However, corresponding macro data are lacking in China. Second, we only considered the impacts of FDI on the effects of environmental regulations on GTFP. Other influencing factors can be further considered in future studies.

CONCLUSION
As environmental regulations have become the main factors of environmental governance in China, whether environmental regulation can achieve a "win-win" between environmental conservation and economic development has become the focus of attention. Further, whether environmental regulations can promote GTFP is a main indicator to judge the effectiveness of environmental regulations. This is also a significant factor for China's sustainable economic development and high-quality development.
In addition to the traditional econometric models, our study also used Lasso model of machine learning, which is a breakthrough in the research of environmental regulations. Machine learning does not work on the data and model assumptions of traditional econometric models, and can better explore the causal relationship of the acquired data. We observed that command-based environmental regulations are significantly detrimental to GTFP, and market-based environmental regulations have no significant effect on GTFP. Additionally, we found that when the FDI intensity increases between 1.2492 and 1.5880, both types of environmental regulations significantly impact GTFP. There are also regional differences in the effects of FDI on environmental regulations on GTFP. Further, commandbased environmental regulations are detrimental to the increase in GTFP by reducing FDI.
The following policy recommendations are proposed: First, the intensity of FDI should be rationally controlled. When the FDI-to-fixed-assets ratio is between 1.2492 and 1.5880, command-based environmental regulations can significantly boost China's GDP. Second, reasonable environmental regulations should be selected according to regional differences because the impact of environmental regulations on GTFP varies regionally. Moreover, the introduction of FDI should also be accompanied by the establishment of a corresponding system for foreign investment, which should encourage foreign investment with advanced technologies to enter China and prevent polluting enterprises from moving to China and consider China as their "pollution heaven." Finally, the share of environmental protection expenditure in the general government budget should be further increased. Government action is a powerful signal. Increased government spending on environmental protection can release market and policy signals for green production and green consumption patterns, which influence business behavior and consumer behavior, thus, further affecting GTFP.

DATA AVAILABILITY STATEMENT
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.