Hello,
I am trying to count the number of times a certain respondent is mentioned by another respondent as a friend using ego-centric data. Also, I should mention that due to specific circumstances, I am unable to download specific stata packages.
Currently, my data is formatted as follows (on a much larger scale):
ID Friend 1 Friend 2 Friend 3
1 2 3 4
2 3 5 1
3 4 2 1
4 1 4 2
5 1 3 2
My goal is to count the total amount of times an ID number was listed among all friend variables and give it to the respective ID row:
ID Friend 1 Friend 2 Friend 3 Count
1 2 3 4 4
2 3 5 1 4
3 4 2 1 3
4 1 4 2 3
5 1 3 2 1
Any help would be appreciated on how to code this.
Thank you for your time!
Daniel
I am trying to count the number of times a certain respondent is mentioned by another respondent as a friend using ego-centric data. Also, I should mention that due to specific circumstances, I am unable to download specific stata packages.
Currently, my data is formatted as follows (on a much larger scale):
ID Friend 1 Friend 2 Friend 3
1 2 3 4
2 3 5 1
3 4 2 1
4 1 4 2
5 1 3 2
My goal is to count the total amount of times an ID number was listed among all friend variables and give it to the respective ID row:
ID Friend 1 Friend 2 Friend 3 Count
1 2 3 4 4
2 3 5 1 4
3 4 2 1 3
4 1 4 2 3
5 1 3 2 1
Any help would be appreciated on how to code this.
Thank you for your time!
Daniel
Comment