1 Star 0 Fork 7

夏汉林/nwcommands

forked from 连享会/nwcommands 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
nwsym.sthlp 2.39 KB
一键复制 编辑 原始数据 按行查看 历史
ThomasGrund 提交于 2015-06-24 11:49 . v1.4.4B
{smcl}
{* *! version 1.0.6 23aug2014 author: Thomas Grund}{...}
{marker topic}
{helpb nw_topical##manipulation:[NW-2.5] Manipulation}
{title:Title}
{p2colset 9 14 22 2}{...}
{p2col :nwsym {hline 2} Symmetrize network}
{p2colreset}{...}
{title:Syntax}
{p 8 17 2}
{cmdab: nwsym}
[{it:{help netname}}]
[{cmd:,}
{opt mode}({it:{help nwsym##mode:mode}})
{opth name(newntename)}
{opth vars(newvarlist)}
{opt noreplace}]
{synoptset 20 tabbed}{...}
{synopthdr}
{synoptline}
{synopt:{opt mode}({it:{help nwsym##mode:mode}})}logic for creating an undirected tie{p_end}
{synopt:{opt name}({it:{help newnetname}})}name of the new symmetrized network; default = {it:_sym_netname}{p_end}
{synopt:{opt vars}({it:{help newvarlist}})}new variables that are used for the network{p_end}
{synopt:{opt noreplace}}creates a new network instead of changing the existing one{p_end}
{p2colreset}{...}
{synoptset 20 tabbed}{...}
{marker mode}{...}
{p2col:{it:mode}}Description{p_end}
{p2line}
{p2col:{cmd: max}}maximum of tie values (i,j) and (j,i); default
{p_end}
{p2col:{cmd: min}}minimum of tie values (i,j) and (j,i)
{p_end}
{synoptline}
{p2colreset}{...}
{title:Description}
{pstd}
Symmetrizes a network, i.e. it transforms a directed network in an undirected
network. The logic for this transformation is defined in {bf:mode()}.
{pstd}
By default {bf:mode(max)}, an undirected tie is formed when there is either a tie from node {it:i} to node {it:j} or
a tie from node {it:j} to node {it:i}.
{pmore}
{it:M_ij = max( M_ij, M_ji )}
{pstd}
Alternatively, with {bf:mode(min)} an undirected tie is only formed when there are both ties from node {it:i} to
node {it:j} and a tie from node {it:j} to node {it:i}.
{pmore}
{it:M_ij = min( M_ij, M_ji )}
{pstd}
When not specified otherwise, the network {help netname} is replaced with the symmetrized network. Option
{bf:noreplace} generates a new network instead.
{pstd}
Option {bf:check} tests if the underlying adjacency matrix of the network is symmetric (but does not
symmetrize the network). Notice that this is
indepdendent of any meta-information saved together withe the network (see {help nwname}).
{title:Examples}
{cmd:. nwuse glasgow, nwclear}
{cmd:. nwsym glasgow1, check}
{title:Stores results}
Macros:
{bf:r(is_symmetric)} "true" or "false"
{bf:r(name)} name of the network
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xiahanlin/nwcommands.git
git@gitee.com:xiahanlin/nwcommands.git
xiahanlin
nwcommands
nwcommands
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385