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
Frequency distribution, what's missing? (beginner question)Beginner trying to learn Stata. I am assigned to construct a relative frequency table based on place…
Pearson Residuals (fe regression)Hi - I have a simple model where I am trying to understand the impact of a firm's geographical dive…
generate cumulative IRF after -xtvar-Hi Statalists, I'm estimating panel VAR with -xtvar- (a user-contributed code by Cagala(2014)?). I'…
Interpreting sureg resultDear all, can you show me how to interpret this sureg result? Esp for d##c thank you in advance sur…
New package on SSC archive: icalc - a toolkit for interperting and reporint interaction effects in generlaized linear modelsWith gratitude to Kit Baum for keeping up the SSC archive, I am pleased to announce the release of t…
Subscribe to:
Post Comments (Atom)
0 Response to Modifying a dataset to facilitate merging
Post a Comment