代码拉取完成,页面将自动刷新
{smcl}
{* *! version 1.0.0 11nov2014}{...}
{marker topic}
{helpb nw_topical##generator:[NW-2.3] Generators}
{marker top2}
{helpb nw_topical##manipulation:[NW-2.5] Manipulation}
{title:Title}
{p2colset 9 20 22 2}{...}
{p2col :nwsubset {hline 2} Subset a network}
{p2colreset}{...}
{title:Syntax}
{p 8 17 2}
{cmdab: nwsubset}
[{it:{help netname}}]
[{it:{help if}}]
[,
{opt name}({it:{help newnetname}})
{opt xvars}
{opt replace}]
{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}
{synopt:{opt replace}}replace existing network{p_end}
{title:Description}
{pstd}
{cmd:nwsubset} simply subsets an existing network {it:netname}. By default, the subset network is called {it:netname_sub}. When
no {help if} condition is specified, the command simply generates a duplicate of a network.
{pstd}
For example:
{bf:. webnwuse gang, nwclear}
{bf:. nwsubset gang if _n < 10}
{pstd}
This generates a new network called {it:gang_sub}. Notice that something similar could be achieved with {help nwgen}:
{bf:. webnwuse gang, nwclear}
{bf:. nwgen gang_sub = gang if _n < 10}
{pstd}
However, the last command does not copy the node labels of network {it:gang}. This is because the {help if} condition in {help nwgen} applies to a whole {help netexp:network expression}. Because
network expressions can be very complicated, no labels are copied.
{title:See also}
{help nwgenerate}, {help nwduplicate}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。