# Global and Local Moran: how can I calculate them with different spatial threshold?

3 messages
Open this post in threaded view
|
Report Content as Inappropriate

## Global and Local Moran: how can I calculate them with different spatial threshold?

 Hello everybody, I need to calculate the Global and Local Moran indices in R using a variable distance as threshold: I have a SpatialPointsDataFrame with almost 300 points and I want to calculate the Global Moran index using 4 different distances (e.g 5 km - 10 km - 50 km - 100 km). I know the 'ape' and 'spdep' packages but it seems that no adjustment can be done concerning the spatial width to be considered... Thanks -- Maurizio Marchi Skype ID: maurizioxyz linux user 552742 _______________________________________________ R-sig-Geo mailing list [hidden email] https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Global and Local Moran: how can I calculate them with different spatial threshold?

 Administrator On Fri, 10 Mar 2017, Maurizio Marchi wrote: > Hello everybody, > I need to calculate the Global and Local Moran indices in R using a > variable distance as threshold: I have a SpatialPointsDataFrame with > almost 300 points and I want to calculate the Global Moran index using > 4 different distances (e.g 5 km - 10 km - 50 km - 100 km). > I know the 'ape' and 'spdep' packages but it seems that no adjustment > can be done concerning the spatial width to be considered... Please examine ?spdep::dnearneigh, especially d1= and d2=, which do exactly what you ask for. The functions in spdep are modularised, first construct the neighbour object, then the weights list object, then the Moran tests. Note that Moran tests should really be run on regression residuals (lm.morantest(), localmoran.sad() or localmoran.exact()), and remember to adjust p.values for banded local tests (many tests using the same data affect tabulated significance levels). The ape function makes undocumented assumptions about what you may want, spdep requires that you know what you want to do. Hope this clarifies, Roger > Thanks > > -- Roger Bivand Department of Economics, Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; e-mail: [hidden email] Editor-in-Chief of The R Journal, https://journal.r-project.org/index.htmlhttp://orcid.org/0000-0003-2392-6140https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=enhttp://depsy.org/person/444584_______________________________________________ R-sig-Geo mailing list [hidden email] https://stat.ethz.ch/mailman/listinfo/r-sig-geo Roger Bivand Department of Economics Norwegian School of Economics Helleveien 30 N-5045 Bergen, Norway