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

Addition of two new versions of the Moran scatterplot plus fixing of a minor typo in the documentation for moran.plot. #149

Merged
merged 15 commits into from
Apr 25, 2024

Conversation

rwesterh
Copy link
Contributor

I have added two new versions of the Moran scatterplot: the Moran drop plot (for visualising p values) and the Moran seismogram (for visual inspection of local critical values/potential spatial weights misspecifications).

Two new variants of the Moran scatterplot. The Moran drop plot visualises indications of p-values and the Moran seismogram allows for visual inspection of potential local spatial weigths misspecifications.
Man files for moran.plot.drop and moran.plot.seismogram.
Fixed a typo (y axis instead of x axis for item "ylab").
@rsbivand
Copy link
Member

@rwesterh Thanks! Could I ask whether you considered rather creating these functions as say methods for a fitted "localmoran" object, perhaps like the hotspot methods in R/hotspotmaps.R (perhaps moran.plot itself ought to be a method?)? I think this might reduce some code duplication. In addition, the localmoran object could be enhanced to add columns you need. I see a problem in that the ZIi from the samples in column 4 is not robust to variables that are skewed, as it is based on the mean and var of the samples. This probably means looking at the skewness and kurtosis reported in the object, and warning the user if the p-values from mean and var of the samples diverge from the p-values from ranking the samples. This also impinges on pysal/esda#199, from pysal/esda#199 (comment). You may also be interested in doi = {10.1080/24694452.2024.2326541} if you have not seen it yet, also maybe doi = {10.1111/gean.12390}. Quite a lot of interesting suggestions coming forward now!

@rsbivand rsbivand changed the base branch from main to moranplots April 25, 2024 12:27
@rsbivand rsbivand merged commit 2ad485a into r-spatial:moranplots Apr 25, 2024
4 checks passed
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.

2 participants