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:
Array
As per Kelejian and Prucha (1999), reworking the moments conditions lead to the following system of equations to be solved:
Array
Array
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 :
Array
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) ?
Related Posts with Replicating Spatial Regression (with Spatially correllated disturbances) on Mata
replace variable values if it does not satisfy a certain conditionHello, I want all the observations of the variable "Website" to start with "www.". As shown below, m…
Table with string valuesHello, I have a table for 3 numeric variables by 3 groups: tabstat var1 var2 var3, by(group) V…
Find and Replace in Selection Stata (17) for MacIs the find and replace *in selected text* function available for State 17 in Mac? This post implies…
Generating a var based on a factor in entire datasetHello, My dataset contains minute by minute stock market data for 200 companies AND if there was an…
Reporting R-squared values in System GMM estimationHi everyone, This is a query on how to report the R-squared (or Adjusted R-squared) value in a syst…
Subscribe to:
Post Comments (Atom)
0 Response to Replicating Spatial Regression (with Spatially correllated disturbances) on Mata
Post a Comment