Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Not clear error message

    . ************************************************** ****************************
    . ******** Pareo Criterio 13: Nom1 Ape1 Ape2 (fonético) y fecha iguales ********
    . ************************************************** ****************************
    .
    . use restantes_$base2,clear

    .
    . foreach k in nom1 nom2 ape1 ape2 doc tipodoc {
    2. ren `k' `k'_$base2
    3. }

    .
    . joinby fechanto s_nom1 s_ape1 s_ape2 using restantes_$base1
    (joinby on fechanto s_nom1 s_ape1 s_ape2 is empty)

    .
    . foreach k in nom1 nom2 ape1 ape2 doc tipodoc {
    2. ren `k' `k'_$base1
    3. }

    .
    . foreach k in fechanto {
    2. ren `k' `k'_$base2
    3. gen `k'_$base1=`k'_$base2
    4. }

    .
    . egen name_$base2= concat(nom1_$base2 nom2_$base2 ape1_$base2 ape2_$base2)

    . egen name_$base1= concat(nom1_$base1 nom2_$base1 ape1_$base1 ape2_$base1)

    . egen name2_$base2= concat(nom1_$base2 ape1_$base2 ape2_$base2)

    . egen name2_$base1= concat(nom1_$base1 ape1_$base1 ape2_$base1)

    . replace name_$base2= name2_$base2 if nom2_$base2=="" | nom2_$base1==""
    (0 real changes made)

    . replace name_$base1= name2_$base1 if nom2_$base2=="" | nom2_$base1==""
    (0 real changes made)

    .
    . lev name_$base1 name_$base2

    . ren lev lev_name

    .
    . lev doc_$base1 doc_$base2

    . ren lev lev_doc

    .
    . gen lev= (lev_name+lev_doc)/2

    . replace lev= lev_name if tipodoc_$base1!=tipodoc_$base2 | tipodoc_$base1==3 | doc_$base2=="0" | doc_$base1=="0" | doc_$base2=="" | doc_$base1==""
    (0 real changes made)

    .
    . egen min=min(lev),by($id_base2)
    __000001 not found
    r(111);

    end of do-file

    When I run this code I get this error that I can not interpret. The program tries to match names and surnames between two tables of data

    Alejandro

  • #2
    Are you sure that a) the global id_base2 exists and that b) the variable it refers to exists?

    Comment


    • #3
      Alejandro,

      1. I don't think this is a MATA problem but a Stata problem
      2. Could you please give us more information about the routine you're running.
      3. Did you set the trace on
      Code:
      set trace on
      and check which is the temporal variable that is not being found (i.e., __000001 ) ?

      Best,
      Pablo Bonilla

      Comment

      Working...
      X