Hello I have two data sets, they both have the common variable person_ID. One dataset consists of the date on which people where arrested before a treatment effect, the second data set consists of the dates people where arrest after a treatment effect was given. I want to merge these data sets. The problem I run into is the way the variable person_ID was coded.For example there is a person in this data set that was arrested at three distinct dates, he is given the ID 1, so this person appears as 1 three times in the data set. In the second dataset this individual was arrested twice so in the merged data set 1 should appear 5 times. When I try the command merge is fails to merge in any of the possible combinations. If this was unclear please tell me and I will clarify.
Related Posts with Proper way to merge data
Please help: How to create all possible combinations of several variables?Hello, Could you please help me with the below? I could not find an easier way to do this so far. I…
Getting more decimals from matcellDear statalisters, I am trying to obtain the percentages from a tabm table that uses weights and I …
Pooled OLS and robust standard errorsDear Stata users, I don't have a lot of experience using the software and I'm currently working on …
How do I replace the contents of one variable with that of another?In essence I want to tell STATA that when variable F11 = "Ya" replace it with the value in variable …
Writing a macro variable into a csv fileI specify here that i'm truly a neophyte in this language and i'm kind of struggling with easy stuff…
Subscribe to:
Post Comments (Atom)
0 Response to Proper way to merge data
Post a Comment