* This files identifies some of the errors in the * longitudinal match between 1982 and 1992 CM datafiles *********************************************************** options compress=no; libname in 'D:/cm/'; libname un 'D:/enrico/new/data'; libname on 'D:/enrico/imported/data'; data tmp; set in.merged2; *numeric-to-character conversion; ppn_tmp = put(ppn,$10.); drop ppn; * plant exists in 1992 but not in 1982; if county82 =. and county92 ^=. then miss82=1; else miss82=0; *plant exists in 1982 but not in 1992; if county82 ^=. and county92 =. then miss92=1; else miss92=0; * phisical location has changed. This is impossible; if county82 ^= county92 then err1=1; else err1=0; if smsa82 ^= smsa92 then err2=1; else err2=0; *smsa code is either missing or 9999; if smsa82 =9999 or smsa82=. then rural82=1; else rural82=0; if smsa92 =9999 or smsa92=. then rural92=1; else rural92=0; /* proc freq; tables miss82*miss92; proc freq; tables err1*err2; where (miss82=0 and miss92=0); proc freq; table rural82*rural92; where (miss82=0 and miss92=0 and err1=0 and err2=0); */ run; data in.errors; set tmp; ppn = ppn_tmp; keep ppn miss82 miss92 err1 err2 rural82 rural92; proc means; run;