pn_index: PN Centrality Index

View source: R/centrality_indices.R

pn_indexR Documentation

PN Centrality Index

Description

centrality index for signed networks by Everett and Borgatti

Usage

pn_index(g, mode = c("all", "in", "out"))

Arguments

g

igraph object with a sign edge attribute.

mode

character string, “out” for out-pn, “in” for in-pn or “all” for undirected networks.

Value

centrality scores as numeric vector.

Author(s)

David Schoch

References

Everett, M. and Borgatti, S. (2014) Networks containing negative ties. Social Networks 38 111-120

Examples

A <- matrix(c(0,  1,  0,  1,  0,  0,  0, -1, -1,  0,
              1,  0,  1, -1,  1, -1, -1,  0,  0,  0,
              0,  1,  0,  1, -1,  0,  0,  0, -1,  0,
              1, -1,  1,  0,  1, -1, -1,  0,  0,  0,
              0,  1, -1,  1,  0,  1,  0, -1,  0, -1,
              0, -1,  0, -1,  1,  0,  1,  0,  1, -1,
              0, -1,  0, -1,  0,  1,  0,  1, -1,  1,
             -1,  0,  0,  0, -1,  0,  1,  0,  1,  0,
             -1,  0, -1,  0,  0,  1, -1,  1,  0,  1,
              0,  0,  0,  0, -1, -1,  1,  0,  1,  0), 10, 10)
g <- graph_from_adjacency_matrix_signed(A,"undirected")
pn_index(g)

signnet documentation built on Sept. 9, 2023, 1:06 a.m.