0
$\begingroup$

I have a dataset of entries and a variable for the owner of the entry. Some of these people occur more than once. However, the names are sometimes written differently. I want to eventually be able to aggregate the other data to the single owner. These are the names of business owners so sometimes it's a singular name, sometimes it's more than one name, and sometimes it's just the company name. Here's an example of some of the styles of names in the data:

  • DOE JOHN
  • DOE JOHN J
  • DOE, JOHN
  • DOE, JOHN + JANE
  • DOE JOHN + JANE
  • JOHN DOE J ETAL % JOHN J DOE
  • COMPANY CO

I've never done anything like this before. How could I go about identifying some of the same people? Is there a way to create an index to identify the similarity between these groups? Most of the ones I've seen are for longer text. Is there an index well suited for this?

I apologize if this is too basic a question. I'm new to doing things like this and I'm not sure if I know exactly what to search for. I'm most comfortable with Stata and R but I've used Python before and I could eventually figure out how to do something with that.

$\endgroup$
2
  • $\begingroup$ See en.wikipedia.org/wiki/String_metric forw ways to check similarity. Typically there will be false positives and false negatives with any method for this kind of data, so don't expect a perfect result. I have a question though: is it possible to use other variables to help identify people? (I have had a similar problem recently, but there were also the birthdate and the place of residence (with other errors as well). The name alone is risky as there can be homonyms. $\endgroup$
    – user101075
    Dec 16, 2020 at 8:09
  • $\begingroup$ Unfortunately, no. I think this is all I'm going to get (I'm trying this at the request of someone else who only gave me this). $\endgroup$
    – quicks
    Dec 17, 2020 at 3:15

1 Answer 1

0
$\begingroup$

For R: Have a look and the stringr package. I would use for example the str_detect() function as follows: str_detect(column_of_different_names,"DOE|company_name"). This will return TRUE for each string that includes "DOE" or the company name in "company_name".

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.