Description Usage Arguments Details Value
View source: R/gen_hsa_clust.R
Generate HSAs via Delamater's two step clustering approach
1 2 3 | gen_hsa_clust(shp, from, to, li_threshold = 0.4,
min_interventions = 10, fill = TRUE, min_clusters = 2,
max_clusters = NULL, peaks = "dela")
|
shp |
shapefile SpatialPolygonsDataFrame |
from |
patients home region |
to |
patients destination |
li_threshold |
localization index threshold |
min_interventions |
minimum number of interventions for HSAs to have |
fill |
logical; fill in sources without any patients based on neighbours (defaults to TRUE) see details |
min_clusters |
minimum number of HSAs in final solution |
max_clusters |
maximum number of HSAs in final solution |
Rownames of shp
should be in common with from
and to
. If this is not the case, warnings (if some are missing) or errors will be issued (if no names are in common). Rownames can be set via, e.g., spChFIDs(shp, shp@data$name)
.
If fill
is set to TRUE
, observations from neighbouring regions are added to from
to enable the missing region to be allocated to a HSA. The observations are not used in calculating the LI for the heuristic selection of the appropriate number of HSAs though.
object of class hsa containing the following elements:
call
call to gen_hsa
lookup
final lookup table
original_data
list containing from and to originally submitted
from
: from
as submitted to gen_hsa
to
: to
as submitted to gen_hsa
reassigned_data
list containing from and to as assigned to HSAs
from
: from
converted to its HSA
to
: to
converted to its HSA
method
method used to assign each region to its HSA
original_shp
shapefile submitted to gen_hsa
(via shp
)
shp
shapefile containing HSAs
iterations
number of iterations
li
localization index of the HSAs
li_threshold
li_threshold
option
min_interventions
min_interventions
option
n
number of HSAs created
n_it
number of HSAs in each iteration
n_interventions
number of interventions in each HSA after the final iteration
names
name of each HSA
flow
flow amongst HSAs (as generated by flows
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.