Announcement

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

  • do you use sort id before merge?

    I ask this question because I find everytime when I merge 2 data sets, I don't need to -sort id- at all. But I do see some authors' do file have sort id.

    What the role of -sort id- here? I think even if the id is not arranged in an order, merge can still work.

  • #2
    and in -help merge- file, there is no saying such that "people should sort id before merge".

    Comment


    • #3
      In early versions of Stata (I don't remember how far back) you did have to sort on the merge key variables. So I suspect the code you are looking at was written for earlier versions of Stata, or was written by people who used earlier versions and have not broken the habit of sorting the data before merging.

      Comment

      Working...
      X