The original dataset has the following structure:
group_id | year | varx
1 1998 5
1 1998 5
1 1999 2
2 1998 1
2 1998 1
2 1998 1
2 1999 3
The outcome should look like:
group_id | year | varx
1 1998 10
1 1999 2
2 1998 3
2 1999 3
Thank you for your suggestions!
0 Response to How to sum variable by year for specific group id
Post a Comment