Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: fuzzy merge problem

From   "Dimitriy V. Masterov" <>
Subject   Re: st: fuzzy merge problem
Date   Wed, 22 Sep 2010 11:53:07 -0400

On Wed, Sep 22, 2010 at 9:56 AM, Anders Alexandersson
<> wrote:
> For the user-written command -reclink-, it seems that the id variable
> must not be in the varlist.
> For your example, I would create an id variable in both datasets, for
> example, -gen id = _n-, and then run
> . reclink county using ".\ihs_counties.dta", idmaster(id) idusing(id) gen(match)

I tried this and it worked like a charm!

There was one issue with counties that have names like "HILLSBOROUGH
(M SPLI, NH", which gave the bigram part of reclink some trouble with
unmatched parentheses. Inserting the parentheses fixed the problem.

Scott's solution seems to work very well for a small number of
counties. I was not able to implement it due to the constraint on
local length.

Many thanks to Scott and Anders for saving me many hours of nasty coding.
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index