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\times
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.
square matrix of dimension $n\times 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 NULL, in which
case the kernel function $$w_{ij}=f(d,h) =
\left(\frac{1}{2}\right)^{d_{ij}^2/h^2}$$ is used, where $w_{ij}, d_{ij}, h$ are elements of the weight matrix $\mathbf{W}
moran
a logical value specifying whether the proximity weights matrix
should have zeros in the diagonal. By default set to FALSE.
Value
A weights matrix of the same dimension as distance.matrix.
References
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.