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
Creating change variable with unbalanced panelHi everyone, I have a variable called MHI which takes on a value between 0 and 100, it was only rec…
ppm use for imputationHi all, i have 57 variables and many of them have missing values. i have tried mi with chained equat…
Interpretation and Relevance of Long Run Coefficients in System GMM RegressionsHello, Hi, I estimate the following system GMM model based on a panel dataset of 1696 firms across…
Activate and deactivate commands in a loopHi all, I have the following for loop: Code: set more off local recall "dummy_1 dummy_2 dummy_3 d…
Exporting multiple VIFs to excelDear Statalisters, I am running a large amount of regressions analyses (specifically 4 models separ…
Subscribe to:
Post Comments (Atom)
0 Response to Modifying a dataset to facilitate merging
Post a Comment