Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Replicating Spatial Regression (with Spatially correllated disturbances) on Mata

    Hey guys,

    So I am trying to solve the following model in Mata:

    y = x + u

    u = rho*u + e

    This regression is implemented by the official Stata command spregress which implement the methodologies first pioneered by Kelejian and Prucha (1999).

    As per Kelejian and Prucha (1999), the rho parameter is estimated by the moment conditions:

    Click image for larger version

Name:	1.png
Views:	1
Size:	15.1 KB
ID:	1568666


    As per Kelejian and Prucha (1999), reworking the moments conditions lead to the following system of equations to be solved:

    Click image for larger version

Name:	1.png
Views:	1
Size:	5.2 KB
ID:	1568667



    Click image for larger version

Name:	1.png
Views:	1
Size:	15.7 KB
ID:	1568668


    Where G is a 3x3 matrix and the second parameter in RHS is the vector of residuals, while alpha refers to a column vector of the parameters to be estimated: (rho, rho-squared and variance of error term e from above).

    These estimators are derived from the minimization of :

    Click image for larger version

Name:	1.png
Views:	1
Size:	7.8 KB
ID:	1568669



    Implementing the above framework, via both Mata and the Stata gmm command as estimating the above system of equations, with respect to the 2 unknowns (described above) however yields slightly different results from the official Stata spregress routine, specifically for the parameter rho.

    My question is thus for the spatial econometrics experts out there, is my estimation methodology wrong ( in that I'm jointly estimating the 3 equations above with respect to the paramters I described above) ?

Working...
X