Bayesian panel smooth transition model with spatial correlation

In this paper, we propose a spatial lag panel smoothing transition regression (SLPSTR) model ty considering spatial correlation of dependent variable in panel smooth transition regression model. This model combines advantages of both smooth transition model and spatial econometric model and can be used to deal with panel data with wide range of heterogeneity and cross-section correlation simultaneously. We also propose a Bayesian estimation approach in which the Metropolis-Hastings algorithm and the method of Gibbs are used for sampling design for SLPSTR model. A simulation study and a real data study are conducted to investigate the performance of the proposed model and the Bayesian estimation approach in practice. The results indicate that our theoretical method is applicable to spatial data with a wide range of spatial structures under finite sample.


Introduction
In panel data regression models, cross sectional and time effects are usually introduced to represent individual heterogeneity. And the coefficients of explanatory variables are assumed to be constant for all section units and periods. In practice, this assumption is sometimes unreasonable. For example, many empirical studies have found that, the impact of exchange rate fluctuation on domestic inflation is not the same in countries with different degree of openness. At this point, if we use traditional panel data models to study the relationship between exchange rate and inflation based on data of different countries, this is equivalent to imposing the assumption that exchange rate has the same effect on inflation in all countries., which is somewhat far-fetched In order to overcome this drawback of traditional panel data models, economists propose random coefficients panel data models and varying coefficients panel data models in which the coefficients can vary with section units and times. The panel data threshold regression model (PTR) proposed by [1] is a widely used varying coefficients model in which the coefficients vary when threshold variables are in different threshold intervals that represent several regimes. Therefore, the coefficients are time-varying if threshold variables change over time. However, the changes in coefficients of PTR model are discontinuous in general since there are usually only a limited number of threshold intervals, which indicates that the transition between different regimes is abrupt. This limits the application scope of the a1111111111 a1111111111 a1111111111 a1111111111 a1111111111 model to a certain extent.. As an effective extension of the PTR model, the panel data smoothing transition regression model (PSTR) proposed by [2] and [3] allows coefficients to vary continuously with transition variables, which effectively ensures the continuity of regimes transition PSTR model actually allows coefficients to change with cross sections and times, which is a sufficient relaxation of heterogeneity assumption in panel data model, and we can easily find that the PTR model is a special case of the PSTR model. As individual heterogeneity can be fully portrayed in PSTR model, this model has been widely used in empirical research in many areas, such as [2], [4], and so on.
Traditional econometric models generally assume that dependent variables are uncorrelated among cross-sections, but more and more studies have found the existence of cross-sectional correlation. For example, the local equilibrium prices of all local markets in the general equilibrium model are correlated, the individuals in the network model are interconnected, and one participant's decision is influenced by other participants' in a competitive market, and so on. When facing the above research topics, the traditional econometric model will no longer be applicable. In contrast, the spatial econometric models can well deal with cross-section correlated problems. This characteristic makes this kind of model the standard analysis tool in the empirical research of social network, strategy interaction, peer effects and many other fields. The main advantage of PSTR model is that it can well handle cross-sectional and time heterogeneity. However, this model is not able to deal with spatial data with cross-section correlation. In order to combine the advantages of spatial model and PSTR model, this paper introduces spatial correlation into PSTR model and proposes a spatial lag panel smooth transition regression (SLPSTR) model which can fully consider heterogeneity and spatial correlation simultaneously.
Frequentist estimation methods are widely used in econometric literature. Scholars often use Instrumental Variable Method (IV), Generalized Moment Method (GMM) and (Quasi) Maximum Likelihood Method to estimate spatial econometric model and Nonlinear Least Squares Method to estimate PSTR model. Although the model (SLPSTR) studied in this paper is a combination of spatial econometric model and PSTR model, the estimation methods of these two models cannot be directly applied to SLPSTR model. We propose a Bayesian inference method for this model. Compared with frequentist method, the most important feature of Bayesian estimation is the use of information. The Bayesian method takes into account both sample information and priori information, while the frequentist method only uses sample information. Due to the use of more information, we can obtain more robust and accurate estimation results by Bayesian methods. With the development of computer technology and the deep research of Bayesian theory, more and more literature pay attention to the application of Bayesian method in spatial econometric models, among which, [5] and [6] studied Bayesian estimation of spatial autoregressive models and limited dependent variable spatial autoregressive models respectively. [7] proposed the Bayesian probit model with spatial dependence. [8] developed a spatial Dirichlet process model for spatial data and discussed its properties and Bayesian estimation. [9] studied the Bayesian estimation and model selection for spatial Durbin error model with finite distributed lags. In the study of panel data spatial econometric model, [10] proposed the Bayesian inference for the spatial random effects model. [11] introduced the Bayesian approach to analyze spatial econometric panel data mode. [12] studied spatial autoregressive models with unknown heteroskedasticity and made a comparison of Bayesian and robust GMM approach. Their results indicated that the Bayesian estimators perform better than the robust GMM estimator in terms of finite sample efficiency. The above existing studies can provide an important reference for this paper.
This paper can also have some contributions to the field of spatial econometrics. First of all, the existing literatures recently focus on the linear spatial model with the assumption that the influence of the independent variables on the dependent variable is linear and the marginal effects are constant in different time and space. Different from the above assumption, this paper introduces a nonlinear influence form of "regime transition" into spatial econometric model and gets the spatial panel smooth transition model which allows the influence of independent variables on the dependent variable to change with some transition variable. Since transition variable often changes over time and space, the influence of the independent variables can also be time and spatial-varying, which relaxes the assumption of linear model that the coefficients of independent variables are constant. At the same time, this paper also constructs a Bayesian inference method for the proposed model. The advantage of Bayesian method is that it comprehensively utilizes priori and posteriori information and thus has higher estimation accuracy and robustness. Therefore, our work not only expands the research field of spatial econometric models, but also provides a new analysis tool for application researchers, which also reflects the value and innovation of this paper.
The rest of the paper is arranged as follows: the second section introduces the model studied in this paper, the third section proposes a Bayesian estimation method for the model, the fourth and the fifth section are numerical simulation and real data example, respectively, the last section is the conclusion.

