Announcement

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

  • How can I compare two ID's variables in order to check if they exist both on two different datasets?

    Hi everyone,

    I have two sets of data: "A.dta" and "B.dta".
    My question is the following:
    • Is there a way in stata to check if IDs from both datasets appear in each other please?
    Thank you so much in advance.

    Michael

  • #2
    Merge the IDs and the matches (_merge==3) are the IDs that appear on both datasets.

    Code:
    help merge

    Comment


    • #3
      Andrew Musau:

      Perfect: Thank you for the suggestion.

      Best wishes,

      Michael

      Comment

      Working...
      X