Going Green or Going away?A Spatial Empirical Examination of the Relationship between agglomeration and green total-factor productivity in the context of the carbon emissions peak

In the context of carbon emissions peak, environmental issues highlight the importance of the green economy, how does economic agglomeration release growth potential and enable the coordinated development of the economy and environment? There are few works of literature to analyze it within the framework of spatial economy. This paper constructs a theoretical model to clarify the influence mechanism of economic agglomeration on green total factor productivity (GTFP), and then uses a dynamic SDM model to test the theoretical hypothesis. This contribution has three main findings. First, there is a "U-shaped" curve relationship between economic agglomeration and GTFP, and the formation mechanism is that economic agglomeration has a threshold effect on the agglomeration externalities such as infrastructure sharing, knowledge spillover, and labor market upgrading. Second, the mismatch of industrial structure is an important reason that the economic agglomeration in this region has not produced an obvious spatial spillover effect on other regions; Relaxing restrictions on the concentration of economic activity to regional centers would contribute to the improvement of GTFP. Third, GTFP has the classic "snowball effect" in the time dimension, but has the obvious "warning effect" in the space and time dimension. Based on this, this paper believes that at the present stage, it is necessary to adapt to the layout of economic geography, promote the rational allocation of human resources in the territorial space, promote the coordination between economic agglomeration and the development goal of green economy, and at the same time, it is necessary to cultivate the cooperative linkage mechanism of green economy development and transformation among cities.


Introduction
Over the past 40 years of reform and opening-up, China has made great achievements in economic development and created the Eastern Growth Miracle. The economic agglomerations represented by the Yangtze River Delta, the Pearl River Delta, and the Beijing-Tianjin-Hebei urban agglomeration are playing an increasingly significant role in leading China's economic growth. According to data from China's seventh census in 2021, labor force and economic activities are further concentrated in regional central cities and urban agglomerations. Urban agglomerations will become a new driving force for China's economic growth (Lu Ming et al., 2019;Wang Yiming, 2020).
The rise of urban agglomerations has aroused scholars' attention to the phenomenon of economic agglomeration. Some scholars believe that economic agglomeration is conducive to improving the efficiency of production factors, which can make the factors better match between the supply side and the demand side to save production costs (Pierre et al., 2012). Economic agglomeration can also reduce the transportation cost per unit distance by sharing regional infrastructure (Daniel, 2007).In addition, economic agglomeration also has positive effects such as sharing knowledge spillover (Greenstone et al., 2010) and an advanced labor market (Ines, 2020).
However, some scholars believe that economic agglomeration, as a compact spatial economic behavior, will not only bring about the expansion of output scale but also increase energy consumption and pollutant emission. Furthermore, the increased discharge of industrial and domestic wastewater will lead to the lack of clean drinking water, and the excessive emission of soot and sulfur dioxide will lead to the deterioration of air quality. It harms the healthy and sustainable development of urban agglomeration and greatly limits the international competitiveness of the city. Taking Chinese cities as research samples, some scholars have listed empirical evidence of environmental decline caused by the concentration of economic activities (Sun & Yuan, 2015;Liu et al., 2017;Wang et al., 2020;Lan et al., 2021). In particular, Cheng (2016) incorporated the spatial effect into the model species and concluded that the agglomeration would aggravate local and adjacent environmental deterioration. Liu et al. (2018) considered both the time lag effect and spatial effect and found that the agglomeration was an important factor causing environmental pollution. Chen et al. (2017) investigated the impact of economic agglomeration on environmental quality from a micro perspective and found that the spatial concentration of enterprises and economic activities would aggravate the carbon dioxide emission in the agglomeration area. According to the conclusions of the existing literature, economic agglomeration may cause the target cities to face serious resource and environmental problems, which is closely related to the current green economic development transition in China.
The 19th National Congress of the Communist Party of China pointed out that China's economy has shifted from a stage of high-speed growth to a stage of high-quality development, and is in a crucial period of "transforming the development model, optimizing the economic structure, and changing the growth drivers". China's economic development must shift to a green model with comprehensive consideration of "economic growth, resource conservation, and environmental friendliness". On the one hand, China's 14th Five-Year Plan Proposals in 2021 have made it clear that we will strive to achieve a "carbon peak" around 2030 and achieve "carbon neutral" by 2060. As environmental issues highlight the importance of energy conservation and emission reduction, green economic development is not only an objective requirement driven by resource and environmental problems but also reflects China's responsibility as a major country in global environmental pollution prevention and control. On the other hand, as a developing country, "development is the top priority". To meet the food, clothing, and employment needs of its 1.4 billion people, China should not focus on environmental quality while ignoring economic growth. The emphasis on green economic development is to coordinate between carbon dioxide emissions, environmental protection, and economic growth efficiency, whose core lies in the improvement of green total factor productivity and the optimization of the allocation efficiency of production factors. Economic agglomeration, as a kind of reconfiguration behavior of production factors in space, is bound to have a close relationship with the development of the green economy.
Will economic agglomeration and thus the spatial reconfiguration of labor force become the main theme of China's green development transition? As a typical fact in the process of China's regional economic development, is economic agglomeration to promote green economic development, which is the vision of The Times pursued by all countries in the world today, or to go against the trend? This is a question worth exploring. If the concentration of labor and economic activities has a positive effect on the development of a green economy, then China's current regional development strategies, such as new urbanization and urban agglomeration economy, coincide with the development goals of the green economy. On the contrary, it indicates that there is a deviation between economic agglomeration and the development goal of the green economy. Answering the above questions will help deepen the understanding of the relationship between economic agglomeration and green economic development, and provide important decision-making references for China to achieve green economic transformation and development. In addition, in the context of "carbon peak", seeking an effective way to support the development of a green economy has become a hot issue of concern to all countries. As the world's second-largest economy and the largest primary energy consumer, it is undoubtedly a huge challenge for China to achieve resource conservation and environmental improvement while achieving economic growth. Solving China's problems well will provide "Chinese wisdom" and "Chinese solutions" for countries around the world to achieve green economic transformation and development.
The existing literature provides abundant evidence for understanding the effects of economic agglomeration on economic growth and environmental pollution, but it is worth emphasizing that these studies have neglected the comprehensive effects of agglomeration on both. In this paper, "green total factor productivity", a comprehensive index considering economic growth, resource conservation, and environmental protection, is selected as the explained variable to explore the impact of economic agglomeration on green total factor productivity. Secondly, this paper argues that the reasons for the inconsistent conclusions on the effects of economic agglomeration on economic growth and environmental pollution may be that endogenous problems caused by reverse causality have not been effectively dealt with. Finally, few studies on the effects of economic agglomeration on environmental pollution and economic growth have considered the spatial correlation of variables. This paper argues that neglecting regional spatial correlation may lead to bias in the conclusion.
Compared with the existing studies, the possible marginal contributions of this paper are as follows: First, it expands the research framework for analysis of the influencing factors of green TFP from the perspective of labor and economic activity agglomeration. The synergy between agglomeration and green economic development is an important perspective to understand the transformation of the economic development model. However, the existing literature mainly considers the impact of FDI , market structure (Lin & Chen, 2018), environmental regulation (Wang et al., 2018), and technological progress (Ying et al., 2021) on green TFP. It ignores the important role that economic agglomeration may play. Second, this paper expands the production density model of Ciccone & Hall (1996) and Boqiang Lin and Ruipeng Tan (2019), takes into account the spatial correlation caused by labor mobility and agglomeration externalities and puts forward the theoretical hypothesis that there is a "U" curve relationship between economic agglomeration and green TFP. Furthermore, using the panel data samples of 281 cities at prefecture level and above in China from 2003 to 2018, the dynamic spatial Dupin model combined with exogenous tool variables and generalized moment estimation of the system is used to control the spatial lag effect, time lag effect and endogenous problem of green TFP. This paper demonstrates the importance of new-type urbanization and urban agglomeration economic construction to China's green economic growth, and provides reliable empirical support for understanding the important role of economic agglomeration in the process of China's transition to "green development".

