Function for calculate power of spatial and multilevel discretization determinant and the corresponding pseudo-p value.
psmd_pseudop(
yobs,
xobs,
wt,
discnum = 3:22,
discmethod = "quantile",
cores = 1,
seed = 123456789,
permutations = 0,
...
)A tibble of power of spatial and multilevel discretization determinant and the corresponding pseudo-p value.
Variable Y
The original undiscretized covariable X.
The spatial weight matrix.
(optional) Number of multilevel discretization. Default will use 3:22.
(optional) The discretization methods. Default will use quantile.
If discmethod is set to robust, the function robust_disc() will be used. Conversely,
if discmethod is set to rpart, the rpart_disc() function will be used. Others use
sdsfun::discretize_vector(). Currently, only one discmethod can be used at a time.
(optional) A positive integer(default is 1). If cores > 1, use parallel computation.
(optional) Random seed number, default is 123456789.
(optional) The number of permutations for the PSD computation. Default is 0,
which means no pseudo-p values are calculated.
(optional) Other arguments passed to sdsfun::discretize_vector(),robust_disc() or rpart_disc().
Wenbo Lv lyu.geosocial@gmail.com
The power of spatial and multilevel discretization determinant formula is \(PSMDQ_s = MEAN(Q_s)\)
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 = inverse_distance_weight(sim$lo,sim$la)
psmd_pseudop(sim$y,sim$xa,wt)
Run the code above in your browser using DataLab