求助大神,求助大神
. use match_phone.dta,clear
. merge 1:m phone using customs`i'.dta
file customs.dta not found
r(601);
. forvalue i=1/12{
2. merge 1:m phone using customs`i'.dta
3. keep if _m=3
4. drop _merge
5. gen match_method_match_`i'="phone"
6. gen match_status_match_`i'="3"
7. compress
8. save matched_by_phone`i'.dta,replace
9. }
(note: variable telephone was str11, now str20 to accommodate using data's values)
Result # of obs.
-----------------------------------------
not matched 1,336,189
from master 228,325 (_merge==1)
from using 1,107,864 (_merge==2)
matched 225,295 (_merge==3)
-----------------------------------------
=exp not allowed
r(101);
. keep if _merge=3
=exp not allowed
r(101);