Theoretical analysis and research hypothesis
Some related studies represented by Ciccone & Hall (1996) systematically explained the positive externalities of agglomeration using the production density function. This provides a good idea for this paper to explore the mechanism of urban green TFP promotion from the perspective of economic agglomeration, but the production density model does not consider the regional spatial correlation caused by labor mobility and agglomeration externalities. In this paper, we will further introduce spatial interaction into the production density model to derive some theoretical predictions that may be useful for future empirical studies. The production function of the representative city is set as: Where, qi represents the output per unit land area of the city i; Q is total output; S represents the total land area of the city; A refers to the efficiency of economic output that simultaneously considers labor, capital, energy, expected output, and non-expected output in production activities, namely green TFP; l, k, and e respectively represent the number of labor, physical capital, and energy input per unit land area; α (α∈ (0,1)) represents the return of factor input per unit area; β and γ (β, γ∈ (0,1)) represent the output elasticity of labor and resources, respectively. λis the density coefficient (λ > 1), and (λ-1) / λ represents the externality of agglomeration. The larger λ is, the stronger the positive externality of economic agglomeration will be.
Assuming that the input elements are evenly distributed on the land of each city, the total output of the city (i) can be expressed as: Where Li, Ki, and Ei represent the total number of employed people, total capital stock, and total energy consumption of city (i) respectively. Divide both sides of Equation (3) by L, then the total output per capita can be expressed as: It is assumed that the factor market is of the good nature of perfect competition, which means that in equilibrium, the marginal product value equal to the price of the factor holds: Where, r and Pe represent the market price of capital and energy respectively. Now define According to Equation (4), Equation (3) can be rewritten as: According to the study of Ertur & Koch (2007), it can be judged that green TFP not only depends on the factor endowments and characteristic variables of the city itself but also is influenced by other cities in the economic system. For example, in the potential model, Drucker & Feser (2012) discussed the spatial effect of the Marshall agglomeration economy and believed that economic agglomeration could go beyond regional boundaries and have an impact on the productivity of neighboring areas. This paper assumes that the interdependence of green TFP between cities works through the agglomerated spatial externalities and that the externalities generated by the agglomeration of population and economic activities in one city will break through the city boundaries and extend to other cities. However, such inter-city boundary effect is affected by frictional factors such as geographical distance and economic system difference, and the intensity of spatial spillover of agglomeration decreases with the increase of the disturbance. According to the above analysis, green total factor productivity (A) can be set as: Where, Gi is the green TFP of the city i; ξ and ζ indicate the interdependence degree of green TFP and economic agglomeration between cities. wij is the exogenous friction term (j=1,2..., N and j ≠ i), represents the degree of association between city i and j. The larger the value is, the larger the association is, and w∈ [0,1]; N is the number of cities. Substituting Equation (6) into Equation (5) and taking its logarithm further, we can get: According to Equation (7), green TFP is not only related to the level of regional economic agglomeration but is also affected by the degree of green TFP and economic agglomeration in surrounding areas. In addition, the impact of economic agglomeration on green TFP is characterized by periodic changes, that is, under different agglomeration levels, the impact direction of economic agglomeration on green TFP may be different. This article will discuss this through comparative static analysis.
Because the land area is relatively fixed, with the increase of labor input, the factor input will deviate from the optimal allocation level of "labor-land" and the marginal output of labor input per unit of land will decrease gradually under the condition of Hicks neutral technology. This efficiency loss caused by additional factor input per unit of land is called by Ciccone & Hall (1996) the "congestion effect" of agglomeration. At the initial stage of agglomeration, i.e., when λ < 1/α, At this stage, economic agglomeration is at a low level, and the increase of agglomeration is not conducive to the improvement of green TFP. However, as long as λ is large enough, i.e., when λ > 1/α, there ) ( -1)＞ , then the increase of agglomeration degree will be beneficial to the improvement of green TFP. This indicates that when the degree of economic agglomeration exceeds the critical value (1/α), the positive externalities of agglomeration will be enough to compensate for the efficiency loss caused by the above congestion effects.
In the early stage of agglomeration, driven by infrastructure, output structure, labor market structure, and other factors, the population, and economic activities continue to gather to the central cities, and the attractiveness of urban elements continues to strengthen, and the degree of economic agglomeration increases accordingly. The increase of factor input per unit land area leads to the expansion of production capacity, but at the same time, it will lead to the increase of energy use density and pollutant emission (Ren et al., 2003), and this increase is greater than the energy-saving and emission reduction effect brought by the agglomeration positive externalities such as economies of scale, facility sharing, knowledge spillover, and industrial structure upgrading. From the point of empirical fact, for the lower level of economic agglomeration areas, the factors of price and environmental regulation intensity are relatively low, may attract some other areas the inflow of high energy consumption, high pollution industry, although the increase of output, but also has adverse effects on the environment quality, and the output increase profits often cannot make up for the loss of environmental degradation to. Therefore, when the degree of agglomeration is low (λ < 1/α) and the positive externality of agglomeration is low ((λ-1) / λ is small), the improvement of economic agglomeration has an inhibiting effect on green TFP.
Furthermore, when the degree of economic agglomeration is high enough (λ > 1/α), the positive externality of agglomeration can be significantly manifested (λ-1 / λ is large). First of all, economies of scale will effectively promote the improvement of resource utilization efficiency and centralized pollutant treatment capacity (Krugman, 1998). Secondly, the structure of output will begin to shift towards low-pollution services and knowledge-intensive industries. Thirdly, knowledge spillover will contribute to technological progress (Balaguer & Cantavella, 2018). The application of clean technology will reduce the pollution level per unit output, and the development of pollution control technology can also reduce environmental pollution to a certain extent. Finally, the advancement of the labor market will enhance the public's demand for a high-quality environment, and thus enhance the intensity of environmental regulation. Under the comprehensive action of these factors, for cities whose economic agglomeration level has reached a certain level, a higher agglomeration level means greater positive externalities of agglomeration economy. At this time, the improvement of agglomeration degree will be conducive to the improvement of green TFP. Based on the above analysis, this paper proposes the following hypotheses to be tested: Hypothesis 1: After other conditions remain unchanged, with the increase of economic agglomeration, the green TFP shows a trend of decreasing first and then increasing after controlling urban spatial correlation.
Hypothesis 2: Economic agglomeration has a threshold effect on the agglomeration externalities such as infrastructure sharing, knowledge spillover, advanced labor market, and green output structure, which is the internal reason for the "U-shaped" curve relationship between economic agglomeration and green TFP.

