Hello,
I am trying to do network analysis using -nwcommands-. In my survey data each person named up to 6 friends. I reshaped the data into a long data set that looks similar to this:
person_ID friend_ID
1 2
1 3
1 4
2 1
2 4
3 1
3 2
3 4
4 2
4 1
I would now like to transform this edgelist into an adjacency matrix to then obtain network indices such as eigenvector centrality and closeness centrality.
However, when I use the command
nwfromedge person_ID friend_ID, undirected
the resulting adjacency matrix does not correspond to the ties I have in my edgelist. Particularly, the matrix shows
some ties that do not exist in my edgelist or leaves out ties that actually exist.
Does anyone have an idea what the problem could be or what I may have overlooked?
Any help is very much appreciated, thank you!
I am trying to do network analysis using -nwcommands-. In my survey data each person named up to 6 friends. I reshaped the data into a long data set that looks similar to this:
person_ID friend_ID
1 2
1 3
1 4
2 1
2 4
3 1
3 2
3 4
4 2
4 1
I would now like to transform this edgelist into an adjacency matrix to then obtain network indices such as eigenvector centrality and closeness centrality.
However, when I use the command
nwfromedge person_ID friend_ID, undirected
the resulting adjacency matrix does not correspond to the ties I have in my edgelist. Particularly, the matrix shows
some ties that do not exist in my edgelist or leaves out ties that actually exist.
Does anyone have an idea what the problem could be or what I may have overlooked?
Any help is very much appreciated, thank you!
