Average distance is the sum of the shortest-path distances from a node to every node, divided by \(n + 1\) as in the centiserve package: $$AD(v) = \frac{1}{n + 1} \sum_{w} d(v, w).$$ Lower values mark more central nodes.
Arguments
- x
Network input accepted by
centrality.- mode
For directed networks:
"all"(default),"out"or"in".- ...
Further arguments to
centrality. The measure usesweighted(defaultTRUE),invert_weights(defaultNULL, which isTRUEfor tna input),alpha(inversion exponent, default 1) andcutoff(largest path length considered, default -1 for no limit).
Details
Edge weights are read as path lengths. invert_weights = TRUE uses
\(1/w^\alpha\) as the length, and weighted = FALSE
counts hops. mode sets the direction of the paths. A node that
cannot reach every other node scores Inf, so on a disconnected
network every score is Inf.