Standard panel model setting
Based on the theoretical analysis and assuming the random effect as εit, the benchmark econometric model of this paper can be obtained: Where, GTFP stands for green total factor productivity ("green TFP" above); AGG represents the degree of economic agglomeration; X´ represents the control variable matrix; Subscripts i and t represent city and year respectively; β0 is the constant term, β is the coefficient vector of the variable; Considering that the research sample is 281 prefecture-level cities, which is close to the total sample, the fixed-effect model is used. vi and ut represent the fixed effect of city and fixed effect of the year respectively.

Setting of a spatial econometric model
Based on the above analysis, this paper further considers the spatial spillover effect of urban green economic development and economic agglomeration activities and reflects it in the spatial lag term through the form of the spatial weight matrix, to make the estimation result more realistic. Based on Equation (7) in the theoretical analysis part and LR test value 1 , SDM model with more general significance is used in this paper: Wherein, W is a 281×281 spatial weight matrix (see the detailed calculation below); WLnGTFPit, WLnAGGit, and WXit are the spatial lagged items of a dependent variable, main explanatory variable, and control variable, respectively, reflecting the influence of spatial relations on green TFP. δ is the spatial autoregressive coefficient, which reflects the influence of green TFP in this region on surrounding areas, and its value range is [-1,1]. Since the spatial lag term is related to the random disturbance term, to alleviate the endogenetic problem, a dynamic SDM model is further used about Elhorst's (2014) practice to test whether there is a time path dependence tolerance of green TFP. The final econometric model is set as: Among them, LnGTFPit-1 is the first-order time lag of green TFP, and WLnGTFPit-1 is the first-order time and space lag of green TFP. τ represents the regression coefficient of the lag period, reflecting the influence of the green TFP in the previous period on the current period, while η represents the coefficient of the time-space lag term, representing the influence of the green TFP in the local period on the neighboring area in the current period. It should be noted that due to the disturbance of the spatial correlation of variables, the change of the explanatory variable in region 1 will affect itself by affecting other regions, but this "feedback effect" cannot be captured by traditional point estimation methods (Chen & Lee, 2020). Therefore, it is necessary to use a dynamic SDM model to conduct effect decomposition of the estimated coefficients (Elhorst, 2010) to separate the direct impact and spatial spillover effect of economic agglomeration on green TFP. The short-term and long-term effects of the variables at different time scales can also be revealed (see Appendix B).

Setting of a spatial weight matrix
In this paper, the geographical distance matrix, economic distance matrix, and nested geographic and economic distance matrix are used for spatial econometric analysis. Set the geographical distance matrix as: Where, dij is the distance between city i and j, which is calculated by the longitude and latitude coordinates of the city. The economic distance weight matrix is set as: Where, i Y represents the average per capita GDP of the city i during the sample period (2003)(2004)(2005)(2006)(2007)(2008)(2009)(2010)(2011)(2012)(2013)(2014)(2015)(2016)(2017)(2018). In addition, considering that the spatial correlation effect between cities is likely to be the result of the joint action of geographical proximity and economic correlation, an asymmetric spatial weight matrix Wmix, which takes geographical distance and economic attributes into account, is constructed concerning existing studies (Yuan et al., 2020) : Where, i Y is the per capita GDP of the city i during t0 ~ t1; Y is the average per capita GDP of each city during the sample period; Wd is the spatial weight matrix of geographic distance.

Variable construction 3.3.1 Green total factor productivity (GTFP)
Referring to the research of Li Jianglong and Xu Bin (2018), Lin Boqiang, and Tan Ruipeng (2019), a single city was set as a basic decision unit, and the non-radial distance function (NDDF) was used to construct the evaluation index of green total factor productivity. Input factors include labor (L), capital (K), and energy (E), output factors include expected output (GDP) and unexpected output (sulfur dioxide (S), wastewater (W), and soot (D)). In NDDF, the weights of each input-output variable have good flexibility (Lin & Du, 2015). As required by this study, the weights of L, K, E, GDP, S, W, and D are respectively set as 0, 0, 1/3, 1/3, 1/9, 1/9, i.e., the weight vector is (0,0,1 3,1 3,1 9,1 9,1 9) T w = , and the reasons are as follows: (1) When there is no prior information, it is more reasonable to treat all input and output factors equally in the construction of total factor productivity index (Lin Boqiang & Liu Hongxun, 2015). Therefore, factor input, expected output, and non-expected output are each given a weight of 1/3. (2) Further, to understand the real situation of energy input inefficiency, the inefficiency of capital and labor should be broken down (Li Jianglong & Xu Bin, 2018). Therefore, the weight of labor and capital is set to 0, and the weight of energy input is 1/3. (3) According to the principle of (1), the expected output is divided into 1/3 of GDP, and the weight of the undesired output is further equally distributed, that is, the weight of sulfur dioxide (S), wastewater (W) and soot (D) are equal to 1/9. According to the weight vector, the direction vector can be further defined as At this point, the linear optimal solution of the distance function can be performed, and the optimal solution can be recorded as * Based on the optimal solution, the green total factor productivity evaluation index can be constructed 2 : ,, ,

Economic agglomeration(AGG)
Based on theoretical analysis, this paper uses urban employment density (labor force per unit land area) to measure the degree of economic agglomeration, and then uses output density (the sum of the added value of the secondary and tertiary industries per unit land area) as a surrogate index for robustness test. In addition, the quadratic term of the economic agglomeration variable is introduced to test hypothesis 1.

