forked from ThomasGrund/nwcommands
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nwbetween.sthlp
executable file
·80 lines (56 loc) · 2.42 KB
/
nwbetween.sthlp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{smcl}
{* *! version 1.0.0 3sept2014}{...}
{marker topic}
{helpb nw_topical##analysis:[NW-2.6] Analysis}
{title:Title}
{p2colset 9 18 22 2}{...}
{p2col :nwbetween {hline 2} Calculate betweenness centrality}
{p2colreset}{...}
{title:Syntax}
{p 8 17 2}
{cmdab: nwbetween}
[{it:{help netlist}}]
[{cmd:,}
{opt generate}({it:{help newvarlist}})
{opt nosym}
{opt standardize}]
{synoptset 25 tabbed}{...}
{synopthdr}
{synoptline}
{synopt:{opt generate}({it:{help newvarlist}})}variable name for betweenness centrality; default = {it:_between}{p_end}
{synopt:{opt nosym}}do not symmetrize network before calculation of shortest paths{p_end}
{synopt:{opt standardize}}standardize centrality scores{p_end}
{title:Description}
{pstd}
Calculates the betweenness centrality for each node {it:i} in a {help netname:network} or {help netlist:network list} and
saves the result as a Stata variable. The command used the dichotomized network.
{pstd}
The betweenness centrality for node {it:i} is equal to the number of shortest paths from all vertices to all
others that pass through node {it:i}. A node with high betweenness centrality has a large influence on the
transfer of items through the network, under the assumption that item transfer follows the shortest paths.
{pstd}
When there is more than one shortest path from node {it:k} to node {it:l}, the betweenness scores of all nodes {it:i}
on these paths increases proportionally.
{pstd}
Formally, betweenness centrality of node {it:i} on graph {it:g} is defined as:
{pmore}
{it:Between_i(g) = sum ( sigma_st(i) / sigma_st )}
{pstd}
where, {it:sigma_st} is the total number of shortest paths from node {it:s} to node {it:t} and {sigma_st(i)} is the number of those
paths that pass through node {i}.
{pstd}
For the standardized betweenness centrality:
{pmore}
Directed network: {it:Between_i_std(g) = Between_i(g) / ((N-1)*(N-2))}
{pmore}
Undirected network: {it:Between_i_std(g) = Between_i(g) / ((N-1)*(N-2)/2)}
{pstd}
The Stata variable {it:varname} is overwritten. In case, betweenness centrality is calculated
for {it:z} networks at the same time (e.g. {bf:nwbetween glasgow1 glasgow2}), the command generates the variables
{it:varname_z}, one for each network.
{title:Examples}
{cmd:. webnwuse gang, nwclear}
{cmd:. nwbetween gang}
{cmd:. sum _between}
{title:See also}
{help nwpath}, {help nwgeodesic}, {help nwcloseness}, {help nwkatz}, {help nwdegree}, {help nwcloseness}, {help nwevcent}