spade {gdverse} | R Documentation |
Function for spatial association detector (SPADE) model.
spade(
formula,
data,
wt = NULL,
locations = NULL,
discnum = NULL,
discmethod = NULL,
cores = 1,
seed = 123456789,
permutations = 0,
...
)
formula |
A formula of spatial association detector (SPADE) model. |
data |
A data.frame or tibble of observation data. |
wt |
(optional) The spatial weight matrix. When |
locations |
(optional) The spatial location coordinates columns name in |
discnum |
(optional) Number of multilevel discretization. Default will use |
discmethod |
(optional) The discretization methods. Default all use |
cores |
(optional) A positive integer(default is 1). If cores > 1, use parallel computation. |
seed |
(optional) Random number seed, default is |
permutations |
(optional) The number of permutations for the PSD computation. Default is |
... |
(optional) Other arguments passed to |
A list of the SPADE model result.
factor
the result of SPADE model
The columns in the locations
part of data are only used to construct spatial weight matrix
when wt
is NULL
, and are not considered as explanatory variables. If you need to include
spatial locations as explanatory variables, build a spatial weight matrix ahead of time,
leaving the locations
parameter to NULL
.The most recommended method is to explicitly
specify all variables in formula
instead of using .
!
Wenbo Lv lyu.geosocial@gmail.com
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')
g = spade(y ~ ., data = sim,
locations = c('lo','la'),
discvar = c("xa","xb","xc"))
g