Hi,
Could someone help me with a problem, I am stuck!
So basically, my professor told me to do an append instead of a merge in stata (don't really agree, but might make sense if I get the dataset organised).
After an append, my observations were just added at the bottom. I sorted them so that I can see the observations more clearly.
I.e, if you see where I have marked blue in the picture? They are duplicates based on most variables, however for example, the dummies called seller and customer are different. What I basically want to do is to add(or copy) the information from the other duplicate, and then drop the duplicates. I.e for the company with gvkey=1161 and fyear =1995, I just want one observation, however the information about customer and seller to be on one line, so that it would look something like this:
gvkey fyear seller customer
1161 1995 1 1
Is this possible? There are some other variables as well that I want to add variables from, so it would have to work with copying information from several variables.
Hope someone can help! I am stuck!
Best,
Emilie
Could someone help me with a problem, I am stuck!
So basically, my professor told me to do an append instead of a merge in stata (don't really agree, but might make sense if I get the dataset organised).
After an append, my observations were just added at the bottom. I sorted them so that I can see the observations more clearly.
I.e, if you see where I have marked blue in the picture? They are duplicates based on most variables, however for example, the dummies called seller and customer are different. What I basically want to do is to add(or copy) the information from the other duplicate, and then drop the duplicates. I.e for the company with gvkey=1161 and fyear =1995, I just want one observation, however the information about customer and seller to be on one line, so that it would look something like this:
gvkey fyear seller customer
1161 1995 1 1
Is this possible? There are some other variables as well that I want to add variables from, so it would have to work with copying information from several variables.
Hope someone can help! I am stuck!

Best,
Emilie
Comment