###############
## 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)
if (FALSE) {
#############
## 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)
}
Run the code above in your browser using DataLab