Dear all
I have row data on social networks like
person ID neighbor ID Did you know him? (yes =1)
1 1 0
1 2 1
1 3 0
2 1 1
2 2 0
2 3 1
3 1 0
3 2 1
3 3 0
I would like to know STATA commend to make this data into a 3 by 3 matrix like
1 2 3
1 0 1 0
2 1 0 1
3 0 2 0
Can anybody give me some advice on this?
Please also refer to excel sheet attached.
Thank you very much.
Yuko
I have row data on social networks like
person ID neighbor ID Did you know him? (yes =1)
1 1 0
1 2 1
1 3 0
2 1 1
2 2 0
2 3 1
3 1 0
3 2 1
3 3 0
I would like to know STATA commend to make this data into a 3 by 3 matrix like
1 2 3
1 0 1 0
2 1 0 1
3 0 2 0
Can anybody give me some advice on this?
Please also refer to excel sheet attached.
Thank you very much.
Yuko
Comment