I am trying to calculate the betweenness centrality with valued ties, but I do not figure it out. Here are the dataset and codes.
- This is an example dataset with only four nodes/individuals. When collecting the network data, I asked the participants to answer the question about friendship tie on a 7-point Likert scale. So, this is a directed and valued network. Moreover, when inputting the network data, I adopted the edge list format and saved it into a CSV file. The details of the data are as follows:
Actor Target Friend 1001 1002 5 1001 1003 6 1001 1004 5 1002 1001 6 1002 1003 6 1002 1004 6 1003 1001 4 1003 1002 4 1003 1004 4 1004 1001 6 1004 1002 6 1004 1003 6
- Then I ran the following codes to calculate the betweenness centrality:
library(igraph) #Step 1. read the edgelist format dataset into R Mydata <- read.table("Example.csv", header=TRUE, sep=",") #Step 2. convert an edgelist matrix with valued edges/ties into a graph Mygraph <- graph_from_data_frame(Mydata, directed=TRUE) #Step 3. calculate betweenness centrality but fail to account for the value/weight of the tie betweenness(Mygraph, directed = T, normalized = T)
- The results came out are as follows:
1001 1002 1003 1004 0 0 0 0
It seems that the package treated the dataset as that the four members mutually nominated each other as friends while ignored the strength of the tie. Therefore, each of them was connected to the others and no one had the opportunity to be a broker.
I have searched archival of the list, but I failed to locate the information that can completely solve my problem. So, I am wondering whether any colleagues here could share with me any information about this. I would be grateful if you can provide me any suggestions or references. Many thanks in advance!