Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve discrepancy of estimating Moran's I corrected for rates between GeoDa and pysal #1011

Merged
merged 6 commits into from
Dec 5, 2017
Merged

Conversation

weikang9009
Copy link
Member

This PR is to reopen PR #989 which was unmerged but closed because of some complication I made. It is to resolve the discrepancy in estimating EBI (Moran's I corrected for rates) between GeoDa and pysal as pointed out in issue #987. Now users could choose to conform with Geoda by setting parameter geoda_rate=True :

pysal.esda.moran.Moran_Local(e, b, w, adjusted=True, transformation = "r", geoda_rate=True)
pysal.esda.moran.Moran_Local_Rate(e, b, w, adjusted=True, transformation = "r", geoda_rate=True)

or to use the original implementation of correcting rates in pysal which conform with the Assunção's paper by setting parameter geoda_rate=False:

pysal.esda.moran.Moran_Local(e, b, w, adjusted=True, transformation = "r", geoda_rate=False)
pysal.esda.moran.Moran_Local_Rate(e, b, w, adjusted=True, transformation = "r", geoda_rate=False)

@coveralls
Copy link

coveralls commented Nov 21, 2017

Coverage Status

Coverage increased (+0.02%) to 83.668% when pulling efba47a on weikang9009:moran_rates into 8d1e596 on pysal:master.

@weikang9009 weikang9009 changed the title resolve discrepancy of estimating Moran's I corrected for rates between GeoDa and pysalMoran rates resolve discrepancy of estimating Moran's I corrected for rates between GeoDa and pysal Nov 21, 2017
Copy link
Member

@sjsrey sjsrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One question on "geoda_rate": we only discuss T/F for this when adjusted=True. What is the behavior when adjusted=False?

@sjsrey
Copy link
Member

sjsrey commented Nov 21, 2017

Adding a note here that when this gets merged, we need to port to https://github.com/pysal/esda

@weikang9009
Copy link
Member Author

@sjsrey If adjusted=True (or geoda_rate=False in function assuncao_rate and related Moran and local Moran classes) , conform with Assuncao and Reis (1999), that is, assign v_i = a+b/x_i and check individual v_i: if v_i<0, assign v_i = b/x_i.

@sjsrey
Copy link
Member

sjsrey commented Nov 21, 2017

@weikang9009 if adjusted=False, is geoda_rate ignored?

@weikang9009
Copy link
Member Author

@sjsrey yes. If adjusted=False, geoda_rate is ignored. Moran statistics won't be adjusted for rates.

@sjsrey
Copy link
Member

sjsrey commented Nov 22, 2017

@weikang9009 maybe we should add to the docs that:

If adjusted=False, geoda_rate is ignored

@coveralls
Copy link

coveralls commented Nov 22, 2017

Coverage Status

Coverage increased (+0.005%) to 83.668% when pulling add8409 on weikang9009:moran_rates into 94cdbf7 on pysal:master.

@weikang9009
Copy link
Member Author

@sjsrey Thank you for the suggestion. Have updated the docs (for Moran_Rate and Moran_Local_Rate).

@sjsrey sjsrey merged commit 4b2b1a2 into pysal:master Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants