Skip to contents

Calculate Global Moran's I

Usage

global_moran(x, nb, wt, na_ok = FALSE, ...)

Arguments

x

A numeric vector.

nb

a neighbor list object for example as created by st_contiguity().

wt

a weights list as created by st_weights().

na_ok

default FALSE. If FALSE presence or NA or Inf results in an error.

...

additional arguments passed to spdep::moran().

Value

an htest object

See also

Examples

nb <- guerry_nb$nb
wt <- guerry_nb$wt
x <- guerry_nb$crime_pers
moran <- global_moran(x, nb, wt)