GeoDaCenter / geoda

GeoDa: An introduction to spatial data analysis
http://geodacenter.github.io
GNU General Public License v3.0
710 stars 157 forks source link

Regression: LM statistics wrong for k-nearest neighbor weights #202

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 9 years ago
The LM statistics for residual spatial autocorrelation reported are
different from those with GeoDaSpace for k nearest neighbor weights.
This is the case for both 1.6 and 1.7. This is NOT the case for contiguity
weights. This is an old problem having to do with how row-standardization
is handled in GeoDa and whether the weights are assumed to be
intrinsically symmetric or not. I thought it had been fixed, but apparently
it has not. The GeoDaSpace results are correct.

Maybe this was never fixed because GeoDa does not support k-nearest
neighbor weights for the ML regression, but the diagnostics should
nevertheless be correct.

using 1.6.7 and 1.7.43

DIAGNOSTICS FOR SPATIAL DEPENDENCE   
FOR WEIGHT MATRIX : phx2010trid2_k6.gwt
   (row-standardized weights)
TEST                          MI/DF        VALUE          PROB
Moran's I (error)             0.2248        8.3326        0.00000
Lagrange Multiplier (lag)       1          56.5172        0.00000
Robust LM (lag)                 1           4.2993        0.03813
Lagrange Multiplier (error)     1          57.8223        0.00000
Robust LM (error)               1           5.6043        0.01792
Lagrange Multiplier (SARMA)     2          62.1216        0.00000

using geodaspace

DIAGNOSTICS FOR SPATIAL DEPENDENCE
TEST                           MI/DF       VALUE           PROB
Lagrange Multiplier (lag)         1          46.971           0.0000
Robust LM (lag)                   1           2.247           0.1339
Lagrange Multiplier (error)       1          51.888           0.0000
Robust LM (error)                 1           7.164           0.0074
Lagrange Multiplier (SARMA)       2          54.135           0.0000

Original issue reported on code.google.com by lanse...@gmail.com on 20 Jul 2015 at 9:36

lixun910 commented 9 years ago

fix is proposed in e615cc8. request verification in 1.7.47

jkoschinsky commented 8 years ago

Problem still remains in GeoDa 1.7.63. Example based on NCOVR and same knn4 weights. See attached: on left, spatial diagnostics for GeoDa, on right for GeoDaSpace - results are identical except for spatial diagnostics.

screen shot 2015-11-10 at 9 23 24 pm

jkoschinsky commented 8 years ago

Problems remains in GeoDa 1.7.87 (OSX Yosemite, 10.10.5): GeoDa left, GeoDaSpace right baltimore sample data, weights = knn4

screen shot 2016-03-03 at 6 23 21 pm
lixun910 commented 8 years ago

Fixed screen shot 2016-03-04 at 11 09 35 pm