I have panel data and I want to join two id' into one by adding the data. There is other groups I dont want to join (so not just collapse the whole data to the t level). How to accomplish this?
Here is an MWE. Say, I want to join id = 1 and id = 2 into one group with the values of x added together.
Here is an MWE. Say, I want to join id = 1 and id = 2 into one group with the values of x added together.
Code:
input id t x 1 1 10 1 2 0 1 3 5 2 1 10 2 2 15 2 3 0 3 1 10 3 2 15 3 3 0 end
Comment