Skip to contents

Function for calculate compensated power of spatial determinant Q_s.

Usage

cpsd_spade(yobs, xobs, xdisc, wt)

Arguments

yobs

Variable Y

xobs

The original undiscretized covariable X.

xdisc

The discretized covariable X.

wt

The spatial weight matrix.

Value

A value of compensated power of spatial determinant Q_s.

Details

The power of compensated spatial determinant formula is

\(Q_s = \frac{q_s}{q_{s_{inforkep}}} = \frac{1 - \frac{\sum_{h=1}^L N_h \Gamma_{kdep}}{N \Gamma_{totaldep}}}{1 - \frac{\sum_{h=1}^L N_h \Gamma_{hind}}{N \Gamma_{totalind}}}\)

References

Xuezhi Cang & Wei Luo (2018) Spatial association detector (SPADE),International Journal of Geographical Information Science, 32:10, 2055-2075, DOI: 10.1080/13658816.2018.1476693

Author

Wenbo Lv lyu.geosocial@gmail.com

Examples

data('sim')
wt = inverse_distance_weight(sim$lo,sim$la)
xa = sim$xa
xa_disc = st_unidisc(xa,5)
cpsd_spade(sim$y,xa,xa_disc,wt)
#> [1] 0.3424526