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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

maurizio
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
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Roger Bivand
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.html
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
http://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
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

maurizio
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 <[hidden email]> 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: [hidden email]
> 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]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Loading...