Function for robust interaction detector(RID) model.
Usage
rid(
formula,
data,
discvar = NULL,
discnum = 10,
overlay = "intersection",
minsize = 1,
cores = 1
)
Arguments
- formula
A formula of RID model.
- data
A data.frame, tibble or sf object of observation data.
- discvar
Name of continuous variable columns that need to be discretized. Noted that when
formula
hasdiscvar
,data
must have these columns. By default, all independent variables are used asdiscvar
.- discnum
A numeric vector for the number of discretized classes of columns that need to be discretized. Default all
discvar
use10
.- overlay
(optional) Spatial overlay method. One of
and
,or
,intersection
. Default isintersection
.- minsize
(optional) The min size of each discretization group. Default all use
1
.- cores
(optional) Positive integer (default is 1). When cores are greater than 1, use multi-core parallel computing.
Note
The RID model requires at least \(2^n-1\) calculations when has \(n\) explanatory variables. When there are more than 10 explanatory variables, carefully consider the computational burden of this model. When there are a large number of explanatory variables, the data dimensionality reduction method can be used to ensure the trade-off between analysis results and calculation speed.
Please set up python dependence and configure GDVERSE_PYTHON
environment variable if you want to run rid()
.
See vignette('rgdrid',package = 'gdverse')
for more details.
References
Zhang, Z., Song, Y., Karunaratne, L., & Wu, P. (2024). Robust interaction detector: A case of road life expectancy analysis. Spatial Statistics, 59(100814), 100814. https://doi.org/10.1016/j.spasta.2024.100814
Author
Wenbo Lv lyu.geosocial@gmail.com