[R] How to do the significant test on Local Moran's I

Roger Bivand Roger.Bivand at nhh.no
Wed Apr 16 11:28:28 CEST 2003

On Mon, 14 Apr 2003, Danlin Yu wrote:

>     I've tried professor Roger Bivand's spdep package
> for a while, and found it is quite useful. However,
> when considering the significance test of the local
> moran's index under the assumption of both normality
> and randomization, I just can't get a clue from the
> package's calculating results. I also read professor
> Luc Anselin's 1995 LISA paper (geographical analysis),
> but cannot figure out a way of using R to do the
> significant test. I know I must missed something, but
> just don't know what is it. Could anybody give a hand?

The ideas are in the documentation and references of the functions you
refer to in the spdep package: localmoran(), localG(), and
localmoran.sad(). You need to recall that doing lots of local
"significance" tests on the same data means that you have to apply
corrections, as in p.adjust(), to any p-values you might compute. If you
are just testing a single relationship (values of x in Rhode Island are
correlated with values of x in its contiguous neighbours), you can do that
in the standard way, but you cannot extend this to gat a map of p-values -
they will be very misleading, as the references point out - Ord, J. K. and
Getis, A. 1995 Local spatial autocorrelation statistics: distributional
issues and an application. Geographical Analysis, 27, 286-306 - have a 
table of corrections. 

The functions in the package let you compute the pieces you need to do the
test, but do not provide any p-values, because the function cannot know
how many tests you are doing on the same data - you have to do that. That
is also why localmoran.sad() returns a list of "htest" objects, to point
up the fact that you should decide yourself what you are trying to test.

Please also be aware that by modifying the boundaries of the aggregations 
you may be analysing, you can often choose the test results you might like 
(the Modifiable Areal Unit Problem), so your "significance" tests may not 
actually be very informative.


Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no

More information about the R-help mailing list