Skip to contents

Returns the Jensen-Shannon divergence with weighted coordinates

Usage

speedmat.coord(
  data,
  formula,
  outcome = "outcome",
  treatment = "treatment",
  coords = c("X", "Y"),
  coords_factor = 10L
)

Arguments

data

sf object. Should include outcome, treatment, and coordinates

formula

formula. in y ~ x form.

outcome

character(1). Outcome variable name. Default is 'outcome'

treatment

character(1). Treatment variable name. Default is 'treatment'

coords

character(2). Names of the columns with x- and y-dimension coordinates.

coords_factor

numeric(1). Coordinate weights after standardization.

Author

Insang Song (sigmafelix@hotmail.com)