Hello all,
I am using Stata 15.1
I have created a Spectrally Normalized Spatially Weighted Inverse-distance Cross-Sectional Matrix - using proprietary distance data - by means of spmatrix fromdata, i.e. not using methods employing a shapefile or co-ordinate variables.
The Matrix is 66x66, non-symmetric, and hollow (diagonal elements = 0).
spregress run on this Matrix with a gs2sls (generalized spatial two-stage least-squares) estimate produces an errorlag co-efficient greater than 1. [1.586804]
As discussed on page 147 of the Stata Spatial Autoregressive Models Ref Manual the errorlag co-efficient (rho [hat] )
To note, the Stata example for Spatial autoregressive models provided also appears to have an errorlag co-efficient greater than 1 [3.247298]
I have two questions please.
Happy to PM matrix data/provide clarity. Regards,
Harry
PS Following spregress I have run estat impact for completeness.
PPS dataex linesize limit exceeded by matrix
I am using Stata 15.1
I have created a Spectrally Normalized Spatially Weighted Inverse-distance Cross-Sectional Matrix - using proprietary distance data - by means of spmatrix fromdata, i.e. not using methods employing a shapefile or co-ordinate variables.
The Matrix is 66x66, non-symmetric, and hollow (diagonal elements = 0).
spregress run on this Matrix with a gs2sls (generalized spatial two-stage least-squares) estimate produces an errorlag co-efficient greater than 1. [1.586804]
As discussed on page 147 of the Stata Spatial Autoregressive Models Ref Manual the errorlag co-efficient (rho [hat] )
should be between −1 and 1 unless the solution is explosive.
I have two questions please.
- Given the steps taken below, is an errorlag co-efficient [rho hat] greater than 1 problematic?*
- If so, is there a remedy for this?
Happy to PM matrix data/provide clarity. Regards,
Harry
PS Following spregress I have run estat impact for completeness.
PPS dataex linesize limit exceeded by matrix
Code:
. use "C:\Users\Atlan\OneDrive\PC\UCD\Matrix\STATA\2020 08 19 distance matrix.dta"
. spmatrix fromdata WmeM = NP_22050-NP_18454, normalize(spectral) idistance replace
. spmatrix export WmeM using WmeM.txt
(matrix WmeM saved in file WmeM.txt)
. save "C:\Users\Atlan\OneDrive\PC\UCD\Matrix\STATA\2020 08 19 distance matrix.dta", replace
file C:\Users\Atlan\OneDrive\PC\UCD\Matrix\STATA\2020 08 19 distance matrix.dta saved
. clear
. use "C:\Users\Atlan\OneDrive\PC\UCD\Matrix\STATA\2019 12 27 Cluster Analysis_5.dta"
. regress LE_PET_DIE_1 SUMBC660sSQ
Source | SS df MS Number of obs = 66
-------------+---------------------------------- F(1, 64) = 28.13
Model | .005390905 1 .005390905 Prob > F = 0.0000
Residual | .012265551 64 .000191649 R-squared = 0.3053
-------------+---------------------------------- Adj R-squared = 0.2945
Total | .017656456 65 .000271638 Root MSE = .01384
------------------------------------------------------------------------------
LE_PET_DIE_1 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
SUMBC660sSQ | -.0001403 .0000265 -5.30 0.000 -.0001932 -.0000875
_cons | .0746009 .0035903 20.78 0.000 .0674285 .0817732
------------------------------------------------------------------------------
. spset catnumber
Sp dataset 2019 12 27 Cluster Analysis_5.dta
data: cross sectional
spatial-unit id: _ID (equal to catnumber)
coordinates: none
linked shapefile: none
. estat moran, errorlag(WmeM)
Moran test for spatial dependence
Ho: error is i.i.d.
Errorlags: WmeM
chi2(1) = 10.22
Prob > chi2 = 0.0014
. spregress LE_PET_DIE_1 SUMBC660sSQ, gs2sls errorlag(WmeM)
(66 observations)
(66 observations (places) used)
(weighting matrix defines 66 places)
Estimating rho using 2SLS residuals:
initial: GMM criterion = 6.965e-10
alternative: GMM criterion = 1.179e-10
rescale: GMM criterion = 3.067e-12
Iteration 0: GMM criterion = 3.067e-12
Iteration 1: GMM criterion = 2.534e-13
Estimating rho using GS2SLS residuals:
Iteration 0: GMM criterion = .01728762
Iteration 1: GMM criterion = .01186374
Iteration 2: GMM criterion = .01175648
Iteration 3: GMM criterion = .01175648
Spatial autoregressive model Number of obs = 66
GS2SLS estimates Wald chi2(1) = 10.00
Prob > chi2 = 0.0016
Pseudo R2 = 0.3053
--------------------------------------------------------------------------------
LE_PET_DIE_1 | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---------------+----------------------------------------------------------------
LE_PET_DIE_1 |
SUMBC660sSQ | -.000081 .0000256 -3.16 0.002 -.0001312 -.0000308
_cons | .0679234 .0042821 15.86 0.000 .0595307 .0763162
---------------+----------------------------------------------------------------
WmeM |
e.LE_PET_DIE_1 | 1.586804 .554908 2.86 0.004 .499204 2.674403
--------------------------------------------------------------------------------
Wald test of spatial terms: chi2(1) = 8.18 Prob > chi2 = 0.0042
. estat impact
progress :100%
Average impacts Number of obs = 66
------------------------------------------------------------------------------
| Delta-Method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
direct |
SUMBC660sSQ | -.000081 .0000256 -3.16 0.002 -.0001312 -.0000308
-------------+----------------------------------------------------------------
indirect |
SUMBC660sSQ | 0 (omitted)
-------------+----------------------------------------------------------------
total |
SUMBC660sSQ | -.000081 .0000256 -3.16 0.002 -.0001312 -.0000308
------------------------------------------------------------------------------
.
end of do-file