The NETWORK Procedure
CENTRALITY Statement
CENTRALITY < options >;
The CENTRALITY statement enables you to select which centrality metrics to calculate for the specified input graph. It also enables you to specify options for particular metrics. The resulting metrics are included in the node output data table (specified in the OUTNODES= option) or the link output data table (specified in the OUTLINKS= option).
For more information about centrality metrics, see the section Centrality.
You can specify the following options:
- AUTH=WEIGHT | UNWEIGHT | BOTH
specifies how to calculate authority centrality. You can specify the following values:
- WEIGHT
calculates authority centrality by using the weighted graph.
- UNWEIGHT
calculates authority centrality by using the unweighted graph.
- BOTH
calculates authority centrality by using both the weighted and unweighted graphs.
If the input graph does not contain weights, then AUTH=WEIGHT and AUTH=UNWEIGHT both produce the same results (if you use 1.0 for each link weight). This centrality metric can be used only for directed graphs. For more information about the authority centrality metric, see the section Hub and Authority Scoring.
- BETWEEN=WEIGHT | UNWEIGHT | BOTH
specifies how to calculate betweenness centrality for node betweenness or link betweenness. You can specify the following values:
- WEIGHT
calculates betweenness centrality by using the weighted graph.
- UNWEIGHT
calculates betweenness centrality by using the unweighted graph.
- BOTH
calculates betweenness centrality by using both the weighted and unweighted graphs.
If the input graph does not contain weights, then BETWEEN=WEIGHT and BETWEEN=UNWEIGHT both produce the same results (if you use 1.0 for each link weight). If the OUTNODES= option is specified in the PROC NETWORK statement, the node betweenness metric is produced. If the OUTLINKS= option is specified, the link betweenness metric is produced. For more information about the betweenness centrality metric, see the section Betweenness Centrality.
- BETWEENNORM=TRUE | FALSE
specifies whether to normalize the betweenness centrality metrics. You can specify the following values:
- TRUE
normalizes the betweenness metrics.
- FALSE
does not normalize the betweenness metrics.
For more information about the normalization factor for betweenness centrality, see the section Betweenness Centrality. By default, BETWEENNORM=TRUE.
- CLOSE=WEIGHT | UNWEIGHT | BOTH
specifies how to calculate closeness centrality. You can specify the following values:
- WEIGHT
calculates closeness centrality by using the weighted graph.
- UNWEIGHT
calculates closeness centrality by using the unweighted graph.
- BOTH
calculates closeness centrality by using both the weighted and unweighted graphs.
If the input graph does not contain weights, then CLOSE=WEIGHT and CLOSE=UNWEIGHT both produce the same results (if you use 1.0 for each link weight). For more information about the closeness centrality metric, see the section Closeness Centrality.
- CLOSENOPATH=DIAMETER | HARMONIC | NNODES | ZERO
specifies a method for accounting for the shortest path distance between two nodes when a path does not exist (disconnected nodes). You can specify the following values:
- DIAMETER
uses the graph diameter (plus one) as the shortest path distance between disconnected nodes.
- HARMONIC
uses the harmonic formula for calculating closeness centrality.
- NNODES
uses the number of nodes as the shortest path distance between disconnected nodes. You cannot specify this option when CLOSE=WEIGHT or CLOSE=BOTH.
- ZERO
uses zero as the shortest path distance between disconnected nodes.
For each option, there is a slight variation in the formula for the closeness centrality metric. For more information about these differences, see the section Closeness Centrality. By default, CLOSENOPATH=DIAMETER.
-
CLUSTERINGCOEFFICIENT
CLUSTERINGCOEF calculates the node clustering coefficient. For more information about clustering coefficients, see the section Clustering Coefficient.
- DEGREE=WEIGHT | UNWEIGHT | BOTH
specifies how to calculate degree centrality. You can specify the following values:
- WEIGHT
calculates degree centrality by using the weighted graph.
- UNWEIGHT
calculates degree centrality by using the unweighted graph.
- BOTH
calculates degree centrality by using both the weighted and unweighted graphs.
If the input graph does not contain weights, then DEGREE=WEIGHT and DEGREE=UNWEIGHT both produce the same results (if you use 1.0 for each link weight). For more information about the degree centrality metric, see the section Degree Centrality.
- EIGEN=WEIGHT | UNWEIGHT | BOTH
specifies how to calculate eigenvector centrality. You can specify the following values:
- WEIGHT
calculates eigenvector centrality by using the weighted graph.
- UNWEIGHT
calculates eigenvector centrality by using the unweighted graph.
- BOTH
calculates eigenvector centrality by using both the weighted and unweighted graphs.
If the input graph does not contain weights, then EIGEN=WEIGHT and EIGEN=UNWEIGHT both produce the same results (if you use 1.0 for each link weight). For more information about the eigenvector centrality metric, see the section Eigenvector Centrality.
- EIGENALGORITHM=AUTOMATIC | JACOBIDAVIDSON | POWER
specifies the algorithm to use in calculating centrality metrics that require solving eigensystems—that is, when the EIGEN, PAGERANK, HUB, or AUTH option (or some combination) is specified. You can specify the following values:
- AUTOMATIC
automatically determines the eigensolver to use.
- JACOBIDAVIDSON | JD
uses a variant of the Jacobi-Davidson algorithm for solving eigensystems (Sleijpen and van der Vorst 2000). This algorithm is not supported for PageRank calculations.
- POWER
uses the power method to calculate eigenvectors.
By default, EIGENALGORITHM=AUTOMATIC.
- EIGENMAXITERS=number
specifies the maximum number of iterations to use for eigenvector calculations in order to limit the amount of computation time spent when convergence is slow. By default, EIGENMAXITERS=10,000.
- HUB=WEIGHT | UNWEIGHT | BOTH
specifies how to calculate hub centrality. You can specify the following values:
- WEIGHT
calculates hub centrality by using the weighted graph.
- UNWEIGHT
calculates hub centrality by using the unweighted graph.
- BOTH
calculates hub centrality by using both the weighted and unweighted graphs.
If the input graph does not contain weights, then HUB=WEIGHT and HUB=UNWEIGHT both produce the same results (if you use 1.0 for each link weight). This centrality metric can be used only for directed graphs. For more information about the hub centrality metric, see the section Hub and Authority Scoring.
- INFLUENCE=WEIGHT | UNWEIGHT | BOTH
specifies how to calculate influence centrality. You can specify the following values:
- WEIGHT
calculates influence centrality by using the weighted graph.
- UNWEIGHT
calculates influence centrality by using the unweighted graph.
- BOTH
calculates influence centrality by using both the weighted and unweighted graphs.
If the input graph does not contain weights, then INFLUENCE=WEIGHT and INFLUENCE=UNWEIGHT both produce the same results (if you use 1.0 for each link or node weight). For more information about the influence centrality metric, see the section Influence Centrality.
- PAGERANK=WEIGHT | UNWEIGHT | BOTH
specifies how to calculate PageRank centrality. You can specify the following values:
- WEIGHT
calculates PageRank centrality by using the weighted graph.
- UNWEIGHT
calculates PageRank centrality by using the unweighted graph.
- BOTH
calculates PageRank centrality by using both the weighted and unweighted graphs.
If the input graph does not contain weights, then PAGERANK=WEIGHT and PAGERANK=UNWEIGHT both produce the same results (if you use 1.0 for each link or node weight). For more information about the PageRank centrality metric, see the section PageRank Centrality.
- PAGERANKALPHA=number
specifies the damping factor to use in the PageRank algorithm. The value of number must be between 0 and 1 (inclusive). The default is 0.85, which means that a random web surfer has a 15% chance of jumping to any other node in the network at any time. The algorithm usually takes more iterations to converge (or does not converge at all) as the damping factor is set closer to 1. See the section PageRank Centrality for an example that uses this option.
- PAGERANKTOL=number
specifies the convergence tolerance value for the PageRank algorithm. The value of number must be a positive number; the default value is 1E–9. The algorithm stops power iterations when the gap between the PageRank scores of the current iteration and the previous iteration is less than or equal to number.