Selection of control variables and tool variables 3.3.3.1 Selection of control variables.
(1) The level of urban economic development is measured by the natural logarithm of per capita GPD. According to EKC's argument, with economic development, environmental pollution generally experiences a process of rising first and then falling (Stern, 2004). To take into account this inverted "U-shaped" curve relationship, the quadratic term of the logarithm of per capita GDP is also added.
(2) The urban industrial structure is measured by the proportion of the added value of the secondary industry in GDP. Studies have shown that most energy consumption and environmental waste come from the secondary industry, which has become the main source of urban environmental pollution (Cheng et al., 2018).
(3) Foreign direct investment is measured by the natural logarithm of actual foreign investment in Chinese cities. On the one hand, some "three high" industries often flow into a region in the form of foreign direct investment, thus making the region a "pollution haven"; But on the other hand, the inflow of foreign direct investment may also provide the local advanced technology and equipment to optimize the production process.
(4) The energy consumption structure is measured by the ratio of industrial power consumption to urban total power consumption. Excessive reliance on fossil fuels in the energy consumption structure will bring adverse effects on China's economic transformation and environmental governance . Coal is recognized as a major fossil fuel pollutant in China, but since data are not available, ECS is measured in terms of industrial power consumption.
(5) The intensity of local government intervention, measured by the proportion of local fiscal expenditure in GDP. The higher the value is, the stronger the government intervention is. In the background of the continuous strengthening of environmental protection assessment, environmental performance becomes an important indicator affecting the promotion of officials. Such incentives lead to government intervention in the allocation of resources in the market, which has an impact on economic growth and environmental quality.
(6) Environmental regulation, measured by the removal rate of industrial sulfur dioxide (or the comprehensive utilization rate of industrial solid waste). Environmental regulation means that government departments formulate relevant laws and regulations to limit and control waste emissions from industrial enterprises (Ren et al., 2018). Reasonable and strict environmental regulation is conducive to promoting production units to achieve energy conservation and emission reduction through innovation and technological improvement (Cai et al., 2016), which is conducive to improving green TFP.
(7) Infrastructure, measured by per capita road area. Infrastructure sharing can affect economic growth and environmental quality by reducing transportation costs and facilitating information exchange (Banerjee et al., 2020;Wang et al., 2020), so it is necessary to consider its impact on green TFP.
(8) Scientific and technological innovation, measured by patents per 10,000 people. Innovation is the source of technological progress, and technological progress is the internal driving force of economic growth. At the same time, technological innovation can also play a role in environmental protection by reducing energy consumption and pollutant emission per unit output (Ying, Yang & Li, 2021). That is, the level of scientific and technological innovation has an important impact on green TFP.

Selection of utility variables.
In the setting of the spatial econometric model, the explanatory variable is assumed to be exogenous. However, economic agglomeration is not an exogenous variable: urban economic agglomeration will affect green TFP, and at the same time, areas with high green TFP tend to have a higher agglomeration degree, that is, there is a reverse causal relationship between green TFP and economic agglomeration. To overcome this endogeneity problem, the indicators of existing literature were referred to (Zhang Yuan & Liu Xiuyan, 2008; Lin Boqiang & Tan Ruipeng, 2019), used "topographic relief" and "whether there was a train in 1933" as instrumental variables of economic agglomeration. Topographic relief can be used as an instrumental variable of economic agglomeration because topographic relief is related to population distribution and population density (Feng Zhiming et al., 2007); at the same time, as a geographically naturally formed objective factor, it has nothing to do with the disturbance term of Equation (10). The reason why "whether city I was connected by train in 1933" can become an instrumental variable of economic agglomeration is that railway is conducive to the formation of cities and agglomeration, that is, it is related to the degree of economic agglomeration. Meanwhile, as a historical fact, since 1933 is far from the beginning period of the sample, it can be considered independent of the perturbation term of Equation (10). Logically, the above two instrumental variables of economic agglomeration satisfy the conditions of "correlation" and "echogenicity".
Refer to Feng Zhiming et al. (2007) and use ArcGIS and China 1:1,000,000 Digital Elevation Model data to calculate topographic relief (RDLS). Within each unit, the RDLS calculation formula is as follows: Where, Max(H) and Min(H) represent the highest and lowest elevations (m) of the city, respectively. A is the total area of the city (km 2 ), and the 10km×10km grid is selected as the basic evaluation unit, so A is 100km 2 . P(A) is the flat area of the city, and the judgment standard is that the maximum height difference within 25km 2 is less than or equal to 30m (Chen Zhiming, 1993).
Definition of whether the train passed through the city i in 1933: if the train passed through the city i in 1933, this variable is 1; otherwise, it is 0. The value of this variable can be judged by combining the history of railway construction in China's Transport History (Bai Shouyi, 2011) and the full map of China's railways in 1933 (Ministry of Railways, 1934) in China's Railway Fact Sheet.

Sample selection and data processing
The data are mainly from the "Statistical Yearbook of Chinese Cities" and CEIC database. To ensure the comparability of the data, the indexes related to market value are deflated with 2003 as the base period. The perpetual inventory method is used to convert the fixed asset investment into the fixed asset stock 3 . The data of each index came from the official website of the National Bureau of Statistics of China. Since the GDP deflators of the prefecture-level cities were not fully disclosed, the GDP deflators of the provinces under the prefecture-level cities were used to supplement the missing years. Secondly, the interpolation method is used to solve the problem of outliers or missing values, and the sample of cities with seriously missing data is eliminated. Finally, the panel data set of 281 cities at the prefecture-level and above in China from 2003 to 2018 is adopted. Spatial weight matrix in the geographical relations between various regions come from China's geographic information system web site provides 1:10 00000 electronic map 4 . Descriptive statistics of each variable are shown in Table 1.

Time-variation
Kits and Kitf represent the capital stock and fixed asset investment of the city i in the t year; subplot 0 represents the initial year; δ represents the depreciation rate, taking 8.5%; g is the average annual growth rate of fixed asset investment of the selected sample cities. 4 The website of the Geographic Information Resources Directory Service System is: https: //www. webmap.cn/main.do?method=index.
According to the change trends of economic agglomeration and green TFP during the sample period (Fig. 1), it can be seen that both of them did not show a relatively stable or monotonous trend during the study period, but presented an obvious phased change feature. The sample period was divided into two stages for further analysis. The first stage (2003)(2004)(2005)(2006)(2007)(2008)(2009) is known as the "old normal" period of China's economy. This stage is a stage of economic agglomeration and growth, but at the same time, it is a stage of green TFP fluctuation decline, which is closely related to the influx of a large number of foreign capital caused by China's accession to the WTO in 2001 . The second stage (2010-2018) is a period known as the "new normal" of China's economy. At this stage, economic agglomeration is in the stage of steady and declining growth trend, and green TFP is in the stage of fluctuation, which may be related to the global financial crisis in 2008 and the transformation of China's extensive development mode (Ying et al., 2021). Intuitively, the economic agglomeration has obvious cyclical characteristics on green TFP, which provides a preliminary basis for this paper to explore the nonlinear "U-shaped" impact of economic agglomeration on green TFP.

Spatial-variation
In this paper, the development trend of economic agglomeration and green TFP during the "11th Five-Year Plan" (2006)(2007)(2008)(2009)(2010) and "12th Five-Year Plan" (2011)(2012)(2013)(2014)(2015) was plotted, and the spatial change characteristics of the two were preliminarily analyzed. The reason for choosing these two periods in the sample period is that the Chinese government formulates new economic development strategies and policies every five years. Within the five-year plan, the economic development strategy is relatively stable and the observed results are more comparable.
During the "11th Five-Year Plan" period, China set a binding target of significantly reducing the total emission of major pollutants for economic and social development. However, the overall trend of environmental deterioration has not been fundamentally curbed. It was not until the "12th Five-Year Plan" period that an effective breakthrough was made in coordinating development between resource conservation, environmental protection, and economic growth. As shown in fig. 2, during the period of the "11th Five-Year Plan", economic agglomeration are relatively concentrated in central cities, but by the end of the "12th Five-Year Plan" period, the economic agglomeration activity gradually from the eastern coastal region to internal diffusion (mostly in existing cluster areas in nearby axial diffusion), from the core cities to the central to urban agglomeration to a regional center, Especially the Yangtze River Delta, Pearl River Delta, Chengdu-Chongqing economic circle. Similarly, the high level of green TFP was mainly concentrated in the eastern coastal areas during the "11th Five-Year Plan" period and rapidly transferred to the central and western inland areas during the "12th Five-Year Plan" period. This trend change is not only the inevitable result of the population and economic activity distribution with the increase of productivity and the development of urban agglomeration but also the embodiment of China's green economic development transformation. The agglomeration and development of population and economic activities further promote the urbanization level and the transformation of energy structure and have an impact on green TFP. However, from the perspective of the matching degree between the geographical distribution of the labor force and the green TFP layout, the change of the former is relatively lagging, and the potential of the green economic growth effect released by the flow of labor force in the future is still huge.

