Signed Networks

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  message=FALSE,
  warning=FALSE
)

This vignette describes signed networks and how they are implemented in the signnet package.

library(igraph)
library(signnet)

What are signed networks?

Traditional SNA usually deals with relations among entities (e.g. people) that are positive, including "friendship", "advice seeking", etc. Most network analytic tools are devised under this premise, be that centrality indices, clustering tools and so forth. But of course not all occurring relations are positive. People can be friends but also foes.

This gives rise to signed networks. These networks are usually composed of both, positive and negative, ties measured among a set of entities. Traditional network analytic tools are not applicable to such networks without adapting for negative ties.

The signnet package brings together methods that have been developed to analyse signed networks. This includes

Data structures for signed networks in signnet

The foundation of signnet is provided by igraph. All functions in the package assume that an igraph object is a signed network if it has an edge attribute "sign" with values 1 (positive) or -1 (negative).

g <- graph.full(5,directed = FALSE,loops = FALSE)
E(g)$sign <- 1
g

All methods (should) throw an error if the sign attribute is missing or contains other values than -1 and 1.

Matrices associated with a signed network follow the igraph naming scheme. The signed adjacency matrix can be obtained with as_adj_signed().

data("tribes")
as_adj_signed(tribes)[1:5,1:5]

The signed Laplacian matrix is obtained by laplacian_matrix_signed().

laplacian_matrix_signed(tribes)[1:5,1:5]

Included datasets

The package includes two well known datasets.

The "tribes" dataset is a signed social network of tribes of the Gahuku–Gama alliance structure of the Eastern Central Highlands of New Guinea. The network contains sixteen tribes connected by friendship ("rova") and enmity ("hina").

The "cowList" dataset contains a list of 52 signed networks of inter-state relations over time (1946-1999). Two countries are connected by a positive tie if they form an alliance or have a peace treaty. A negative tie exists between countries who are at war or in other kinds of conflicts. The dataset is derrived from the correlates of war.



Try the signnet package in your browser

Any scripts or data that you put into this service are public.

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