1) Be connected to one or more individuals, in which case there will be an observation for each connection
2) Remain without any connection, in which case there will be one observation, but with missing data for the different variables var1, var2, var3... that give information on the connections.
My request is quite simple but I can't figure it out with my code. I would like to have a dataset with n*n observations, with all the possible pairs of individuals possible and a dummy variable equal to 1 if there is a connection between the two individuals. Here is a sample of my data:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str3(source target) str2(freq1 freq_2) str4 time "A1" "" "" "" "" "A10" "" "" "" "" "A11" "" "" "" "" "A12" "" "" "" "" "A13" "A4" "1" "2" "12" "A13" "A14" "1" "3" "12" "A13" "A3" "1" "1" "12" "A13" "A8" "5" "1" "12" "A13" "A15" "5" "1" "12" "A13" "A18" "2" "5" "18" end
Can someone help me figure this problem out?
0 Response to I would like to turn my imperfect edgelist into a perfect one (with all possible pairs of nodes of a network)
Post a Comment