correlog: Computes Moran's or Geary's coefficients on distance classes

correlogR Documentation

Computes Moran's or Geary's coefficients on distance classes

Description

Computes Moran's or Geary's coefficients on distance classes from a set of spatial coordinates and corresponding z values

Usage

correlog(coords, z, method="Moran", nbclass = NULL,...)

Arguments

coords

a two columns array, data.frame or matrix of spatial coordinates. Column 1 = X, Column 2 = Y.

z

a vector for the values at each location. Must have the same length as the row number of coords

method

the method used. Must be "Moran" (default) or "Geary"

nbclass

number of bins. If NULL Sturges method is used to compute an optimal number

...

further arguments to pass to e.g. moran.test or geary.test

Details

Uses the library spdep including moran.test or geary.test. Distances are euclidian and in the same unit as the spatial coordinates. Moran's Ho: I values larger than 0 due to chance; Geary's Ho: C values lesser than 1 due to chance. Correlog has print and plot methods; statistically significant values (p<0.05) are plotted in red.

Value

An object of class "correlog", a matrix including:

class

bin centers

I

the coefficient values

p.value

probability of Ho

n

the number of pairs

Warning

Computing can take a long time for large data sets

Author(s)

Patrick Giraudoux pgiraudo@univ-fcomte.fr, Colin Beale c.beale@macaulay.ac.uk and Mike Treglia mike-treglia@utulsa.edu

References

see library spdep

See Also

geary.test, moran.test

Examples


library(spdep)
data(oldcol)
attach(COL.OLD)
coords<-cbind(X,Y)
res<-correlog(coords,CRIME)
plot(res)

res<-correlog(coords,CRIME,method="Geary")
plot(res)


pgirmess documentation built on April 8, 2023, 1:12 a.m.

Related to correlog in pgirmess...