Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sp.mantel.mc

Mantel-Hubert spatial general cross product statistic


Description

A permutation test for the spatial general cross product statistic with Moran (C(i,j) = z(i)*z(j)), Geary (C(i,j) = (z(i) - z(j))^2), and Sokal (C(i,j) = |z(i) - z(j)|) criteria, for z(i) = (x(i) - mean(x))/sd(x). plot.mc.sim is a helper function to plot the outcomes of the permutation test.

Usage

sp.mantel.mc(var, listw, nsim, type = "moran", zero.policy = NULL,
 alternative = "greater", spChk=NULL, return_boot=FALSE)
## S3 method for class 'mc.sim'
plot(x, xlim, xlab, main, sub, ..., ptype="density")

Arguments

var

a numeric vector the same length as the neighbours list in listw

listw

a listw object created for example by nb2listw

nsim

number of permutations

type

"moran", "geary" or "sokal" criteria for similarity

zero.policy

default NULL, use global option value; if TRUE assign zero to the lagged value of zones without neighbours, if FALSE assign NA

alternative

a character string specifying the alternative hypothesis, must be one of "greater" (default), or "less".

spChk

should the data vector names be checked against the spatial objects for identity integrity, TRUE, or FALSE, default NULL to use get.spChkOption()

return_boot

return an object of class boot from the equivalent permutation bootstrap rather than an object of class htest

x

the object to be plotted

xlim

the range of the x axis

xlab

a title for the x axis

main

an overall title for the plot

sub

a sub title for the plot

ptype

either "density" or "hist"

...

further arguments passed through

Value

A list with class htest and mc.sim containing the following components:

statistic

the value of the observed Geary's C.

parameter

the rank of the observed Geary's C.

alternative

a character string describing the alternative hypothesis.

method

a character string giving the method used.

data.name

a character string giving the name(s) of the data, and the number of simulations.

p.value

the pseudo p-value of the test.

res

nsim simulated values of statistic, final value is observed statistic

estimate

the mean and variance of the simulated distribution.

Author(s)

Roger Bivand Roger.Bivand@nhh.no

References

Cliff, A. D., Ord, J. K. 1981 Spatial processes, Pion, p. 22-24, Haining, R. 1990 Spatial data analysis in the social and environmental sciences, Cambridge: Cambridge University Press, p. 230–1. The function has been checked against general matrix code posted to the r-help list by Ben Bolker on 1 May 2001; another mantel() function is in the vegan package.

See Also

Examples

data(oldcol)
sim1 <- sp.mantel.mc(COL.OLD$CRIME, nb2listw(COL.nb),
 nsim=99, type="geary", alternative="less")
sim1
plot(sim1)
sp.mantel.mc(COL.OLD$CRIME, nb2listw(COL.nb), nsim=99,
 type="sokal", alternative="less")
sp.mantel.mc(COL.OLD$CRIME, nb2listw(COL.nb), nsim=99,
 type="moran")

spdep

Spatial Dependence: Weighting Schemes, Statistics

v1.1-11
GPL (>= 2)
Authors
Roger Bivand [cre, aut] (<https://orcid.org/0000-0003-2392-6140>), Micah Altman [ctb], Luc Anselin [ctb], Renato Assunção [ctb], Olaf Berke [ctb], Andrew Bernat [ctb], Guillaume Blanchet [ctb], Eric Blankmeyer [ctb], Marilia Carvalho [ctb], Bjarke Christensen [ctb], Yongwan Chun [ctb], Carsten Dormann [ctb], Stéphane Dray [ctb], Virgilio Gómez-Rubio [ctb], Martin Gubri [ctb], Rein Halbersma [ctb], Elias Krainski [ctb], Pierre Legendre [ctb], Nicholas Lewin-Koh [ctb], Angela Li [ctb], Hongfei Li [ctb], Jielai Ma [ctb], Abhirup Mallik [ctb, trl], Giovanni Millo [ctb], Werner Mueller [ctb], Hisaji Ono [ctb], Pedro Peres-Neto [ctb], Gianfranco Piras [ctb], Markus Reder [ctb], Jeff Sauer [ctb], Michael Tiefelsdorf [ctb], René Westerholt [ctb], Levi Wolf [ctb], Danlin Yu [ctb]
Initial release
2021-09-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.