Create a distance-based weights

gda_distance_weights(
  geoda_obj,
  dist_thres,
  power = 1,
  is_inverse = FALSE,
  is_arc = FALSE,
  is_mile = TRUE
)

Arguments

geoda_obj

An instance of geoda-class

dist_thres

A positive numeric value of distance threshold

power

(optional) The power (or exponent) of a number indicates how many times to use the number in a multiplication.

is_inverse

(optional) FALSE (default) or TRUE, apply inverse on distance value

is_arc

(optional) FALSE (default) or TRUE, compute arc distance between two observations

is_mile

(optional) TRUE (default) or FALSE, convert distance unit from mile to km.

Value

An instance of Weight-class

Examples

if (FALSE) { # \dontrun{
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- geoda_open(guerry_path)
dist_thres <- gda_min_distthreshold(guerry)
dist_w <- gda_distance_weights(guerry, dist_thres)
summary(dist_w)
} # }