Announcement

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

  • Merging with Two Variables

    I am sure this has been written up before, but I cannot seem to find the answer in the stata help docs. The problem I have is that I have a master with a name and year, and I have a using with name and date (month and year). In the using dataset, I've created a new variable that has extracted the year from the date. My goal is to merge these two datasets, by a 1:m merge using name and year. What are the most common solutions to this problem? Thanks!

  • #2
    The help for merge shows this:
    Code:
    merge 1:m varlist using filename [, options]
    and if the common key variables are name and year:
    Code:
    merge 1:m name year using usingfilename

    Comment

    Working...
    X