Function for interactive detector for spatial associations model.
idsa(
formula,
data,
wt = NULL,
discnum = 3:8,
discmethod = "quantile",
overlay = "and",
strategy = 2L,
increase_rate = 0.05,
cores = 1,
seed = 123456789,
alpha = 0.95,
...
)A list.
interactionthe interaction result of IDSA model
riskwhether values of the response variable between a pair of overlay zones are significantly different
number_individual_explanatory_variablesthe number of individual explanatory variables used for examining the interaction effects
number_overlay_zonesthe number of overlay zones
percentage_finely_divided_zonesthe percentage of finely divided zones that are determined by the interaction of variables
A formula of IDSA model.
A data.frame, tibble or sf object of observation data.
(optional) The spatial weight matrix. When data is not an sf object, must provide wt.
(optional) Number of multilevel discretization. Default will use 3:8.
(optional) The discretization methods. Default all use quantile.
Noted that robust will use robust_disc(); rpart will use rpart_disc();
Others use sdsfun::discretize_vector().
(optional) Spatial overlay method. One of and, or, intersection.
Default is and.
(optional) Discretization strategy. When strategy is 1L, choose the highest SPADE model q-statistics to
determinate optimal spatial data discretization parameters. When strategy is 2L, The optimal discrete parameters of
spatial data are selected by combining LOESS model.
(optional) The critical increase rate of the number of discretization.
Default is 5%.
(optional) Positive integer (default is 1). When cores are greater than 1, use multi-core parallel computing.
(optional) Random number seed, default is 123456789.
(optional) Specifies the size of confidence level. Default is 0.95.
(optional) Other arguments passed to cpsd_disc().
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')
sim1 = sf::st_as_sf(sim,coords = c('lo','la'))
g = idsa(y ~ ., data = sim1)
g
Run the code above in your browser using DataLab