[R-sig-Geo] Global and Local Moran: how can I calculate them with different spatial threshold?

Maurizio Marchi mauriziomarchi85 at gmail.com
Sat Mar 11 00:45:08 CET 2017


Perfect, thank you very much to everybody,
Next week I will work on my data. Now everything is much clearer!

Regards

Il giorno ven 10 mar 2017 alle 21:44 Roger Bivand <Roger.Bivand at nhh.no> ha
scritto:

> 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: Roger.Bivand at nhh.no
> Editor-in-Chief of The R Journal, https://journal.r-project.org/index.html
> http://orcid.org/0000-0003-2392-6140
> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
> http://depsy.org/person/444584
>
-- 
Maurizio Marchi
Skype ID: maurizioxyz
linux user 552742

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list