Learn R Programming

spdep (version 0.1-10)

lm.morantest.sad: Saddlepoint approximation of global Moran's I test

Description

The function implements Tiefelsdorf's application of the Saddlepoint approximation to global Moran's I's reference distribution.

Usage

lm.morantest.sad(model, listw, zero.policy=FALSE, alternative="greater", 
  spChk=NULL, tol=.Machine$double.eps^0.5, maxiter=1000)
print.moransad(x, ...)
summary.moransad(object, ...)
print.summary.moransad(x, ...)

Arguments

model
an object of class lm returned by lm; weights and offsets should not be used
listw
a listw object created for example by nb2listw
zero.policy
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), less or two.sided.
spChk
should the data vector names be checked against the spatial objects for identity integrity, TRUE, or FALSE, default NULL to use get.spChkOption()
tol
the desired accuracy (convergence tolerance) for uniroot
maxiter
the maximum number of iterations for uniroot
x
object to be printed
object
object to be summarised
...
arguments to be passed through

Value

  • A list of class moransad with the following components:
  • statisticthe value of the saddlepoint approximation of the standard deviate of global Moran's I.
  • p.valuethe p-value of the test.
  • estimatethe value of the observed global Moran's I.
  • alternativea character string describing the alternative hypothesis.
  • methoda character string giving the method used.
  • data.namea character string giving the name(s) of the data.
  • internal1Saddlepoint omega, r and u
  • internal2f.root, iter and estim.prec from uniroot
  • dfdegrees of freedom
  • taueigenvalues (excluding zero values)

Details

The function involves finding the eigenvalues of an n by n matrix, and numerically finding the root for the Saddlepoint approximation, and should therefore only be used with care when n is large.

References

Tiefelsdorf, M. 2002 The Saddlepoint approximation of Moran's I and local Moran's Ii reference distributions and their numerical evaluation. Geographical Analysis, forthcoming; see also Tiefelsdorf's SPSS code: http://geog-www.sbs.ohio-state.edu/faculty/tiefelsdorf/GeoStat.htm.

See Also

lm.morantest

Examples

Run this code
data(eire)
e.lm <- lm(OWNCONS ~ ROADACC, data=eire.df)
lm.morantest(e.lm, nb2listw(eire.nb))
lm.morantest.sad(e.lm, nb2listw(eire.nb))
summary(lm.morantest.sad(e.lm, nb2listw(eire.nb)))

Run the code above in your browser using DataLab