Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with cross-referencing between databases

    I am relatively new to Stata. I have two separate databases which contain an identifying name (ID) and a date of service (DOS). One database contains billing data with multiple entries for each unique ID and DOS; the other database contains the ID with a single entry for the type of service provided (ProvidedService). The ID names between the two databases closely match but are not consistently perfectly matched (one contains last name, first name only; the other contains middle initial and occasionally Jr/Sr and the such). I trying to import the sum of all billing into the other database that contains information on the service provided.

    Thank you!!
    Last edited by Da Str; 26 Feb 2020, 12:02.
    David Straus, MD

  • #2
    So your id is a name. These are typically awful for id variables. As you noticed, people can be inconsistent and give the same person different versions of the id. Also different person can have the same name. If your dataset is large enough, this is pretty much guaranteed to happen. This is why you get so often assigned a number when you are dealing with bureaucracies; it is not that the bureaucracies want to dehumanize you, it is just because they want to reliably differentiate you from all the others that interact with that bureaucracy. So my first step would be to go back to the source of the data and see if there isn't such a identification number in your database. I would be very surprised, and very worried, if that were not the case. Once you have that number you can use merge to combine the two datasets.

    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Maarten,

      Thank you so much for your reply!

      I will try to see if I can find a numeric ID to use for the merge.

      Thanks again!

      Best wishes,
      David
      David Straus, MD

      Comment

      Working...
      X