Dear Statalist members,
I would like to have some advice on how to solve the following problem.
Originally I have a dataset something like this:
id x1 x2 ...
1 10 20
2 15 14
3 17 17
.. .. ..
where id is the identifier of that observation and x1, x2,... are
variables we are going to use for analysis. However, this original set
of data contain some errors needed to be corrected. Now I have another
dataset that contains the error-corrections like this:
id err_var correct
1 x1 14
1 x2 18
2 x1 6
.. .. ..
where err_var contains the variable name that have problems, and correct
is the corrected value of that variable. I would like to seek advice on
how I can merge the later data set with the first one and replace the
wrong values of the first dataset.
Thank you very much in advance!
Yours sincerely,
Chau Tak Wai
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/