Description Usage Arguments Value Author(s) References Examples
This step-1 function creates a matrix of spatial weights on the basis of a user-defined distance matrix, Kernel function, and bandwidth value. The distance matrix needs to specify a value for each of the possible n by n binomials that correspond to n contextual units. It can be either symmetric or asymmetric. In principle, its diagonal, corresponding to the distance of each unit with itself, should be composed of zero values. A Kernel function proposed by default generates spatial weights that tend toward 1 for distances substantially lower than the bandwidth value, toward 0 for distances substantially higher than the bandwidth value and toward 0.5 for distances approaching the bandwidth value.
1 2 | WeightMatrix(distance.matrix, bandwidth, kernel = NULL,
moran = FALSE)
|
distance.matrix |
square matrix of dimension n by n, where n is the number of contextual units. |
bandwidth |
scalar numeric value specifying the bandwidth h |
kernel |
function applied to the distance matrix. By default w_ij = f(d, h) = (1/2)^((d_ij/h)^2) is used, where w_ij, d_ij, h are elements of the weight matrix W, of the distance matrix D and the bandwidth h. User-supplied kernel functions have to take 2 arguments and return a matrix of the same dimension as the first argument. |
moran |
a logical value specifying whether the proximity weights matrix
should have zeros in the diagonal. By default set to |
A weights matrix of the same dimension as distance.matrix
.
Till Junge, Sandra Penic, Guy Elcheroth
Elcheroth, G., Penic, S., Fasel, R., Giudici, F., Glaeser, S., Joye, D., Le Goff, J.-M., Morselli, D., & Spini, D. (2012). Spatially weighted context data: a new approach for modelling the impact of collective experiences. LIVES Working Papers, 19.
1 2 3 4 | # creating geographical proximity weight, with bandwidth h=50
data(d_geo)
geow_50 <- WeightMatrix(distance.matrix=d_geo, bandwidth=50)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.