The results of spatial econometric estimation
The above analysis shows that there is a possible spatial correlation between economic agglomeration and green TFP, and the test results of the global Moran index (see Appendix C) prove that such spatial correlation should be taken into account in the setting of the econometric model. Therefore, this paper adopts a spatial econometric model to estimate the parameters. However, before this, it is necessary to investigate whether the dynamic SDM model is suitable for the study in this paper 5 . According to the test results of the model (see Appendix C), the dynamic SDM model with Spatio-temporal fixed effects was finally used in this paper, and the parameter estimation was conducted according to the error correction MLE method provided by Lee & Yu (2010). In addition, to test the necessity of introducing a dynamic model, Table 2 also lists the regression results of the static spatial Dubin model under the dual fixed effect 6 . The following text mainly analyzes the results of the spatiotemporal fixed effect of the dynamic spatial Dupin model. Dynamic space-time SDM in table 2 pairs of fixed effects estimation results show that: (1) from the time dimension, the green TFP lag issue of parameter estimation were significantly positive, green TFP has certain characteristics of path dependence, on the issue of green TFP development of current green TFP has the same effect, show some "snowball effect". The reason may be the adjustment of some economic policies, such as labor agglomeration, regional transfer of industrial chain, industrial structure upgrading, scientific and technological innovation, and technological progress, which itself has a lag in time (Shao Shuai et al., 2016). (2) From the perspective of spatial dimension, the spatial lag parameter estimates of green TFP were all significantly positive, indicating that there was a positive spatial correlation effect on green TFP. Under the dual drive of natural atmospheric flow, industrial transfer, and trade between neighboring regions, the development of green TFP in this region is closely related to the level of green TFP in surrounding regions. (3) From the perspective of the spatial and temporal dimensions, the estimation of the spatial lag parameter of green TFP in the previous period is significantly negative, indicating that the poor green TFP performance in the previous period in this region has a promoting effect on the green TFP in surrounding areas in the current period. The possible reason is that, in the face of the poor performance of green economic development in this region, the governments of neighboring regions, under the pressure from the public and environmental protection departments, will generally take positive measures to deal with the relationship between economic development and environmental governance, that is, the development of green economy in this region has a "warning effect" on neighboring regions. 273 Note: * p < 0.1, ** p < 0.05, *** p < 0.01; t statistics in parentheses; Log L is log-likelihood; R 2 is Adjusted-R 2 ;Wd represents the first-order geographical distance weight matrix; We represents the weight matrix of economic distance;Wmix represents the first-order geographic and economic distance nested weight matrix; GTFP(-1) represents the lagging of GTFP; Considering the limited space and the focus of this paper, the spatial lag coefficient of each variable is not listed.
Compared with static SDM, dynamic SDM has stronger explanatory power to econometric models 7 . In addition, according to the logarithmic likelihood value and goodness of fit in Table 2, the estimated values in the case of geographic and economic distance nested matrix are better than those in geographic and economic distance nested matrix. Therefore, this paper will focus on the estimation results of the geographic and economic nested matrix of dynamic SDM. It should be noted that the spatial spillover effect measured by dynamic SDM is a global effect rather than a local effect. In this case, the point estimation results of the dynamic SDM model itself are only valid on the direction of action and significance level but do not represent the marginal impact of explanatory variables (Lesage & Pace, 2009). To investigate the influence of explanatory variables on explained variables, the direct and indirect effects of explanatory variables should be further calculated based on the point estimation results (Elhorst, 2014) 8 . As the dynamic SDM model is adopted in this paper, 7 In this paper, the joint significance of L.GTFP_LN and L.WGTFP_LN coefficients of variables is tested by constructing LR statistics, and the adjoint probability is greater than 1%, indicating that the explanatory power of the model is significantly enhanced after the static space Durbin model is extended to the dynamic model. 8 The direct effect refers to the impact of economic agglomeration on green TFP in the region, which direct and indirect effects can be divided into short-term effects and long-term effects from the perspective of a time dimension, respectively reflecting the short-term and immediate impact of economic agglomeration on green TFP and the long-term impact considering the time lag. Table 3 reports the estimation results of short-term direct effect, indirect effect, long-term direct effect, and indirect effect under each spatial weight matrix.
As can be seen from the estimation results of effect decomposition in Table 3, the effects of economic agglomeration on green TFP are the same among the estimation results of each spatial weight matrix, and the absolute value of impact coefficients of most long-term effects is greater than that of short-term effects, indicating that economic agglomeration has a more profound long-term impact on green TFP. In addition, the short-term and long-term direct effect estimation results show that there is an obvious "U-shaped" curve relationship between regional economic agglomeration and green TFP, which is verified by Hypothesis 1. The possible reason is that when the degree of economic agglomeration is low, there is a mismatch between regional infrastructure construction and the demand brought by the gradually increasing influx of labor force, and economic activities are mainly manifested as repeated construction, blind investment, and energy waste (Yousen & Jian, 2019). This will cause pressure and challenge to the local economy and the carrying capacity of natural resources. At this time, economic agglomeration is not conducive to the improvement of green TFP.
However, as the degree of economic agglomeration continues to increase, positive externalities brought by agglomeration gradually appear, such as the reduction of transportation costs and information communication costs (Pierre et al., 2012), more labor opportunities in the labor market and technology spillover effect lead to the overall increase of economic productivity in the region (Ines, 2020). Specifically, agglomeration can promote the spatial distribution and combination optimization of labor, capital, energy, and environmental factors, and labor and capital factors have a certain substitution effect on environmental factors, which will reduce the energy consumption and the burden on the environment. Compared with cities with low concentration, cities with high concentration can share pollution control infrastructure to save the cost of pollution control to the greatest extent, facilitate the centralized supervision of government departments, reduce pollution emissions to a certain extent, and provide the possibility for centralized pollution control. In the case of the same output, the reduction of energy consumption and related costs such as pollutant emission can not only directly affect green emission reduction, but also enable enterprises to invest more money in the research and development of green technology and environmental protection technology, so the regional green TFP can be improved. Finally, the indirect effect of economic agglomeration on green TFP is negative in both the short and long term, but not significant. It shows that the spatial and temporal scope of economic agglomeration's influence on green TFP is limited to the local area, and the insufficient level of regional linkage may be the reason that prevents economic agglomeration from exerting spatial spillover effect. Table 3 Estimated results of short-term and long-term direct and indirect effects of economic includes the feedback effect. However, due to its small value, Generally, it can be ignored; indirect effect refers to the influence of the change of a local factor on green TFP in the neighboring area, namely, the spatial spillover effect of an influencing factor. Long-term spillover effect -0.029 (-0.11) -0.015 (-0.65) Note: * p < 0.1, ** p < 0.05, *** p < 0.01; t statistics in parentheses.

