1 Star 0 Fork 7

夏汉林/nwcommands

forked from 连享会/nwcommands 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
nwcollapse.sthlp 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
ThomasGrund 提交于 2015-06-05 12:40 . v1.4.0
{smcl}
{* *! version 1.0.0 11nov2014}{...}
{marker topic}
{helpb nw_topical##manipulation:[NW-2.5] Manipulation}
{title:Title}
{p2colset 9 20 22 2}{...}
{p2col :nwcollapse {hline 2} Collapse a network}
{p2colreset}{...}
{title:Syntax}
{p 8 17 2}
{cmdab: nwcollapse}
[{opt (stat)}]
[{it:{help netname}}]
[{cmd:,}
{opth by(varlist)}
{it:{help collapse##table_options:options}}]
{title:Description}
{pstd}
This command collapses a network, i.e. it merges network nodes. It works very similar as {help collapse}. With option {opth by(varname)} one specifies which nodes should
be merged. The rule for collapsing two nodes are specified with {it:stat}, by default {it:stat} = {bf:max} ({help collapse:see here for possible values}). For example, when nodes
A and B are collapsed to node Z, Z inherits all the ties from node A and B.
{marker examples}{...}
{title:Examples}
{pstd}
This collapses the first and the second node of a random network. The collapsed node will have all ties that the original nodes had.
{cmd:. nwrandom 20, prob(.1) name(mynet)}
{cmd:. gen att = _n}
{cmd:. replace att = 1 in 2}
{cmd:. nwcollapse mynet, by(att)}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xiahanlin/nwcommands.git
git@gitee.com:xiahanlin/nwcommands.git
xiahanlin
nwcommands
nwcommands
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385