rgd {gdverse}R Documentation

robust geographical detector(RGD) model

Description

Function for robust geographical detector(RGD) model.

Usage

rgd(
  formula,
  data,
  discvar,
  discnum = NULL,
  minsize = NULL,
  cores = 1,
  type = "factor",
  alpha = 0.95
)

Arguments

formula

A formula of RGD model.

data

A data.frame or tibble of observation data.

discvar

Name of continuous variable columns that need to be discretized. Noted that when formula has discvar, data must have these columns.

discnum

A numeric vector of discretized classes of columns that need to be discretized. Default all discvar use 10.

minsize

(optional) The min size of each discretization group. Default all use 1.

cores

(optional) Positive integer(default is 1). If cores > 1, use python joblib package to parallel computation.

type

(optional) The type of geographical detector, which must be factor(default), interaction, risk, ecological.You can run one or more types at one time.

alpha

(optional) Specifies the size of confidence level. Default is 0.95.

Value

A list of the RGD model result.

factor

the result of factor detector

interaction

the result of interaction detector

risk

the result of risk detector

ecological

the result of ecological detector

Note

Please set up python dependence and configure GDVERSE_PYTHON environment variable if you want to run rgd(). See vignette('RGDRID',package = 'gdverse') for more details.

Author(s)

Wenbo Lv lyu.geosocial@gmail.com

References

Zhang, Z., Song, Y.*, & Wu, P., 2022. Robust geographical detector. International Journal of Applied Earth Observation and Geoinformation. 109, 102782. DOI: 10.1016/j.jag.2022.102782.

Examples

## Not run: 
## The following code needs to configure the Python environment to run:
data('ndvi')
g = rgd(NDVIchange ~ ., data = ndvi, discvar = names(ndvi)[-1:-3],
        cores = 6, type =c('factor','interaction'))

## End(Not run)

[Package gdverse version 1.0.0 Index]