network_local_efficiency: Local Efficiency

View source: R/network-summary.R

network_local_efficiencyR Documentation

Local Efficiency

Description

Computes the average local efficiency across all nodes. Local efficiency of a node is the global efficiency of its neighborhood subgraph (excluding the node itself). Measures fault tolerance and local integration.

Usage

network_local_efficiency(
  x,
  weights = NULL,
  invert_weights = NULL,
  alpha = 1,
  ...
)

Arguments

x

Network input: matrix, igraph, network, cograph_network, or tna object

weights

Edge weights (NULL for unweighted). Set to NA to ignore existing weights.

invert_weights

Logical or NULL. Invert weights so higher weights = shorter paths? Default NULL which auto-detects: TRUE for tna objects, FALSE otherwise (matching igraph/sna). Set TRUE for strength/frequency weights (qgraph style).

alpha

Numeric. Exponent for weight inversion. Default 1.

...

Additional arguments passed to to_igraph

Value

Numeric in [0, 1]: average local efficiency

Examples

# Complete graph: removing any node leaves complete subgraph, so local efficiency = 1
k5 <- matrix(1, 5, 5); diag(k5) <- 0
network_local_efficiency(k5)  # 1

# Star: neighbors not connected to each other
star <- matrix(c(0,1,1,1,1, 1,0,0,0,0, 1,0,0,0,0, 1,0,0,0,0, 1,0,0,0,0), 5, 5)
network_local_efficiency(star)  # 0

cograph documentation built on April 1, 2026, 1:07 a.m.