Bookmark and Share

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


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

Re: st: nearmrg for strings (titles)


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: nearmrg for strings (titles)
Date   Tue, 30 Aug 2011 08:43:48 +0100

Perhaps -name- is string in one dataset and a numeric variable with
value labels in the other. Alternatively, there is some such clash
between datasets.

-nearmrg- is a user-written program from SSC. Please remember to
specify where user-written programs you refer to come from.

Nick

On Tue, Aug 30, 2011 at 7:57 AM, Hoecher, Michaela (0613xxx)
<[email protected]> wrote:

> I would like to merge two datasets (variables: title, date, publisher).
> The problems is, that strings (tiltes of a book), that are not absolutely the same sould be merged/matched.
> - Does it make sense to use nearmrg for this?
> - In which way are strings merged/matched?
> - What would you recommend me?
>
> - I wanted to test nearmrg, but I got an error message "type mismatch":
>
> string_masterfile.dta
> +--------------------------------------+
> | id      name        gender       age
> |---------------------------------------
> | 5       franzi            1           23
> | 1       meli              1           32
> | 2       michaela       1           20
> | 6       ali                 2           25
> | 3       christ            2           20
> | 4       martin           2           44
> +--------------------------------------+
>
> string_matchfile2.dta
> +---------------------------------------+
> | id      name        gender       age
> |----------------------------------------
> | 5       franzi          1               13
> | 1       michi          1               15
> | 2       susi            1               22
> | 4       ali              2               25
> | 3       chris          2                20
> | 5       felix           2                43
> +---------------------------------------+
>
> When I use the command:
>      nearmrg gender using string_matchfile2.dta, nearvar(name) lower genmatch(samename)
> or
>      nearmrg gender using string_matchfile2.dta, nearvar(name) lower force genmatch(samename)
>
> I geht the error message: "type mismatch"

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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