View source: R/frontier_detect.R
frontier_detect | R Documentation |
'frontier_detect' returns a list object containing a adjacency matrix with 0 if the border between 2 areal units is a frontiers and 1 if not. NA if two units are not bordering. Currently only implements the algorithm for frontier detection from Dean et al
frontier_detect(
y,
data,
n.trials,
W.nb = NULL,
fix.rho = TRUE,
rho = 0.99,
...
)
y |
A string indicating column in data denoting the value to find discontinuities in |
data |
A sp or sf file of areal units from which we find frontiers |
n.trials |
A string indicating the column in data which indicates the numer of trials for binomial routine where all element of n.trials > y |
W.nb |
A neighbourhood matrix indicating which elements of data are adjacent to each other. Default is set to NULL and extracted within the function unless overwritten |
... |
Other option to pass |
This is a wrapper other frontier detection functions. Return a list object of class frontier_model. A summary of the results can be called using summary(frontier_model). To extract the frontiers as sf line objects use frontier_as_sf(frontier_model).
Goal: standardise input and outputs regardless of technique? TODO: Check out how packages like matchit and synthpop deal with calling methods from other packages Orginally called inla_frontier in the project Returns list object of class: frontier_model
Return a list object of class frontier_model and also INLA model.
W.frontiers An adjancency matrix where 1 is a border between units, 0 indicates a frontiers and NA are non-bordering areal units
data returns the data in the original call as a sf object with an id column
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.