Skip to contents

This is an implementation of the method published in the paper "Intra-family links in the analysis of marital networks" (Merelo and Molinari 2024) , which proposed a duplication of nodes that includes self-loops to get a reflect better (and include all information about) the status of all nodes in the network.

Usage

dup.nodes.from.data.frame(df,first.node="V1",second.node="V2")

Arguments

df

A data frame that should include at least two columns with the names of the nodes

first.node

The column that indicates the node that's linked

second.node

The column that indicates the other node that's linked

Details

This method duplicates nodes with self-loops, and links the duplicated nodes with the original with a weight that is equal to the number of self-loops.

This can be applied to matrimonial networks where there are marriages among members of the same family, or any other type of network with self-loops, and allows to apply centrality (and other) measures, obtaining a meaningful and more accurate result.

You can them compute "corrected" betweenness on the resulting object using the DNSL.betweenness function.

Value

An igraph object with all nodes with self-loops duplicated. These newly created nodes will have the same name as the original, with a "'" added.

References

Merelo JJ, Molinari MC (2024). “Intra-family links in the analysis of marital networks.” Journal of computational social science. doi:10.1007/s42001-023-00245-4 , https://link.springer.com/article/10.1007/s42001-023-00245-4.

Examples

library(igraph)
V1 <- c("A", "A","B","C","D","E")
V2 <- c("A", "B","C","D","E","A")
df <- data.frame(V1, V2)

dup.graph <- dup.nodes.from.data.frame(df)
print(incident(dup.graph,"A"))
#> + 3/8 edges from d77d98d (vertex names):
#> [1] A--B  A--E  A--A'