gdm {GD} | R Documentation |
Geographical detectors: a one-step function.
Description
A one-step function for optimal discretization and geographical detectors for multiple variables and visualization.
Usage
gdm(formula, continuous_variable = NULL, data = NULL, discmethod, discitv)
## S3 method for class 'gdm'
print(x, ...)
## S3 method for class 'gdm'
plot(x, ...)
Arguments
formula |
A formula of response and explanatory variables |
continuous_variable |
A vector of continuous variable names |
data |
A data.frame includes response and explanatory variables |
discmethod |
A character vector of discretization methods |
discitv |
A numeric vector of numbers of intervals |
x |
A list of |
... |
Ignore |
Examples
###############
## NDVI: ndvi_40
###############
## set optional parameters of optimal discretization
## optional methods: equal, natural, quantile, geometric, sd and manual
discmethod <- c("equal","quantile")
discitv <- c(4:5)
## "gdm" function
ndvigdm <- gdm(NDVIchange ~ Climatezone + Mining + Tempchange,
continuous_variable = c("Tempchange"),
data = ndvi_40,
discmethod = discmethod, discitv = discitv)
ndvigdm
plot(ndvigdm)
## Not run:
#############
## H1N1: h1n1_100
#############
## set optional parameters of optimal discretization
discmethod <- c("equal","natural","quantile")
discitv <- c(4:6)
continuous_variable <- colnames(h1n1_100)[-c(1,11)]
## "gdm" function
h1n1gdm <- gdm(H1N1 ~ .,
continuous_variable = continuous_variable,
data = h1n1_100,
discmethod = discmethod, discitv = discitv)
h1n1gdm
plot(h1n1gdm)
## End(Not run)
[Package GD version 10.3 Index]