diff-ergmTerm {ergm} | R Documentation |
Difference
Description
For values of pow
other than
0
, this term adds one network statistic to the model,
equaling the sum, over directed edges (i,j)
, of
sign.action(attr[i]-attr[j])^pow
if dir
is
"t-h"
and of sign.action(attr[j]-attr[i])^pow
if
"h-t"
. That is, the
argument dir
determines which vertex's attribute is
subtracted from which, with tail being the origin of a directed edge
and head being its destination, and bipartite networks' edges being
treated as going from the first part (b1) to the second (b2).
If pow==0
, the exponentiation is replaced by the signum
function: +1
if the difference is positive, 0
if there
is no difference, and -1
if the difference is negative. Note
that this function is applied after the
sign.action
. The comparison is exact, so when using
calculated values of attr
, ensure that values that you
want to be considered equal are, in fact, equal.
Usage
# binary: diff(attr, pow=1, dir="t-h", sign.action="identity")
# valued: diff(attr, pow=1, dir="t-h", sign.action="identity", form ="sum")
Arguments
attr |
a vertex attribute specification (see Specifying Vertex attributes and Levels ( |
pow |
exponent for the node difference |
dir |
determines which vertix's attribute is subtracted from which. Accepts: |
sign.action |
one of
|
form |
character how to aggregate tie values in a valued ERGM |
Note
this term may not be meaningful for unipartite undirected
networks unless sign.action=="abs"
. When used on such a
network, it behaves as if all edges were directed, going from the
lower-indexed vertex to the higher-indexed vertex.
See Also
ergmTerm
for index of model terms currently visible to the package.
Keywords
bipartite, directed, dyad-independent, frequently-used, quantitative nodal attribute, undirected, binary, valued