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: reclink problem


From   Michael Blasnik <[email protected]>
To   [email protected]
Subject   Re: st: reclink problem
Date   Sat, 5 May 2012 10:24:41 -0400

I sent an updated version of reclink directly to Jenniffer and will
also submit it to SSC once I test it a little more.

Michael Blasnik


On Wed, May 2, 2012 at 12:40 PM, Jenniffer Solorzano Mosquera
<[email protected]> wrote:
> I solved the problem thanks! But the thing now is that there is an error in the command and it says that requires a ")" somewhere:
>
>
>    - version 8.2
>    - syntax varlist (max=1) , gen(str) match(str)
> ) required
>
>
> Should I remove some signs from the string names?  The language of the names is swedish but anyway the .dta file make the symbols homogeneus between the two datasets I'm trying to compare (merge) so it shouldn't matter... right?
>
>
>
>>>> "Jenniffer Solorzano Mosquera" <[email protected]> 2012-05-02 18:33 >>>
> Sorry this is the real query
>
> Hi everyone,
>
> I'm trying to merge 2 databases by name using the reclink command. The only variable I want to match is the name because I don't have anything else in common between the two databases.
> I run the following command:
>
> import excel using allfirms2, clear firstrow sheet("Sheet1") cellrange(D2:F33140)
> sort Targetname
> drop if Targetname==Targetname[_n-1]
> g id1=_n
> save allfirms2, replace // The big database
>
> import excel using PE_firms_thomson_notfoundyetAmadeus, clear firstrow sheet("no duplicates") cellrange(A1:F910)
> rename CompanyName Targetname
> sort Targetname
> drop if Targetname==Targetname[_n-1]
> g id2=_n
> save notfoundyetfirms, replace // The companies I need to find in there, but names can be written different
>
> reclink Targetname using allfirms2, gen(myscore) idmaster(id1) idusing(id2)
>
> However for some reason I have an error and it doesn't find id1?? reclink needs to add more variables to find a score or it is enough with only one variable? This is the error:
>
>    - version 7
>    - foreach word of local 0 {
>    - foreach word of local 0 {
>    - if `"`word'"' == "using" {
>    = if `"id1"' == "using" {
>          Isid_using `0'
>          local break break
>          continue, break
>          }
>    - }
>    - if "`break'" != "" {
>    = if "" != "" {
>          exit
>          }
>    - syntax varlist [, Sort Missok ]
> variable id1 not found
>
> Thanks in advance for any suggestion!
>
>
>
> *
> *   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/
>
>
> *
> *   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/
>
>
> *
> *   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/

*
*   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