A new command for estimating and forecasting spatial panel data models using Stata is now available: xsmle.

xsmle fits fixed or random effects spatial models for balanced panel data. See the mi prefix command in order to use xsmle in the unbalanced case. Consider the following general specification for the spatial panel data model:

 y_{it} = \tau y_{it-1} + \rho W y_{it} + X_{it} \beta + D Z_{it} \theta + a_i + \gamma_t + v_{it}
 v_{it} = \lambda E v_{it} + u_{it}

where u_{it} is a normally distributed error term, W is the spatial matrix for the autoregressive component, D the spatial matrix for the spatially lagged independent variables, E the spatial matrix for the idiosyncratic error component. a_i is the individual fixed or random effect and \gamma_t is the time effect. xsmle fits the following nested models:

i) The SAR model with lagged dependent variable (\theta=\lambda=0)

y_{it} = \tau y_{it-1} + \rho W y_{it} + X_{it} \beta + a_i + \gamma_t + u_{it},

where the standard SAR model is obtained by setting \tau=0.

ii) The SDM model with lagged dependent variable (\lambda=0)

y_{it} = \tau y_{it-1} + \rho W y_{it} + X_{it} \beta + D Z_{it} \theta + a_i + \gamma_t + u_{it},

where the standard SDM model is obtained by setting \tau=0. xsmle allows to use a different weighting matrix for the spatially lagged dependent variable (W) and the spatially lagged regressors (D) together with a different sets of explanatory (X_{it}) and spatially lagged regressors (Z_{it}). The default is to use W=D and X_{it}=Z_{it}.

iii) The SAC model (\theta=\tau=0)

y_{it} = \rho W y_{it} + X_{it} \beta + a_i + \gamma_t + v_{it},
v_{it} = \lambda E v_{it} + u_{it},

for which xsmle allows to use a different weighting matrix for the spatially lagged dependent variable (W) and the error term (E).

iv) The SEM model (\rho=\theta=\tau=0)

y_{it} = X_{it} \beta + a_i + \gamma_t + v_{it},
v_{it} = \lambda E v_{it} + u_{it}.

v) The GSPRE model (\rho=\theta=\tau=0)

y_{it} = X_{it} \beta + a_i + v_{it},
a_i = \phi W a_i + \mu_i,
v_{it} = \lambda E v_{it} + u_{it},

where also the random effects have a spatial autoregressive form.

The command was written together with Andrea Piano Mortari and Gordon Hughes.

You may install it by typing

net install xsmle, all from(http://www.econometrics.it/stata)

in your Stata command bar.

HTH,
Federico