What's new

GeoDa Local Moran's Index using PySAL question

GIS_GIS_GIS

gO Newbie
Joined
Aug 2, 2020
Messages
2
Hello!

A friend if mine and i am trying to calculate Local Moran's I using PySAL for the following example taken from the lecture notes of Prof. Kosberg ( available with this link, page 5: https://www.uni-kassel.de/fb07/fileadmin/datas/fb07/5-Institute/IVWL/Kosfeld/lehre/spatial/Spatial_Econometrics_with_R.pdf )

When calculating local Moran's Index by hand using the formula given in the attached picture...180

...we get the following values using row standardization: Region 1: 0,625, Region 2: 0,139 Region 3: 0,139 Region 4: 0,139 Region 5: 1,25
and these values when calculating it without row standardization: Region 1: 1,25, Region 2: 0,417 Region 3: 0,417 Region 4: 0,417 Region 5: 1,25

(The values we computed by hand are the same results as Prof. Kosberg had in his notes, btw.)

When trying to compute it with Pysal-Esda-Moran_Local the values we get are different (with row standardization) => Region 1: 0,5, Region 2: 0.111 Region 3: 0.111 Region 4: 0.111 Region 5: 1

The code we use is attached (please note: the values for the global index gotten from PySAL are completely the same as the ones we calculated by hand)

Why do we get such completely different values when doing it by hand and computing it with PySAL??
Could anyone give a hint and help please? Thank you very much.

Best regards!
 

Attachments

OP

GIS_GIS_GIS

gO Newbie
Joined
Aug 2, 2020
Messages
2
One small remark: We found out that the parameter 'U' (indicating that you would like non standadization of the matrix) does not work when it is entered into the code lines below. It is 'O' instead, but unfortunately wrongly documented in all the documentations we found so far for this part of PySAL.

"moran = Moran(y, w, transformation='O')"

or

"lisa = Moran_Local(y,w,transformation='O')"
 
Next >

Changes Are Happening Now!

Forums have been reorganized. Threads have been moved. Sorry for the trouble. I am about 90% complete as of 07/15/2019.
Top