Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Make sure the same patients have the same id in both datasets. Even
then things can go wrong, as is explained here:
As you are able to tell things have gone wrong, you must be able to
identify cases that do not match. My advice is to share all the
information you have used to detect the missmatch(es) with Stata when
merging the two datasets.
I have two datasets and each has a unique id â?? the patient id.
One dataset (the larger) contains patient demographic data and the
other dataset (the smaller) contains the results of a laboratory test.
(Not all patients had the laboratory test done).
I would like to merge the two datasets.
I have tried a one to one merge based on the patient id. The two
datasets do merge, however a patient is paired with the wrong
laboratory result (i.e. a result which is not the patientâ??s, but
belonging to another patient).
How can I merge the two datasets so that the two datasets are
correctly merged (each patient with their correct lab result)?
* For searches and help try: