Creates an igraph object from a data frame with self-loops
dup.nodes.from.data.frame.Rd
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.
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.