social networking - Creating an Edge List in Stata -


i have network dataset in stata need create edge list for. know how create edge list in python or in scripting language, i'm on restricted account doesn't have access python. data restricted i'm not able transfer personal computer, i'm stuck doing in stata.

i want iterate through each row through each column. if personinnetwork isn't null, want write new dataset consisting of 2 variables. first variable id , second variable network connection.

i don't know how work new dataframe while keeping relevant 1 in memory. i'm not confident in iterating through rows , columns specific record.

edit: here's toy example. sorry atrocious formatting.

here's data looks now:

id personinnetwork1  personinnetwork2  p1      p3                p2 p2      p1 p3      p1                p4 p4      p3 

here's need like:

id  connection p1   p3 p1   p2 p2   p1 p3   p1 p3   p4 p4   p3 

if understand you're asking, think reshape need. if have isolates, extra sauce needed.

if that's not it, think if gave toy example of data , desired output.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -