Announcement

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

  • Question regarding merging simliar strings

    Hi,

    Lets say I have two datasets. One with various objects written in singular form and one with objects written in plural form and singular form mixed and I want to identify and merge those objects. i.e. merging "Car" with "Cars" .

    If the strings are exactly the same this would easily be done by the merge command but in this case I'm stuck. Does there exist some way to tell Stata to merge if the two strings are equal except for one letter?


  • #2
    there are user-written programs that may help in this kind of situations; try
    Code:

    search matchit search reclink
    to find and download

    Comment


    • #3
      Also, take a look at the -plural()- function in native Stata. Depending on the complexity of your situation, you may be able to just use that to create a plural version of the singular variable in the singular data set and then -merge- it with the data set that has plurals.

      -help plural-

      Comment


      • #4
        The Matchit command turned out to be very useful, thank you very much!

        Comment

        Working...
        X