sp_balance {spsurvey} | R Documentation |
Calculate spatial balance metrics
Description
This function measures the spatial balance (with respect to the sampling frame) of design sites using Voronoi polygons (Dirichlet tessellations).
Usage
sp_balance(
object,
sframe,
stratum_var = NULL,
ip = NULL,
metrics = "pielou",
extents = FALSE
)
Arguments
object |
An |
sframe |
The sampling frame as an |
stratum_var |
The name of the stratum variable in |
ip |
Inclusion probabilities associated with each row of |
metrics |
A character vector of spatial balance metrics:
All spatial balance metrics have a lower bound of zero, which indicates perfect spatial balance. As the metric value increases, the spatial balance decreases. |
extents |
Should the extent (total units) within each Voronoi polygon
be returned? Defaults to |
Value
A data frame with columns providing the stratum (stratum
),
spatial balance metric (metric
), and spatial balance (value
).
Author(s)
Michael Dumelle Dumelle.Michael@epa.gov
Examples
## Not run:
sample <- grts(NE_Lakes, 30)
sp_balance(sample$sites_base, NE_Lakes)
strata_n <- c(low = 25, high = 30)
sample_strat <- grts(NE_Lakes, n_base = strata_n, stratum_var = "ELEV_CAT")
sp_balance(sample_strat$sites_base, NE_Lakes, stratum_var = "ELEV_CAT", metric = "rmse")
## End(Not run)