## 2 Methodology and Data
### Model Design
By taking the natural logarithm of both sides of the formula (8), the equation can be transformed into a linear model, which facilitates the estimation of the model and the addition of other influencing factors. This paper explores the mechanism of action of various factors on carbon emissions that are based on the _STIRPAT_ model. According to the previous analysis, carbon emissions have a positive spatial correlation under the economic distance spatial weight matrix, so the spatial correlation between regions should be considered when constructing the empirical model. Based on this, this paper establishes a spatial panel model with both time and space effects that are based on the _STIRPAT_ model. The specific form of the model is as shown in Equation (9). \[\left\{ \begin{array}{l}Y_{it}=\alpha_{i}+\rho\Sigma_{j=1}^{N}W_{ij}Y_{it}+ \beta X_{it}+\phi\Sigma_{j=1}^{N}W_{ij}X_{it}+U_{i}\\ U_{i}=\lambda W\mu_{i}+\epsilon_{i}\end{array} \right. \tag{9}\]  
\(i\), \(j\) represents different regions; \(W_{ij}\) represents the economic distance spatial weight matrix; \(X_{it}\) represents the independent variable vector; \(Y_{it}\) represents the carbon emissions; \(\beta\) is the independent variable regression coefficient vector; \(\rho\) is the dependent variable spatial regression coefficient; \(\varphi\) is the independent variable spatial regression coefficient; and \(\lambda\) is the spatial error regression coefficient. If \(\rho\
eq 0\), \(\phi=0\), then Equation (9) is a spatial lag panel data model (SLPDM) that measures the impact of carbon emissions in the adjacent regions on carbon emissions in a local region. If \(\lambda\
eq 0\), \(\rho=0\), then Equation (9) is a spatial error panel data model (SEPDM) that reflects the influence of factors that have not been considered, except for independent variables in adjacent regions on carbon emissions. If \(\rho\
eq 0\), \(\phi\
eq 0\), \(\lambda=0\), then Equation (9) is a spatial Durbin panel data model (_SDPDM_) that measures both the carbon emissions in adjacent areas and the influence of neighbouring areas' independent variables on carbon emissions in the local area. In the course of the research, the LR (Likelihood Ratio)and Wald (Wald test was proposed by [PERSON] in 1943) tests are generally used to determine which form of spatial panel model to use. The specific test steps are as follows: (1) establish a spatial Durbin panel data model (SDPDM) and estimate it; (2) propose two null hypotheses (\(H_{0}^{1}\): the spatial Durbin panel data model can be simplified to the spatial lag panel data model (SLPDM); and, \(H_{0}^{2}\): the spatial Durbin panel model can be simplified to the spatial error panel data model (SLPDM)); and, (3) the significance level of the two hypotheses is measured. It is assumed that the rejection of the two hypotheses at the same time would cause the establishment of the spatial Durbin panel data model. First, the model was tested by LR, [PERSON], and [PERSON]. The test results are shown in Table 4.  
It can be seen from the test results in Table 4 that the null hypothesis of the Hausman test is rejected when the significance level is 1%. At the same time, the spatial lag model of LR test and Wald test are significant when the significance level is 1%, the spatial error model of LR test and Wald test are significant when the significance level is 1%, so it is determined that the spatial effect of the fixed-effect spatial Durbin panel data model should be used in modeling analysis. The median effect test method is widely used in the field of psychology. It can be used to analyze the influence and transmission mechanism between variables. Therefore, in recent years it has been widely used in the fields of medicine, economics, and management. The dependent variable is set as \(X\), the mediating variable is \(M\), and the dependent variable is \(Y\). The following test models are separately constructed.