rid {gdverse} | R Documentation |
robust interaction detector(RID) model
Description
robust interaction detector(RID) model
Usage
rid(
formula,
data,
discvar = NULL,
discnum = 3:8,
minsize = 1,
strategy = 2L,
increase_rate = 0.05,
cores = 1
)
Arguments
formula |
A formula of RGD model. |
data |
A |
discvar |
Name of continuous variable columns that need to be discretized. Noted that
when |
discnum |
A numeric vector of discretized classes of columns that need to be discretized.
Default all |
minsize |
(optional) The min size of each discretization group. Default all use |
strategy |
(optional) Optimal 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. |
Value
A list.
interaction
the result of RID model
Note
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.
Author(s)
Wenbo Lv lyu.geosocial@gmail.com
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
Examples
## Not run:
## The following code needs to configure the Python environment to run:
data('sim')
g = rid(y ~ .,
data = dplyr::select(sim,-dplyr::any_of(c('lo','la'))),
discnum = 3:6, cores = 1)
g
## End(Not run)