Dear statalist members,
For my assignment I use 4 datasets. In this 4 datasets I have a variable: Full_Name (string variable) and id (numerical). I need to make a dummy variable Male = 1 if the person is a male and Male=0 if the person is a female. The idea is that I hand collect this information.
Most of the names in the 4 datasets will overlap. That is why I have combined them into one dataset with the command append. I want to remove duplicates by id so I see the name only once. A person's name (so also id) can occur multiple times in the 4 datasets.
Now I am wondering when I want to add this information to my 4 datasets again how do I do that? I think that I will probably have to use the merge function. But do I then have to do 1:m? Or maybe I should use a different command than merge?
I hope I have formulated my question clearly. Feel free to let me know that I did not.
KInd regards,
Sarah
Related Posts with Combining datasets
New package sysport on SSCThanks once again to Kit Baum, a new package sysport is now available for download from SSC. In Stat…
Margins after (dynamic) panel probitDear all, I am trying to estimate the following (dynamic) panel probit model and then its marginal …
HELP-Variable id does not uniquely identify the observations & variable years contains all missing valuesHello I am trying to transform my wide data (5 countries,3 variables, quarterly data from 1966-2021)…
Rescaling the var in a rangeHi! I have a variable which ranges from -10 to 10. I need to rescale this variable in a range of -…
SSC astile - how to get difference of High minus low portfolio ?Hi there, I am using the below example to explain my query. I am able to create portfolios successf…
Subscribe to:
Post Comments (Atom)
0 Response to Combining datasets
Post a Comment