Model
The spatial lag panel smooth transition regression (SLPSTR) model considered in this paper has the form as follows where the subscript i,t indicates i-th cross-section and t-th period respectively, y it is dependent variable, Y = (y 11 ,y 21 ,� � �,y N1 ,y 12 ,� � �,y NT ) 0 is NT × 1 vector of dependent variables and W is NT × NT spatial weight matrix, x it is k × 1 vector of independent variables, β 0 ,β 1 are k × 1 vectors of coefficients, μ i represents the individual fixed effects, ε it is random error term and ðq it À c j ÞÞÞ� À 1 is transition function and evidently γ > 0 is scale parameter. Without loss of generality, we set m = 1 to simplify mathematical deduction.
Given i, SLPSTR model can also be written as where E i = (0,e,0) is a T × N matrix in which the elements of i-th column are one and other ele- then the two regimes SLPSTR model can be simplified as We will discuss Bayesian estimation method for model (3) in the next section.

Bayesian estimation
We first build the Bayesian analysis framework of model (3) before giving a specific estimation step. Given (γ,c), let A = (I-ρW), then the likelihood function of model (3) is The prior distribution of parameter ρ is usually assumed to be a uniform distribution with probability density function pðrÞ ¼ , where λ max , λ min are the maximum and minimum eigenvalue of spatial weight matrix W respectively, which indicates that r � Uðl À 1 min ; l À 1 max Þ. Prior distribution of parameter Θ is set to be multiple normal distribution N(μ 0 , Σ 0 ), where μ 0 and Σ 0 are the prior expectation and covariance. We also assume prior distribution of parameter σ 2 as inverse gamma distribution IG(α,β) and set prior of γ and c as gamma distribution and normal distribution, Combining all the priors with likelihood function, we can obtain the joint distribution of all variables as follows where π(�) denotes prior probability density function of each parameter. According to Bayesian theorem, the joint posterior distribution of all parameters is given by On the basis of joint distribution and joint posterior distribution, we can get the conditional posterior distribution of each parameter as follows where m ¼ ðZ 0 Zþs 2 Σ À 1 0 Þ À 1 ðZ 0 AYþs 2 Σ À 1 0 μ 0 Þ and Σ ¼ s 2 ðZ 0 Zþs 2 Σ À 1 0 Þ À 1 . It can be seen from equation (7) Pðg; cjΘ; r; s 2 Þ / exp À 1 2s 2 ðAY À ZΘÞ 0 ðAY À ZΘÞ where A(ρ) = (I-ρW). From the conditional posterior distributions of all parameters, we can see that the probability density functions of γ,c and ρ are more complex, and these parameters cannot be directly sampled. Therefore, we use Metropolis-Hastings algorithm to deal with this problem.
Assuming that the current value of ρ is ρ t that meets P(ρ t |Θ,γ,c,σ 2 ) > 0, and the candidate value ρ � is generated from the proposed distribution F(ρ � |ρ t ) = f (ρ � -ρ), where f (�) is the probability density function, the transfer process is ρ � = ρ t + λz where z � N(0,1) and λ is a transfer parameter. Then the reception ratio of ρ � is A 1 (ρ � |ρ t ) = min{1,R 1 }, where Similarly, assuming that the current value of (γ,c) are (γ t ,c t ), and the candidate value (γ � ,c � ) are generated from the proposed distribution g � � Nðg t ; s 2 g Þ and c � � Nðc t ; s 2 c IÞ respectively. Then the reception ratio of (γ � ,c � ) is A 2 ((γ � ,c � )|(γ t ,c t )) = min{1,R 2 }, where f g ðg t jðg � ; s 2 g ÞÞ represents the normal distribution probability density function of γ t with mathematical expectation γ � and variance s 2 g . f c ðc t jðc � ; s 2 c ÞÞ denotes the normal distribution probability density function of c t with mathematical expectation c � and variance s 2 c . s 2 c and s 2 g are adjustment parameters. Z � and Z t indicate the value of Z at corresponding time when the value of (γ,c) are (γ � ,c � ) and (γ t ,c t )respectively. We firstly employ Gibbs sampling method to generate parameters Θ and σ 2 based on their conditional posterior distributions. Then we sample parameters ρ,γ and c by using Metropolis-Hastings algorithm. Specifically, the Bayesian estimation procedure of SLPSTR model is as follows.

