I don't use Stata for spatial econometrics but I remember the command spweight could be helpful. Spatial panels are still recent for my studies using GeoDa.
I think Geoda just have spatial correlation (Lagrange Multiplier Tests Statistics for cross-sectional data to spatial panels ) but I need Estimate Spatial Panel Models.
I think that the command in Stata is the following
In xsmle the spatial weighting matrix can be
a Stata matrix
a spmat object
In both cases the matrix can be standardized or not.
e.g.
a Stata matrix can be created using matrix define, imported from Mata using st matrix(”string scalar name”, real matrix) or imported from GIS softwares like GeoDa using spwmatrix gal using path to gal file, wname(name of the matrix) spmat objects are created by spmat spmat import name of the object using path to file .
the command in Stata is the following:
* spmat dta W W*, replace
The spmat dta command allows users to store an spmat object called W in the Stata memory. Notice that, to fit a model using xsmle, one must use the spatial weight matrix as a Stata matrix or an spmat object. The following spmat entry allows users to easily summarize the W object:
* spmat summarize W, links Because xsmle does not make this transformation automatically, the next step consists in the row-normalization of the W object. This can easily be performed using the following:
LUBNA M. HAMZALOUH first you have to use GEO da to or STATA command spwmatrix to generate distance matrix or others, then import it to STATA, for instance,
spwmatrix import using D:\Econometric\Matrix\dismatrix.dta, wname(wd1) dta rowstand
***wd1 is weight matrix based on distance
DTA file D:\Econometric\Matrix\dismatrix.dta imported successfully as a (10 x 10) SPW matrix and the following action(s) taken:
- Spatial weights matrix created as Stata object(s): wd1.
- Spatial weights matrix has been row-standardized.