Influence mechanism inspection
According to the theoretical analysis, economic agglomeration may influence green TFP through sharing effect, structure effect, and knowledge spillover effect. To test it, this paper considers the following four specific factors: (1) infrastructure sharing, measured by urban per capita road area; (2) the green output structure, measured by the ratio of the output value of the tertiary industry to that of the secondary industry; (3) knowledge spillover, measured by the ratio of the number of teachers in urban colleges and universities to the total labor force; (4) the level of the labor market, measured by the ratio of the number of students in urban colleges and universities to the total labor force. Further, based on the classical mediating effect test model (Chen & Lee, 2020), to maintain the consistency and comparability of the estimated results, the following dynamic SDM model was established for parameter estimation: Among them, Zit represents the possible path of economic agglomeration influencing green TFP. Other parameter settings are consistent with the model (10), and the control variables added in the regression are the same as that in (10). In the specific verification process, the existing control variables can be changed into mediating variables 9 .
The regression results obtained are shown in Table 4. The direct effect estimation results show that economic agglomeration has a "U-shaped" impact on infrastructure sharing, labor market upgrading, and knowledge spillover, and an inverted "U-shaped" impact on the greening of output structure. This means that the "U-shaped" impact of economic agglomeration on green TFP is realized through agglomeration externalities such as infrastructure sharing, labor market upgrading, and knowledge spillover. At the initial stage of agglomeration, the greening of output structure plays a positive role, while the effect of the other three agglomeration externalities is not obvious and there are some negative effects. However, when the degree of economic agglomeration exceeds the threshold value, the positive externalities of agglomeration begin to appear, and the improvement of the degree of agglomeration is conducive to the improvement of green TFP. In addition, the indirect effect estimation results show that infrastructure, labor market upgrading, and output structure greening exert regional spatial linkage effect, but are not enough to drive the formation of regional spatial linkage effect.

Robustness test 4.4.1 Replace the core explanatory variables.
The selection of indicators is crucial to the research conclusion. It is a common practice to take urban employment density as the indicator to measure the degree of economic agglomeration. However, when the research sample is Chinese cities, this indicator may have some defects: According to China's urban land use standards, residents in big cities are allowed to enjoy more per capita land use area than those in small cities, which may have some influence on the measurement of economic agglomeration degree. Next, using existing practices for reference (Shao Shuai et al., 2019), the ratio of the sum of the added value of the secondary and tertiary industries to the administrative area (output density) is used as the measuring index of economic agglomeration for testing.

Replace the spatial weight matrix and remove some samples.
In the spatial econometric model, different weight matrices have a great influence on the estimation results. According to the geographical distance weight matrix set above, the second-order geographical distance weight matrix is further constructed, and the nested matrix of second-order geographical distance and economic distance is considered. In addition, to avoid some unobserved and time-varying influences caused by the special administrative status of "municipalities directly under the central government", four municipalities (Beijing, Chongqing, Shanghai, and Tianjin) were excluded, and the remaining 4,448 samples were used for analysis.

Alleviate endogeneity problems based on exogenous index instrumental variables and system GMM.
According to the loose assumptions of the GMM model of dynamic panel systems, the lagged terms of explained variables and endogenous variables can be used as instrumental variables to solve partial endogeneity problems. Specifically, the lagged variables of economic agglomeration and its spatial lagged items, as well as the lagged variables of green TFP and green TFP spatial lagged items, were used as instrumental variables. In addition, considering that the above methods cannot solve the inverse causal relationship between economic agglomeration and green TFP, this paper further uses the above-constructed variables of relief of topography (RDLS) and "whether the city had train access in 1933" as instrumental variables to estimate the parameters of economic agglomeration.
The estimated results (see Appendix D) show that the above results do not substantially change after changing the variable index, changing the spatial weight matrix, removing part of the samples, and alleviating the endogeneity problem.

Industry heterogeneity test
Discussed above is based on a regional economy as a whole cluster, next to distinguish between secondary industry and tertiary industry agglomeration, this paper respectively with a unit land area on the second industry and the tertiary industry industrial agglomeration (AGG2) job number to measure the second and the third industry agglomeration (AGG3), and both cases agglomeration heterogeneity influence to the development of green TFP. The estimated results are shown in Table 5.
Similar to the results of urban agglomeration, the relationship between secondary industry agglomeration and green TFP also presents a U-shaped curve. In the initial stage of agglomeration, the economy is in a period of rapid expansion. Although the rapid concentration of the economic activities brings a certain increase in economic output, the rapid agglomeration of the economy focusing on heavy industry also intensives energy consumption and pollutant emission (Lan et al., 2021). In addition, when the economic production activities are mainly composed of homogeneous low level repeated construction, will be difficult to generate significant economies of scale, knowledge spillover, and synergies (Wang & Wang, 2019), gathering activities to bring the output expansion of discharge effect is greater than the economies of scale and the inhibition effect of the Shared facilities on emissions, resulting in green TFP. However, when the agglomeration level of the secondary industry develops to a certain extent, its capital-intensive characteristics bring opportunities for the development of the local economic level. The concentration of human and material resources is conducive to the sharing of energy conservation and emission reduction treatment facilities and the reduction of the unit cost of emission reduction (Yuan, Feng, Lee & Cen, 2020), which makes the economies of scale of energy conservation and emission reduction gradually appear. At this time, the agglomeration effect is sufficient to make up for the negative effects caused by energy use and pollution discharge in the same period. Therefore, it has a promoting effect on green TFP. For the tertiary industry, most of them are "green" industries such as services and tourism, which use relatively little energy and emit relatively few pollutants in the process of output. Similarly, there is a "U-shaped" curve between tertiary industry agglomeration and green TFP.
However, no matter the agglomeration of the secondary industry or the tertiary industry, its influence effect is limited to the local area, and there is no obvious spatial spillover effect on other areas. The possible reason is that the agglomeration of the secondary and tertiary industries is of low quality, which leads to the spatial mismatch between the industrial structure of the region and the surrounding areas, the disconnection between the development demands of the regions, and the failure to form synergistic effects through input-output correlation, thus unable to provide better intermediate services for regional-scale production. Finally, there was no positive spatial spillover effect on the green TFP in the surrounding areas.  -0.026 (-0.81) Note: * p < 0.1, ** p < 0.05, *** p < 0.01; t statistics in parentheses; the results are estimated based on a nested matrix of geographic and economic distances.

