Hello,
I am trying to create sums by group and create a new variable that is a count of all the observations with the same ID number. See sample data set below:
ID X Y
1 10 15
1 7 19
1 13 11
2 10 15
2 11 17
3 35 21
3 12 8
3 11 7
I want the total aggregate sums of X and Y for each ID group, and a new variable that is a count of all the entries for each ID number (for example count for ID 1 would be 3, ID 2=2, ID 3= 3)
Thank you!