Announcement

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

  • How to perform data matching?

    Hi Stata gurus!

    I have reshaped my original set of data and created a new file from it, but I would like to perform data matching to ensure I haven't coded my original set of data wrongly. I am aiming to do data matching according to the response IDs, which are available in both files. What commands would I need to use to find the values accordingly? And is it possible to view two sets of data at once from the data browser? Thanks.

  • #2
    One solution would be to list the relevant variables from one file, copy and paste them into a word file or something, and open that. Then you can open the other file in Stata. One could also use an unformatted log to write out the variables.

    Note that if you open the data editor/browser you can use a search function within it. I get it with the standard control-f .

    Comment


    • #3
      You can save one of the two files as a csv file and open it in Excel.

      Comment


      • #4
        Please provide a reproducible example, as stated in the Stata FAQ at https://www.statalist.org/forums/help#stata. What is the result of merge on the two datasets?

        Comment


        • #5
          Thank you all for the suggestions! I didn't realise I could export the files as CSV and do data matching that way. Thank you!

          Comment


          • #6
            If you have Stata 16, you should consider using - frames - for that matter.

            please take a look at this text:https://blog.stata.com/2019/09/06/fun-with-frames/
            Best regards,

            Marcos

            Comment

            Working...
            X