Regional heterogeneity test
Different regions in China have obvious heterogeneity characteristics in terms of economic structure and development orientation, and the division of east, central, and western regions not only reflects the differences in natural resources and economic development levels between regions. It also reflects differences in the distribution of labor 10 . Therefore, it is necessary to further classify samples from the eastern, central, and western regions for parameter estimation. The results are shown in Table 6.
According to Table 6, the estimated results of economic agglomeration show obvious spatial heterogeneity, but the relationship between economic agglomeration and green TFP still shows a "U-shaped" curve. Specifically, : (1) Economic agglomeration in eastern China inhibited and then promoted green TFP in the short and long run, but did not produce a significant positive spatial spillover effect on the surrounding areas. Since the reform and opening up, the eastern region, as the region with the highest level of economic development and the most intensive economic activities in China, has relatively rich resources, which enables most cities in the eastern region to independently support the research and development of energy conservation and emission reduction technologies. Competition among cities is more important than cooperation (Zelai, 2009). To a certain extent, the spatial spillover effect of agglomeration externalities is blocked, and the green TFP promotion effect of urban regional linkages is weakened. (2) The estimated results of economic agglomeration in the central region are similar to those in the eastern region, but the difference is that the urban economic agglomeration in the central region not only has an impact on the green TFP of the region but also has an obvious spatial spillover effect on the surrounding areas. The possible reason is that the central region, as the undertaking place of industrial transfer, needs to make use of the labor resource endowment of different cities and is closely connected, thus accelerating the spillover effect of knowledge and facilities sharing between cities. (3) Compared with the central region, the economic development and market size of the western region are at a lower level. Although the economic agglomeration in the western region also produces an obvious spatial spillover effect, the direction of its effect is opposite to that of the central region, which is firstly inhibited and then promoted. A possible reason is that in the western region city more development of manufacturing industry as a pillar, or more for the second industry agglomeration, gathering early "instead of" the layout of the problems such as easily lead to blind investment and repeated construction (Lan, Sun & Pu, 2021), makes the area within the scope of social resources waste, energy, and environment problems, It affects the construction of green industrial chain and supply chain in different cities. At the same time, the manufacturing structure of cities in western China is relatively single, and the tertiary industry agglomeration serving the leading industrial development is more conducive to the technology spillover and scale economy effect, which is conducive to the region and surrounding areas to form a collaborative linkage mechanism for green TFP development. were divided into three sub-samples of eastern, central, and western cities. The eastern region includes 11 provincial-level administrative regions, Beijing, Tianjin, Hebei, Liaoning, Shanghai, Jiangsu, Zhejiang, Fujian, Shandong, Guangdong, Hainan, and more than 87 regions and cities; the central region includes 8 provincial-level administrative regions, Heilongjiang, Jilin, Shanxi, Anhui, Jiangxi, Henan, Hubei, Hunan, the more than 113 local and city; in the western region including 12 provincial-level administrative regions, Sichuan, Chongqing, Guizhou, 81 cities at prefectural level or above in Yunnan, Xizang, Shaanxi, Gansu, Qinghai, Ningxia, Xinjiang, Guangxi, and Inner Mongolia. Note: * p < 0.1, ** p < 0.05, *** p < 0.01.

Time-segment heterogeneity test
The emergence and development of an urban system are the result of the joint action of centripetal force and centrifugal force. For a long time, people seem to have the idea that high-density economic activities are the root cause of increased energy consumption, environmental quality, and various urban diseases in the region. However, this paper holds a different view. Considering the various positive externalities of agglomeration, economic agglomeration may be an important way to realize the development of a green economy, and the motivation of energy conservation, emission reduction, and environmental governance may also become the "centripetal force" of economic agglomeration.
Since 2000, the reform of the household registration system has been launched in various provinces and cities to attract surplus rural labor to the cities. Chongqing Municipality was the latest to implement the reform (2010). To test the impact of the household registration system of local governments on the spatial agglomeration of economic activities and thus on green TFP, this paper takes 2010 as the boundary, divides the samples into two periods (2003-2010 and 2011-2018), and discusses the dynamic spatial impact of economic agglomeration on green TFP before and after the implementation of the policy. Table 7 reports the corresponding estimates. From the overall trend, the relationship between economic agglomeration and green TFP still presents a "U" curve in the two periods. However, after 2010, the impact of the regional economic agglomeration on the green TFP of the surrounding areas changed from negative to positive. From the perspective of impact degree, the estimated parameters of direct and indirect effects of economic agglomeration from 2003 to 2010 are significantly lower than the estimated results from 2011 to 2018. This means that since the reform of the household registration restriction system has been continuously promoted, local governments have promoted the redistribution of economic geography, improved the degree of urban economic agglomeration, and made some cities exceed the threshold value by relaxing the policy obstacles to economic and population agglomeration. From the perspective of the final effect, the impact effect and significance of economic agglomeration on green TFP have been further improved after the relaxation of "population mobility restrictions". Note: * p < 0.1, ** p < 0.05, *** p < 0.01.

Research conclusion
With the steady progress of China's regional development strategies such as new-type urbanization and urban agglomeration economy, the spatial agglomeration process of "bringing areas to areas by points" has become the basic manifestation of China's regional development pattern. But at the same time, China's green development transition also faces the trade-off between resource conservation, environmental protection, and economic growth efficiency. It has become a major challenge for China's development in the new stage whether the two strategies of economic agglomeration and green economy can achieve a "win-win situation", that is, how to coordinate the spatial optimal allocation of production factors and the constraints of energy conservation and environmental protection. In this context, this paper establishes a theoretical model that can describe the relationship between economic agglomeration and green TFP. Based on the panel data of 281 cities at the prefecture-evel and above in China from 2003 to 2018, NDDF is used to estimate green TFP considering economic growth, resource conservation, and environmental protection under the super efficiency DEA framework. Based on econometric analysis techniques such as the dynamic SDM model and mediating effect model, this paper examined the impact of economic agglomeration on green TFP and its spatial spillover effect, searched for and verified several possible influence paths, and finally conducted robustness test and heterogeneity analysis. The research conclusions are as follows: (1) Green TFP has a strong Spatio-temporal dependence effect, showing inertia effect in the time dimension and significant spatial spillover effect at the same time. In the time dimension, green TFP has path-dependent characteristics, that is, if the green TFP in the previous period is at a high level, then the next period may continue to rise. On the spatial dimension, the green TFP between regions showed a significant positive spatial correlation effect, which was mainly reflected by geographical distance and economic development. In the spatial and temporal dimension, the poor green TFP performance in this region in the current period has an obvious "warning effect" on the next green TFP development in neighboring regions.
(2) There are direct and indirect ways for economic agglomeration to affect green TFP. In terms of direct impact, the relationship between economic agglomeration and green TFP shows a significant U-shaped curve in both the short and long term. When the degree of economic agglomeration is low, the agglomeration will inhibit the green TFP, but when the economic agglomeration exceeds the threshold, it has a significant promoting effect on the green TFP. In terms of indirect effects, the heterogeneity test results show that "low-quality agglomeration of the secondary and tertiary industries" and "restriction of population movement" are the important reasons for the failure of economic agglomeration to produce a positive spatial spillover effect on the surrounding areas.
(3) Economic agglomeration has a threshold effect on the agglomeration externalities such as infrastructure sharing, knowledge spillover, and labor market upgrading, which is the internal reason for the U-shaped curve relationship between economic agglomeration and green TFP. When the degree of economic agglomeration is low, the above three agglomeration externalities are not obvious. It is insufficient to make up for the efficiency loss caused by additional factor input per unit area of land, so economic agglomeration has an inhibiting effect on green TFP. When the degree of agglomeration exceeds the threshold, these three paths can all play an important role in promoting effective communication and exchange of information, reducing the cost of information transmission, promoting the formation of economies of scale and pollutants control, etc. At this time, the improvement of the degree of agglomeration will be conducive to the improvement of green TFP.

