代码拉取完成,页面将自动刷新
同步操作将从 连享会/nwcommands 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
{smcl}
{* *! version 1.0.1 16may2012 author: Thomas Grund}{...}
{marker topic}
{helpb nw_topical##utilities:[NW-2.7] Utilities}
{title:Title}
{p2colset 9 15 22 2}{...}
{p2col :nwsync {hline 2} Sync network with Stata variables}
{p2colreset}{...}
{title:Syntax}
{p 8 17 2}
{cmdab: nwsync}
[{it:{help netname}}]
[{cmd:,}
{opt label}
{opt fromstata}]
{synoptset 20 tabbed}{...}
{synopthdr}
{synoptline}
{synopt:{opt label}}sync the node labels{p_end}
{synopt:{opt fromstata}}change the direction of the sync{p_end}
{synoptline}
{p2colreset}{...}
{title:Description}
{pstd}
Networks ultimately exist as Mata matrices. However, one can also load them
as Stata variables that represent the adjacency matrix of a network
(see {help nwload}). Normally, when a network is changed through another {help nwcommands:nwcommand} the
Stata variables (if they exist) are automatically synced. But one can also invoke such
a sync explicitly. Furthermore, {help nwsync} can be used to sync the other way around, i.e.
one can change the values of the Stata variables that represent the network and sync the
network (that lives in Mata).
{pstd}
{title:Options}
{phang}
{opt fromstata} Change the direction of the sync, i.e. the network is updated based on the
Stata variables that represent the network.
{p_end}
{phang}
{opt label} Sync the labels of the nodes with the Stata variable _nodelab
{p_end}
{title:Remarks}
{pstd}
One can use {help nwload} and {help nwsync: nwsync, fromstata} to replace tie values in a network. For example,
{cmd:. nwuse florentine, nwclear}
{cmd:. nwload flomarriage}
{cmd:. replace marriage_1 = 99 in 2}
{cmd:. nwsync flomarriage, fromstata}
{pstd}
However, the preferred method to change the same tie value would be using {help nwreplace} instead:
{cmd:. nwuse florentine, nwclear}
{cmd:. nwreplace flomarriage[1,2] = 99 }
{pstd}
The command can also be used to sync the node labels attached to a network (see also {help nwname}).
{cmd:. nwuse florentine, nwclear}
{cmd:. nwload flomarriage}
{cmd:. replace _nodelab = "Peter" in 9}
{cmd:. nwsync flomarriage, fromstata label}
{pstd}
Notice that the last sync can also be done with
{cmd:. nwname flomarriage, newlabsfromvar(_nodelab)}
{title:See also}
{help nwload}, {help nwreplace}, {help nwname}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。