| cpsd_disc | R Documentation |
Function for determining the optimal spatial data discretization based on SPADE q-statistics.
cpsd_disc(
formula,
data,
wt,
discnum = 3:8,
discmethod = "quantile",
strategy = 2L,
increase_rate = 0.05,
cores = 1,
seed = 123456789,
...
)
formula |
A formula of optimal spatial data discretization. |
data |
A |
wt |
The spatial weight matrix. |
discnum |
(optional) A vector of number of classes for discretization. Default is |
discmethod |
(optional) The discretization methods. Default all use |
strategy |
(optional) Discretization strategy. When |
increase_rate |
(optional) The critical increase rate of the number of discretization.
Default is |
cores |
(optional) Positive integer (default is 1). When cores are greater than 1, use multi-core parallel computing. |
seed |
(optional) Random seed number, default is |
... |
(optional) Other arguments passed to |
A list.
xdiscretization variable name
koptimal number of spatial data discreteization
methodoptimal spatial data discretization method
discthe result of optimal spatial data discretization
When the discmethod is configured to robust, it will operate at a significantly reduced speed.
Consequently, the use of robust discretization is not advised.
Wenbo Lv lyu.geosocial@gmail.com
Yongze Song & Peng Wu (2021) An interactive detector for spatial associations, International Journal of Geographical Information Science, 35:8, 1676-1701, DOI:10.1080/13658816.2021.1882680
data('sim')
wt = sdsfun::inverse_distance_swm(sf::st_as_sf(sim,coords = c('lo','la')))
cpsd_disc(y ~ xa + xb + xc, data = sim, wt = wt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.