geodetector {gdverse}R Documentation

geographical detector(GD) model

Description

geographical detector(GD) model

Usage

geodetector(formula, data, type = "factor", alpha = 0.95)

Arguments

formula

A formula of geographical detector model.

data

A data.frame or tibble of observation data.

type

(optional) The type of geographical detector, which must be one of factor(default), interaction, risk, ecological.

alpha

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

Value

A list of tibble with the corresponding result under different detector types.

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

Note that only one type of geodetector is supported at a time in geodetector().

Author(s)

Wenbo Lv lyu.geosocial@gmail.com

References

Jin‐Feng Wang, Xin‐Hu Li, George Christakos, Yi‐Lan Liao, Tin Zhang, XueGu & Xiao‐Ying Zheng (2010) Geographical Detectors‐Based Health Risk Assessment and its Application in the Neural Tube Defects Study of the Heshun Region, China, International Journal of Geographical Information Science, 24:1, 107-127, DOI: 10.1080/13658810802443457

Examples

geodetector(y ~ x1 + x2,
   tibble::tibble(y = 1:7,
                  x1 = c('x',rep('y',3),rep('z',3)),
                  x2 = c(rep('a',2),rep('b',2),rep('c',3))))

geodetector(y ~ x1 + x2,
   tibble::tibble(y = 1:7,
                  x1 = c('x',rep('y',3),rep('z',3)),
                  x2 = c(rep('a',2),rep('b',2),rep('c',3))),
   type = 'interaction')

geodetector(y ~ x1 + x2,
   tibble::tibble(y = 1:7,
                  x1 = c('x',rep('y',3),rep('z',3)),
                  x2 = c(rep('a',2),rep('b',2),rep('c',3))),
   type = 'risk',alpha = 0.95)

geodetector(y ~ x1 + x2,
   tibble::tibble(y = 1:7,
                  x1 = c('x',rep('y',3),rep('z',3)),
                  x2 = c(rep('a',2),rep('b',2),rep('c',3))),
   type = 'ecological',alpha = 0.95)


[Package gdverse version 1.0-1 Index]