/* Recode the Occupation variable into five aggregate categories */ #delimit ; recode occ80 ( 3/199=1 "Professional/managerial") (200/389=2 "Technicians/sales/admin. support") (400/469=3 "Service") (473/699=4 "Farmers/fisherman/skilled manual workers") (703/889=5 "Operatives"), gen(occ80a) ; #delimit cr /* Create occupation dummy variables */ tab occ80a, gen(occdum) rename occdum1 prof rename occdum2 tech rename occdum3 serv rename occdum4 farm rename occdum5 oper label variable prof "Professional/managerial" label variable tech "Technicians/sales/admin. support" label variable serv "Service" label variable farm "Farmers/fisherman/skilled manual worker" label variable oper "Operatives" /* Create work status variables */ tab wrkstat if wrkstat<8, gen(wrk) rename wrk1 fulltime rename wrk2 parttime rename wrk3 not_work rename wrk4 unempl rename wrk5 retired rename wrk6 school rename wrk7 house label variable fulltime "Fulltime" label variable parttime "Parttime" label variable not_work "Not working" label variable unempl "Unemployed" label variable retired "Retired" label variable school "School" label variable house "Keeping house" /* Create gender dummy */ tab sex, gen(sexdum) drop sexdum2 rename sexdum1 men label variable men "Sex Dummy (0=W/1=M)" label define men 0 "Female" 1 "Male" label values men men /* Create race dummy */ tab race if race<3, gen(racedum) rename racedum1 white rename racedum2 black label variable white "Race (0=B/1=W)" label variable black "Race (0=W/1=B)" label define racew 0 "Black" 1 "White" label define raceb 0 "White" 1 "Black" label values white racew label values black raceb /* Create region variables */ tempvar region1 #delimit ; recode region (1/2=1 "Northeast") (3/4=2 "Midwest") (5/7=3 "South") (8/9=4 "West"), gen(`region1') ; #delimit cr tab `region1', gen(reg) rename reg1 ne rename reg2 mw rename reg3 s rename reg4 w label variable ne "Northeast" label variable mw "Midwest" label variable s "South" label variable w "West" /* Reverse code job variables */ vreverse jobinc, gen(jobinc1) vreverse jobmeans, gen(jobmeans1) /* Create race//education interaction term */ generate race_ed=race*educ if race<3 label variable race_ed "Race/Education Interqction Term"