Node centrality, clustering coefficients, and shortest path lengths
Node centrality, clustering coefficients, and shortest path lengths
Mimics the qgraph::centrality_auto and qgraph::clustcoef_auto functions. The purpose of amending these functions was to make them compatible with outputs from the modnets package. The main use of these functions is as the engines for the centTable and clustTable
x: Output from one of the primary modnets functions. Can also supply a list of network models, and the function will be applied to all models in the list.
which.net: Only applies to SUR networks, as well as those fit with the mlGVAR function. Character string to indicate which type of network to compute centrality values for. Options are "temporal" for the temporal network, "contemporaneous" for the contemporaneous network, "PDC" for the partial directed correlation network, and "interactions" for the temporal interaction network.
weighted: Logical. If TRUE then results are converted to an unweighted network.
signed: Logical. Determines whether to ignore the signs of edges or not. Primarily affects the output for expected influence statistics.
thresholdWS: Numeric threshold for the WS values.
thresholdON: Numeric threshold for the Zhang values.
Returns
A list containing node centrality statistics, edge-betweenness values, and shortest path lengths.
Details
Returns several node centrality statistics, edge-betweenness centrality, and shortest path lengths. Betweenness and Closeness centrality are computed for all types of networks, as well as edge-betweenness values and shortest path lengths. For GGMs, Strength centrality and Expected Influence are also computed. For SUR networks, InStrength, OutStrength, InExpectedInfluence, and OutExpectedInfluence are computed instead.
The key distinction between these functions and the qgraph::centrality_auto and qgraph::clustcoef_auto functions is that centrality and clustering values can be computed for the matrix of interactions within a temporal network.
Examples
x <- fitNetwork(ggmDat,'M')clustAuto(x)centAuto(x,'interactions')