Returns spatially enhanced and entropy-derived matrix (SpEED) for matching analysis
Usage
speedmat(
data,
formula,
outcome = "outcome",
treatment = "treatment",
mode_speed = "product",
coords = NULL,
coords_factor = NULL,
caliper_s = NULL,
caliper_jsd = NULL,
scale = FALSE
)Arguments
- data
sf object. Should include outcome, treatment, and coordinates (if
speed_mode == "coord")- formula
formula. in
y ~ xform.- outcome
character(1). Outcome variable name. Default is
'outcome'- treatment
character(1). Treatment variable name. Default is
'treatment'- mode_speed
character(1). One of
'product'(JSD%*%D)or'coord'(JSD(cbind(covariates, X, Y)))- coords
character(2). Names of the columns with x- and y-dimension coordinates. Only valid for
mode_speed=='coord'- coords_factor
numeric(1). Coordinate weights after standardization. Only valid when
mode_speed=='coord'- caliper_s
numeric(1). Caliper for distance
- caliper_jsd
numeric(1). Caliper for divergence value
- scale
logical(1). Min-max scaling for both distance and divergence, resulting in range [0,1]