5.
The sample size is set to be 400 under both two spatial weight matrixes. And the convergence criterion of algorithm used in each estimation is The super-parameters in the priors are set as follows: where N is the number of cross-sections, I 0 and I c are identity matrixes.
For each generated data set, we estimate (ρ,Θ,γ,c,σ 2 ) by using the proposed Bayesian approach for 10000 replications. We take the first 2000 replications as a burn-in and calculate the averages and variances of the other 8000 replications as the estimate of posterior means and standard deviations of coefficients.
The simulation results are listed in Table 1 from which we can see that: firstly, under both types of spatial weight matrix, the posterior means of all parameters are very close to their true value and the standard deviation is very small. This indicates that the Bayesian estimation has high accuracy and robustness under small sample. Secondly, the estimation accuracy of spatial correlation coefficient under Case matrix is higher than Rook matrix, which suggests that the estimation accuracy of the spatial correlation coefficient will decreases with the increase of spatial complexity of data. However, the estimation results of other coefficients are quite close under two weight matrices, indicating that the Bayesian method is applicable to spatial data with different complexity.
The sample track and frequency graph of posterior distribution for each coefficients based on 10000 replications are provided in Figs 1 and 2 respectively. We can see from the track graphs in Figs 1 and 2 that the track of each coefficient fluctuates around its true value under both Case weight matrix and Rook weight matrix. The amplitudes of fluctuation and deviations from true value of all coefficients are quite small, which shows that the accuracy and robustness of coefficient estimation are high. This further confirms the well performance of Bayesian approach under finite sample. The frequency graphs in Figs 1 and 2 show that most estimated values of 10,000 replications are located near their true values, which once again indicates that the proposed Bayesian approach has high estimation accuracy. It also can be seen from the two figures that the track and frequency distributions of each coefficient under different weight matrices are similar to each other, suggesting that the structure of spatial data  has little effect on the estimation results. This reflects that the Bayesian method is applicable to a wide range of spatial data.

