Learn R Programming

GD (version 1.6)

sesu: Comparison of size effects of spatial units.

Description

Function for comparison of size effects of spatial units in spatial heterogeneity analysis.

Usage

sesu(gdlist, su)

Arguments

gdlist

A list of gdm result or gd result

su

A vector of sizes of spatial units

Examples

Run this code
# NOT RUN {
ndvilist <- list(ndvi_30, ndvi_40, ndvi_50)
su <- c(30,40,50) ## sizes of spatial units
gdlist <- list() ## list of all geographical detectors results
## set optional parameters of optimal discretization
## optional methods: equal, natural, quantile, geometric, sd and manual
discmethod <- c("equal","natural","quantile")
discitv <- c(4:6)
## "gdm" function
for (i in 1:length(su)){
  ndvidata <- ndvilist[[i]]
  gdlist[[i]] <- gdm(NDVIchange ~ Climatezone + Mining + Tempchange + GDP,
                     continuous_variable = c("Tempchange", "GDP"),
                     data = ndvidata,
                     discmethod = discmethod, discitv = discitv)
}
sesu(gdlist, su) ## size effects of spatial units

# }

Run the code above in your browser using DataLab