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