SpEED matrix by accounting for the weighted coordinate variables
Source:R/speedmat.r
speedmat.coord.RdReturns 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 ~ xform.- 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.