View source: R/spflow_neighborhood.R
expand_spflow_neighborhood | R Documentation |
Use the neighborhood matrices of origins and destinations to derive the up to three neighborhood matrices of the origin-destination pairs:
W_d
relates to flows starting from the same origin going to neighbors of the destination
W_o
relates to flows starting from the neighbors of the origin going the same destination
W_w
relates to flows starting from the neighbors of the origin going the neighbors of the destination
expand_spflow_neighborhood(
OW,
DW,
n_o = nrow(OW),
n_d = nrow(DW),
M_indicator = NULL,
model = "model_9"
)
OW |
The origin neighborhood matrix |
DW |
The destination neighborhood matrix |
n_o |
A numeric indicating the number of origins |
n_d |
A numeric indicating the number of destinations |
M_indicator |
A matrix of binary indicators for origin-destination pairs that should be included in the model. When the argument is NULL or when all entries of this matrix are different from zero we consider the Cartesian product of all origins and destinations as OD pairs. |
model |
A character indicating the model number, that controls different spatial
dependence structures should be one of |
A list of at most three (sparse) matrices with names
given by c("Wd", "Wo", "Ww")
.
Lukas Dargel
expand_spflow_neighborhood(DW = 1-diag(2),OW = 1-diag(2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.