Research enlightenment
The policy implications of the above conclusions are embodied in the following two aspects.
(1) According to the redistribution of economic geography, the reasonable allocation of human resources in territorial space should be promoted. It is suggested to further reduce or even cancel the threshold of settlement. The traditional concept of development holds that economic agglomeration is the root cause of increasing urban energy consumption and environmental pollution while weakening the potential green, energy-saving, and emission reduction effects of economic agglomeration itself. The research of this paper shows that when the economic agglomeration reaches a certain level, the spatial concentrated production mode of economic activities has an obvious green promotion effect compared with the decentralized production mode. This means that from the perspective of spatial agglomeration, China's urban economic development strategy and green transformation goal can achieve ideal implementation effects that complement each other under certain conditions. In the current process of urbanization, problems such as high energy consumption and high pollution in cities are more prominent, which also indicates that economic agglomeration is still at a low stage and its positive externalities are not obvious. According to the conclusion of the study, this paper believes that with the continuous improvement of the level of urban economic agglomeration in China, its internal green agglomeration effect will appear in a wider range. Based on this judgment, China should continue to promote the development of urban agglomeration economy, promote the formation of coordinated linkage mechanism among regions, gradually relax the restrictions on labor flow, accelerate the pace of new urbanization, improve the spatial concentration of economic activities, and make the economic agglomeration reach the ideal stage where it can play a significant green effect.
(2) Make green development strategy rationally according to the characteristics of the urbanization process. In the development of small cities, we should rely on the surrounding large and medium-sized cities to form a long-term mechanism for green economic development by improving urban infrastructure construction, striving for industrial cooperation, and avoiding the low-quality agglomeration of secondary and tertiary industries. This will help reduce environmental pollution spillover and promote the construction of growth poles of regional development. The expansion and the medium-sized city, want to consider the phases of urban economy, resources, and infrastructure capacity, should focus on cultivating urban agglomeration rising momentum, on the premise of saving resources, environmentally friendly and through the household registration system reform to promote the moderate scale of urbanization, strive to over economic agglomeration threshold value, from the change of "quantity" to "mass". In the layout of large cities, it is necessary to promote the integrated development of cities and towns and give play to the aggregation effect and divergence function at the same time. It is possible to improve the distribution of public resources such as transportation and education in the suburbs and surrounding areas by cultivating new urban areas and maximizing the agglomeration effect brought by the concentration of population and economic activities.
,..., ; 1, 2,..., ; 0 The long-term indirect effect is expressed as: Where, I is the identity matrix; d represents the operator that calculates the mean value of the diagonal elements of the matrix, and rsum represents the operator that calculates the row and average value of the non-diagonal elements of the matrix; β1k and β2k represent the coefficients and spatial lag coefficients of the main explanatory variables, respectively; W is the spatial weight matrix. The specific meaning of the expression is as follows: direct effect refers to the impact of a factor change on green TFP in the region, including feedback effect, but due to its small value, it can generally be ignored; Indirect effect refers to the influence of the change of a local factor on green TFP in the neighboring area, namely the spatial spillover effect of an influencing factor. Appendix C. Tests on using the dynamic SDM model. Spatial autocorrelation test. The value of global Moran's I is between -1 and 1. Positive values indicate that variables are positively correlated in space. The larger the value, the more significant the correlation is. A negative value indicates that variables have a negative correlation in space, and the smaller the value is, the greater the difference is. A value of 0 means that there is no correlation between variables and they are spatially randomly distributed. The results in Table 8 show that there is a spatial correlation between green TFP development and economic agglomeration among Chinese cities, so it is the right choice to use a spatial econometric model that considers the spatial correlation between variables. Test on the use of dynamic SDM model. The spatial autocorrelation test of OLS regression residuals showed that the P statistics of LM-LAG, Robust LM-LAG, Robust LM-error, and Robust LM-error all rejected the null hypothesis at the 1% significance level, which further proved that the establishment of the spatial econometric model was reasonable. To ensure the robustness of the estimation results of the dynamic SDM model, the LR test was conducted, and the results showed that most of the LR values of SAR and SEM models passed the 1% significance level test, indicating that the SDM model could not degenerate into SAR or SEM model. Finally, the Hausman test was used to judge the fixed effect or random effect. The test results showed that the fixed effect model was superior to the random effect when the null hypothesis was rejected at the 1% significance level. Note: Wd1 represents the first-order geographical distance weight matrix; Wd2 represents the second-order geographic distance weight matrix; We represent the weight matrix of economic distance; Wmix1 represents the first-order geographic and economic distance nested weight matrix; Wmix2 represents a second-order geographic and economic distance nested weight matrix.
The same applies to the following tables.
Appendix D. Estimated results for robustness tests.

Replace economic agglomeration measures and use samples excluding municipalities.
After eliminating the samples of Beijing, Shanghai, Tianjin, and Chongqing, the direct and indirect effects of economic agglomeration did not change significantly in the short and long term. In addition, the measurement of economic agglomeration variables from the perspective of output density does not change the overall impact of economic agglomeration on green TFP.

Replace the spatial weight matrix.
In spatial econometric models, different spatial weight matrices may lead to completely different estimation results. Considering the second-order geographical distance weighting matrix Wd2 and its nested matrix Wmix2 with economic agglomeration, the conclusion of the text is still robust. Table 11 The effects of economic agglomeration on green TFP under different spatial matrices were compared in Table 2.

Further treatment of endogeneity.
As shown in the test results in Table 13, the adjoint probability of Sargan test statistics is all greater than 0.1, so the null hypothesis that instrumental variables are valid is accepted. The adjoint probabilities of Arellano-Bond AR (1) test statistics are all less than 0.1, but the adjoint probabilities of AR (2) test statistics are all greater than 0.1. The null hypothesis that there is no second-order autocorrelation is accepted. This indicates that the estimation results are reasonable and the selected instrumental variables are desirable. After a series of robustness tests, the parameter estimation results of economic agglomeration have not changed significantly. The time lag of green TFP was significantly positive, which confirmed the conclusion that green TFP had an inertia effect in time. The spatial lag term of green TFP is also significantly positive, which indicates that there is a positive spatial correlation effect of green TFP in different regions. The space-time lag term of green TFP is significantly negative, which confirms the conclusion that green TFP has a warning effect. All in all, the conclusions in the text stand even after a series of robustness tests.