nwvalue
Return a tie value
Syntax
nwvalue
[netname][,
ego(nodename)
alter(nodename)
egoid(integer)
alterid(integer)]
Description
The command returns the scalar r(value) with the value of the tie between the nodes ego and alter if those nodes exists. It also returns the names of those nodes when ids are used. Either the option pair ego(), alter() or egoid(), alterid() need to be specified.
Examples
. nwwebuse florentine
. nwvalue flobusiness, ego("medici") alter("pazzi")
. nwvalue flobusiness, egoid(2) alterid(9)
. return list
Supported network types
Binary: yes. Directed: yes - the raw stored (row=ego, column=alter) cell is returned exactly as stored, respecting direction, never symmetrized. Weighted: yes, natively - returns the tie’s own raw stored value. Signed: not checked; a negative value is returned as-is with no special handling. Two-mode: same as for the bipartite graph read as a one-mode network (valid; no mode-specific normalisation).
See also
- nwreplace
- last certified : 24 Aug 2026
nwcommands version 3.17.6, 9 November 2026 (check your installed version)