This term adds one statistic to the model equal to the weighted or
unweighted Hamming distance of the network from the network specified by
x
. Unweighted Hamming distance is defined as the total
number of pairs \((i,j)\) (ordered or unordered, depending on whether the
network is directed or undirected) on which the two networks differ. If the
optional argument cov
is specified, then the weighted Hamming
distance is computed instead, where each pair \((i,j)\) contributes a
pre-specified weight toward the distance when the two networks differ on
that pair.
# binary: hamming(x, cov, attrname=NULL)
defaults to be the observed network, i.e., the network on the left side of the \(\sim\) in the formula that defines the ERGM.
either a matrix of edgewise weights or a network
option argument that provides the name of the edge attribute
to use for weight values when a network is specified in cov
ergmTerm
for index of model terms currently visible to the package.
ergm:::.formatTermKeywords("ergmTerm", "hamming", "subsection")