Hi Statalist
I use Stata 14 on Mac (and more frequently Stata in batch mode from shell)
I have two datasets (examples below)
THE FIRST ONE:
and the SECOND ONE:
Is there any mean to replace CODE* in the first dataset using the "dictionary" provided by the second one.
I tried merge, update, but it does not work (a posteriori, it was obvious).
Of course, the real number of codes (10,000), the number of observations (30,000) and the number of repeated code (60) preclude me to do that by hand.
Thank you for your welcome help!
Best
I use Stata 14 on Mac (and more frequently Stata in batch mode from shell)
I have two datasets (examples below)
THE FIRST ONE:
ID | CODE1 | CODE2 |
1 | 10 | 11 |
2 | 12 | 12 |
3 | 13 | 14 |
CODE | EXAM |
10 | x-ray |
11 | ct-scan |
12 | mri |
13 | surgery |
I tried merge, update, but it does not work (a posteriori, it was obvious).
Of course, the real number of codes (10,000), the number of observations (30,000) and the number of repeated code (60) preclude me to do that by hand.
Thank you for your welcome help!
Best