local_jc_bv: Bivariate local join count

View source: R/joincount-bv-impl.R

local_jc_bvR Documentation

Bivariate local join count

Description

Bivariate local join count

Usage

local_jc_bv(x, z, nb, wt, nsim = 499)

Arguments

x

a binary variable either numeric or logical

z

a binary variable either numeric or logical

nb

a neighbors list object.

wt

default st_weights(nb, style = "B"). A binary weights list as created by st_weights(nb, style = "B").

nsim

the number of conditional permutation simulations

Value

a data.frame with two columns join_count and p_sim and number of rows equal to the length of arguments x, z, nb, and wt.

Examples

x <- as.integer(guerry$infants > 23574)
z <- as.integer(guerry$donations > 10973)
nb <- st_contiguity(guerry)
wt <- st_weights(nb, style = "B")
local_jc_bv(x, z, nb, wt)

JosiahParry/sfdep documentation built on Sept. 7, 2024, 6:15 a.m.