A real data example
In this section, we apply our SLPSTR model and Bayesian estimation method to explore the impact of economic structure on economic growth, which has been a hot topic in the field of economic development (see [15], [16], [17], [18], [19]). Different from the existing literature, our study is based on the perspective of return to factors. Note that economic growth depends on the level of economic productivity which will ultimately reflect in the productivity level of factor that can be measured by the output elasticity of factor. This indicates that economic structure will affect economic growth through output elasticity of factor, so we take the following Cobb-Douglas aggregate production function as the basic model to conduct our empirical test: where Y, K and L are output, capital stock and labor force, α,β represent output elasticity of capital and labor respectively. Considering that China's regional economic development is not balanced and there exists wide range of spatial correlation between regional economies, we introduce the smooth transition nonlinear structure and spatial dependence into the basic model above and obtain the SLPSTR model as follows.
where γ it = lnY it , k it = lnK it , l it = lnL it . q ð1Þ it and q ð2Þ it are the transition variables refer to share of second industry and tertiary industry in GDP respectively. In model (I) (similar in model (II)), if the link function g(�) = 0, then we have y it = ρ(WY) it + (α 1 k it + β 1 l it ) + μ i +ε it , under this circumstances we say economic growth is in a low regime. In contrast, we have when g(�) = 1, and the economic growth is in a high regime here. With the change of transition variable q ð1Þ it , the economic growth will transit from the low regime to the high regime continuously. Therefore, model (I) and model (II) can well describe the impact of economic structure on economic growth from the perspective of factor return. In addition, the introduction of spatial lag term (WY) it can help to control the spatial convergence of regional economy, which will enhance the robustness of estimation results.
We take 281 cities in China as our study samples, and the raw data used in this study are from China city statistical yearbook 2007-2011. As to variable measure, firstly, we use GDP of city i in year t as a measure of total output Y it , and the GDP growth index of each city is apply as a deflator to eliminate the impact of price. Secondly, the labor force L it is measured by the employment population of city i in year t. Thirdly, we use the proportion of secondary and tertiary industry in GDP of city i in year t as the measure of economic structure q ð1Þ it and q ð2Þ it , respectively. Finally, the perpetual inventory method proposed by [20] is used to calculate the capital stock K it .
We next use the Bayesian estimation approach proposed in section 3 to estimate the empirical model (I) and (II). The estimation results are listed in Table 2. As shown in Table 2, the spatial correlation coefficients of model (I) and (II).are both positive, indicating that there exists positive spatial spillover effect in inter-city economy. The estimation results of Model (I) show that the smoothing parameter is 3.5589, which means that the speed of regime transition is slow and the transition between low and high regimes is continuous. In addition, the coefficients in linear part of model (I) are both positive, indicating that both capital and labor have a significant positive linear effect on economic growth. The coefficient of labor in non-linear part is positive and bigger than that in linear part, which suggests that the labor factor has a stronger positive nonlinear effect on economic growth. The result of capital stock is exactly the opposite of labor. The linear effect of capital stock on economic growth is much more significant than nonlinear effect. Moreover, the threshold of transition variable is 0.4247. This means that the regime transition occurs when the proportion of secondary industry reaches 42.47%.
The estimation result of model (II) shows that the smoothing parameter is 6.5124, far greater than that of model (I). This result suggests that the speed of transition in model (II) is faster than model (I). Similar to model (I), the coefficients in linear part of model (II) are positive, this means that the linear effects of capital stock and labor on economic growth are both positive. The coefficient of the capital stock in nonlinear part of model (II) is positive and slightly smaller than that in linear part, indicating that the capital stock has a significant nonlinear positive influence on economic growth. Furthermore, the coefficient of labor in nonlinear part model (II) is negative, which indicates that the labor factor has a nonlinear negative effect on economic growth. Finally, we can see that the threshold of transition variable is 0.0876, suggesting that the regime transition begins when the proportion of tertiary industry is 8.76%, which is much smaller than the share of secondary industry, all this indicates that the impact of the tertiary industry is more important.

Conclusion
In this paper, we propose a spatial lag panel smoothing transition model by introducing crosssection correlation of dependent variable into panel smoothing transition model and develop a Bayesian estimation approach for this model. In Bayesian analysis, Metropolis-Hastings algorithm and Gibbs method are used for sample design based on prior setting of each parameter in the model. A simulation study and real data estimation are conducted to investigate the practical effect of the SLPSTR model.. The numerical simulation results show that the proposed Bayesian method can perform well for a wide range of spatial data under infinite sample. The real data estimation results demonstrate the application value of the theoretical methods proposed in this paper.
Supporting information S1 Data. Data used in real data study.xls. (XLS)