NETWORK Procedure

Example 2.4 Betweenness and Closeness Centrality for Project Groups in a Research Department

This example uses the same data as in Influence Centrality for Project Groups in a Research Department, which illustrates influence centrality by considering the link weights that represent some measure of reporting magnitude. In Example 2.2, links between managers (or leads) and direct reports have higher link weights than links between nonmanagers. This interpretation makes sense in the context of influence centrality because weight and the metric are directly related. However, for closeness and betweenness centrality, weight and the metric are inversely related.

This example considers the speed of the flow of information between people. In this sense, connections between managers and direct reports have smaller values, which cost less in the shortest path calculations. As described in the section Closeness Centrality, by default, PROC NETWORK uses the reciprocal of the link weight to find the shortest paths of the closeness and betweenness centrality metrics.

The following statements calculate weighted (and unweighted) closeness and betweenness centrality.

proc network
   logLevel    = moderate
   links       = mylib.LinkSetInDept
   outLinks    = mylib.LinkSetOut
   outNodes    = mylib.NodeSetOut;
   centrality
      close    = both
      between  = both;
run;
%put &_NETWORK_;

The progress of the procedure is shown in Output 2.4.1.

Output 2.4.1: PROC NETWORK Log: Closeness and Node Betweenness Centrality for Project Groups in a Research Department

NOTE: ------------------------------------------------------------------------------------------
NOTE: ------------------------------------------------------------------------------------------
NOTE: Running NETWORK.                                                                          
NOTE: ------------------------------------------------------------------------------------------
NOTE: ------------------------------------------------------------------------------------------
NOTE: Reading the links data.                                                                   
NOTE: Data input used 0.00 (cpu: 0.00) seconds.                                                 
NOTE: Building the input graph storage used 0.00 (cpu: 0.00) seconds.                           
NOTE: The number of nodes in the input graph is 18.                                             
NOTE: The number of links in the input graph is 35.                                             
NOTE: Link weight values for betweenness and closeness centrality are automatically inverted.   
      You can use the AUXWEIGHT= option in the LINKSVAR statement to specify the link weight    
      values used by betweenness and closeness centrality.                                      
NOTE: Processing centrality metrics.                                                            
NOTE: Processing between/close centrality metrics using 256 threads across 16 machines.         
                                                    Real                                        
      Algorithm                Nodes   Complete     Time                                        
      centrality                  18       100%     0.11                                        
NOTE: Processing between/close centrality metrics used 0.11 seconds.                            
NOTE: Processing centrality metrics used 0.10 (cpu: 0.02) seconds.                              
NOTE: The Cloud Analytic Services server processed the request in 0.45251 seconds.              
NOTE: The data set MYLIB.LINKSETOUT has 35 observations and 5 variables.                        
NOTE: The data set MYLIB.NODESETOUT has 18 observations and 5 variables.                        
STATUS=OK  PROBLEM_TYPE=CENTRALITY  SOLUTION_STATUS=OK  CPU_TIME=1.65  REAL_TIME=0.45           


The nodes data table mylib.NodeSetOut shows the weighted and unweighted closeness and node betweenness centrality, as shown in Output 2.4.2.

Output 2.4.2: Closeness and Betweenness Centrality for Project Groups in a Research Department

nodecentr_close_wtcentr_close_unwtcentr_between_wtcentr_between_unwt
Angel0.441560.293100.000000.00000
Chang0.441560.293100.000000.00000
Chapman0.886960.500000.441180.23235
Christoph0.684560.485710.058820.11275
Gotti0.816000.515150.209560.28444
Graffe0.671050.435900.080880.06642
Gukrishnan0.465750.326920.000000.00000
Hund0.451330.369570.000000.00000
Kabutz0.507460.386360.000000.03885
Leon0.507460.386360.000000.03885
Nardo0.517770.425000.000000.00000
Oliver0.739130.447370.040440.02230
Patrick0.500000.377780.000000.00000
Polark0.693880.386360.308820.30882
Snopp0.755560.386360.161760.08088
Weng0.441560.293100.000000.00000
Yu0.871790.500000.500000.41262
Zhuo0.582860.472220.066180.15172


The links data table mylib.LinkSetOut shows the weighted and unweighted link betweenness centrality, as shown in Output 2.4.3.

Output 2.4.3: Link Betweenness Centrality for Project Groups in a Research Department

fromtoweightcentr_between_wtcentr_between_unwt
ChangAngel10.006540.00654
ChristophGotti10.022880.08551
ChristophNardo10.042480.03922
ChristophYu20.120920.14107
ChristophZhuo10.029410.04575
GottiChapman30.179740.08682
GottiOliver10.000000.03050
GottiPatrick10.052290.05392
GraffeHund10.062090.04270
GraffeYu20.160130.11024
GraffeZhuo10.032680.07625
GukrishnanLeon10.006540.03050
KabutzGotti10.065360.11187
KabutzGukrishnan10.006540.03050
KabutzLeon10.006540.00654
KabutzSnopp10.032680.03126
LeonGotti10.065360.11187
NardoGotti10.049020.04575
NardoZhuo10.019610.02614
OliverChapman30.127450.06776
OliverPatrick10.032680.01797
PolarkAngel10.098040.09804
PolarkChang10.098040.09804
PolarkYu20.366010.36601
SnoppChapman30.235290.14227
SnoppGukrishnan10.098040.05011
SnoppLeon10.032680.03126
WengAngel10.006540.00654
WengChang10.006540.00654
WengPolark10.098040.09804
YuChapman30.352940.22734
ZhuoGotti10.049020.09052
ZhuoHund10.049020.06841
ZhuoOliver10.022880.03453
ZhuoPatrick10.026140.03922


Note that Chapman (the director) and Yu (a manager who reports to Chapman) both have the highest weighted closeness centrality. However, Yu’s weighted betweenness centrality is highest because he serves as a gatekeeper between his three groups (D4a, D4b, and D4c) and the rest of the department.

Last updated: August 07, 2026