Re: [R] R: Moran's I

From: Roger Bivand <Roger.Bivand_at_nhh.no>
Date: Sat 05 Mar 2005 - 21:32:41 EST


On Fri, 4 Mar 2005, Theresa Sinicrope Talley wrote:

> Hi-
> I would like to assign distance classes (lags) to the moran's I test in R.
>
> I don¹t have equally spaced points since I was mapping shrubs across a
> landscape (vs. an experiment or survey in a grid). I somehow need to
> select points based on the distances in the distance matrix (i.e., I need to
> select all pairs of points that occur 0-25 m from each other, 25-50 m,
> etc...).
>
> Does anyone have code or a detailed procedure for subsampling or dividing a
> dataset into distance classes for moran¹s I (or mantel test)?
> I know there is sp.correlogram but I need significance values for each I
> value and I need to use distance lags, not lags of number of polygons.
>

If you need to follow this up further, please consider moving your reply to the r-sig-geo list (access from http://www.r-project.org/Rgeo).

In the spdep package, you can define distance based lists of neighbours by:

nb0_25 <- dnearneigh(points, d1=0, d2=25) nb25_50 <- dnearneigh(points, d1=25, d2=50)

then calculate Moran's I (moran.test()) or a chosen Mantel test (sp.mantel.mc()) using these lists. You are right that sp.correlogram() is not appropriate in this setting.

>
> Any suggestions would be appreciated.
> Best wishes, theresa
>
>
>

-- 
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@nhh.no

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Sat Mar 05 21:49:47 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:41 EST