powered by
Function for calculate compensated power of spatial determinant Q_s.
Q_s
cpsd_spade(yobs, xobs, xdisc, wt)
A value of compensated power of spatial determinant Q_s.
Variable Y
The original undiscretized covariable X.
The discretized covariable X.
The spatial weight matrix.
Wenbo Lv lyu.geosocial@gmail.com
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}}}\)
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
data('sim') wt = sdsfun::inverse_distance_swm(sf::st_as_sf(sim,coords = c('lo','la'))) xa = sim$xa xa_disc = sdsfun::discretize_vector(xa,5) cpsd_spade(sim$y,xa,xa_disc,wt)
Run the code above in your browser using DataLab