Hello,
I am working with NHANES data and have been merging datasets together using a 1:1 merge with a unique identifier "seqn." Each survey respondent is assigned a different sequence number (seqn) which makes it easy to merge the different datasets. This was all going well, but one of the datasets I want to merge (on prescription drug data) with the others contains multiple entries for each "seqn" so that it is not a unique identifier. In other words, if a person were taking multiple prescription drugs there would be multiple data entries that correspond to the same sequence number. I am trying to figure out a way to reorganize the data so that there is a single sequence number that corresponds to each drug a person is taking. Please let me know how best I can do this. I am new to stata.
Related Posts with Modifying a dataset to facilitate merging
Too Many ValuesHi all, I'm working with a dataset with around 350.000 rows and 20 columns. When I try to encode so…
Using Wordscore in STATA to assess trends in press releasesI'm new to the forum, but I was told I might get some help here. I'm doing an MA in political scien…
Help with event studyHello everyone, I am conducting some type of event study related to political elections in several c…
Overlay non-twoway graphsHi Statalisters, I would like to overlay two non-twoway type graphs - e.g., graph dot and graph hba…
How can I omit one factor variable from log file?Hello everyone! I have a log file of regress with factor (categorical) variable (i.variable). This f…
Subscribe to:
Post Comments (Atom)
0 Response to Modifying a dataset to facilitate merging
Post a Comment