代码拉取完成,页面将自动刷新
{smcl}
{* *! version 1.0.0 11nov2014}{...}
{marker topic}
{helpb nw_topical##generator:[NW-2.3] Generators}
{title:Title}
{p2colset 9 20 22 2}{...}
{p2col :nwduplicate {hline 2} Duplicate a network}
{p2colreset}{...}
{title:Syntax}
{p 8 17 2}
{cmdab: nwduplicate}
[{it:{help netname}}]
[,
{opt name}({it:{help newnetname}})
{opt xvars}]
{synoptset 20 tabbed}{...}
{synopthdr}
{synoptline}
{synopt:{opt name}({it:{help newnetname}})}name of the new network{p_end}
{synopt:{opt xvars}}do not generate/overwrite Stata variables{p_end}
{title:Description}
{pstd}
{cmd:nwduplicate} simply duplicates an existing network {it:netname}. By default, the duplicated network is called {it:netname_copy}. It also
duplicates the node labels and the Stata variables of the original network.
{pstd}
For example:
{bf:. webnwuse gang, nwclear}
{bf:. nwduplicate gang}
{bf:. nwname gang_copy}
{bf:. return list}
{pstd}
produces a network called {it:gang_copy}. The same could be done with:
{bf:. webnwuse gang, nwclear}
{bf:. nwgen gang_copy = gang}
{bf:. nwname gang_copy}
{bf:. return list}
{pstd}
However, when {help nwgen} is used, the node labels in {it:gang_copy} are not the same as in network {it:gang} (see the different values for {bf:r(labs)} and {bf:r(vars)} in the
two examples above. This is because {help nwgen} can be much more complicated and ultimately copies the adjacency matrix it derives from a {help netexp:network expression} to a
new network.
{title:See also}
{help nwgenerate}, {help nwsubset}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。