Learn R Programming

sfdep (version 0.2.5)

global_moran: Calculate Global Moran's I

Description

Calculate Global Moran's I

Usage

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

Value

an htest object

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().

See Also

Other global_moran: global_moran_bv(), global_moran_perm(), global_moran_test(), local_moran_bv()

Examples

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

Run the code above in your browser using DataLab