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: which -cmp- option to use for poisson model with count data?


From   "Jenniffer Solorzano Mosquera" <Jenniffer.Solorzano.Mosquera@jibs.hj.se>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: which -cmp- option to use for poisson model with count data?
Date   Wed, 02 May 2012 18:31:04 +0200

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/


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