ergmx.diff#

ergmx.diff(attr, pow=1, dir='t-h', sign_action='identity')[source]#

Sum over ties of a function of the difference of the vertices’ values of attr: tail minus head (dir="t-h", also "b1-b2") or head minus tail ("h-t", "b2-b1"), transformed by sign_action (R’s sign.action: "identity", "abs", "posonly", "negonly") and raised to pow (the sign, for pow=0). Undirected ties go from the lower- to the higher-numbered vertex, bipartite ties from the first mode.