** CANADIAN 2005*** clear all use "C:\Users\Test\Dropbox\2005\original\data\Data Files SPSS\C19PUMFM_NUM.DTA", clear renvars, upper ***cCOUNTRY*** gen str2 country="CA" ***SURVEY** gen survey=2005 *** SWAVE*** gen swave=0 ***MSAMP*** gen msamp=0 *** HLDID*** gen hldid=0 ***PERSID*** gen persid=RECID ***INCORIG*** rename INCMHSD incorig replace incorig =-8 if incorig ==98|incorig ==99 ***REGION*** rename REGION region replace region=-8 if region==98|region==99 *** EMPINCLM *** gen empinclm= -9 *** OCCUPO*** rename SOC91_RET_C10 occupo replace occupo=-8 if occupo==98|occupo==99 rename NAICS2002_RET_C16 occupov2 replace occupov2=-8 if occupov2==98|occupov2==99 ***EDUCA** rename EDU10 educa replace educa=-8 if educa==98|educa==99 *** ETNIC** gen ethnic=-9 ***MIGRANTD*** rename BRTHCAN migrantd replace migrantd=-8 if migrantd==8|migrantd==9 ***MIGRANTM*** rename BRTHMCAN migrantm replace migrantm=-8 if migrantm==8|migrantm==9 ***MIGRANTF*** rename BRTHFCAN migrantf replace migrantf=-8 if migrantf==8|migrantf==9 keep country survey swave msamp hldid persid incorig region empinclm occupo educa ethnic migrantd migrantm migrantf order country survey swave msamp hldid persid incorig region empinclm occupo educa ethnic migrantd migrantm migrantf save "C:\Users\Test\Dropbox\2005\MTUS-X\canadian_2005\survey_ca_2005.dta", replace