local_moran_bv: Compute the Local Bivariate Moran's I Statistic

View source: R/local-moran-bv-impl.R

local_moran_bvR Documentation

Compute the Local Bivariate Moran's I Statistic

Description

Given two continuous numeric variables, calculate the bivariate Local Moran's I.

Usage

local_moran_bv(x, y, nb, wt, nsim = 499)

Arguments

x

a numeric vector of same length as y.

y

a numeric vector of same length as x.

nb

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

wt

a weights list as created by st_weights().

nsim

the number of simulations to run.

Details

The Bivariate Local Moran, like its global counterpart, evaluates the value of x at observation i with its spatial neighbors' value of y. The value of

I_i^B

is just xi * Wyi. Or, in simpler words the local bivariate Moran is the result of multiplying x by the spatial lag of y. Formally it is defined as

I_i^B= cx_i\Sigma_j{w_{ij}y_j}

Value

a data.frame containing two columns Ib and p_sim containing the local bivariate Moran's I and simulated p-values respectively.

References

Local Spatial Autocorrelation (3): Multivariate Local Spatial Autocorrelation, Luc Anselin

See Also

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

Examples

x <- guerry_nb$crime_pers
y <- guerry_nb$wealth
nb <- guerry_nb$nb
wt <- guerry_nb$wt
local_moran_bv(x, y, nb, wt)

sfdep documentation built on Sept. 13, 2024, 5:07 p.m.