Skip to contents

Compute node-level degree centrality measures in psychometric hypergraphs.

Usage

node_degree(object, scale = c("raw", "zscore", "relative"))

Arguments

object

A psychHypergraph object produced by build_hypergraph.

scale

Scaling method applied separately within each hypergraph type and degree measure.

"raw"

Raw degree values.

"zscore"

Standardized z-scores.

"relative"

Min-max scaled values between 0 and 1.

Value

A data frame containing:

node_id

Numeric node index.

node_name

Node name.

graph_type

Hypergraph type: "redundant", "synergistic", or "full".

degree_type

Degree measure: "degree" or "weighted_degree".

value

Degree centrality value.

Details

The function calculates both unweighted degree and weighted degree for nodes participating in the active hyperedges of the object.

Degree measures are computed separately for:

  • Redundant hypergraph (positive O-information)

  • Synergistic hypergraph (negative O-information)

  • full hypergraph (all active hyperedges)

Unweighted degree corresponds to the number of hyperedges containing a node. Weighted degree corresponds to the sum of absolute O-information values across all hyperedges containing the node.

For a node \(i\), degree is defined as:

$$ degree(i) = \sum_h I(i \in h) $$

where \(I(\cdot)\) is an indicator function and \(h\) denotes an active hyperedge.

Weighted degree is defined as:

$$ weighted\ degree(i) = \sum_h |O_h| I(i \in h) $$

where \(O_h\) is the O-information value of hyperedge \(h\).

Higher values indicate nodes participating in more higher-order interactions.

Edges are taken from object$hyperedge_details, so degree measures follow the current subset. If non-significant candidates were explicitly retained with subset_hypergraph, they are included as active edges. An empty hypergraph returns zero degree values for all nodes.

Examples

if (FALSE) { # \dontrun{

deg <- node_degree(hg)

head(deg)

deg_z <- node_degree(
  hg,
  scale = "zscore"
)

deg_relative <- node_degree(
  hg,
  scale = "relative"
)

} # }