** user=**** ** password=**** ** package=stata ** project=lis #delimit; * UK LIS 1991 : STATA Example CAMSIS matching to UK 91 data; use $uc91p; * Current occ unit (soc90)=pocc; * (incomplete) Employment status info from plfs and ptypewk; * Derive employment status indicator; gen status=plfs; recode status 1=7 2=3 *=9; replace status=1 if (ptypewk==1); replace status=2 if (ptypewk==3 | ptypewk==16); replace status=4 if (ptypewk==2); replace status=5 if (ptypewk==4); replace status=6 if (ptypewk==8 | ptypewk==11); label define stat 1 "Self-Employed gt 25 employees" 2 "Self-Employed with employees" 3 "Self-Employed no employees" 4 "Manager, large" 5 "Manager, small" 6 "Supervisor / foreman" 7 "Employee" 9 "Unknown"; label values status stat; label variable status "Employment status"; tab status psex; * Derive index variable occbst; gen occbst=-999; replace occbst=pocc*10 + status if (pocc > 0 ); tabulate status if (pocc > 0 ), summarize(occbst) mean standard freq ; * Match this file with CAMSIS data using index variable; sort occbst; save cstemp, replace; use occbst hscs wscs htcs wtcs egp siops isei using $mydata\camsis\csukis91; summarize; sort occbst; merge occbst using cstemp; gen occinfo=_merge; tab occinfo; drop if (occinfo==1); * (this removes those occbst values which are not represented in the LES sample); tab occinfo psex; * Current values are within gender; * also can make a cross-gender CAMSIS variable : ; gen cgentcs=-999; replace cgentcs=htcs if (psex==1); replace cgentcs=wtcs if (psex==2); gen cgenscs=-999; replace cgenscs=hscs if (psex==1); replace cgenscs=wscs if (psex==2); * Review scores distributions; summarize occbst cgentcs cgenscs siops isei ; summarize occbst cgentcs cgenscs siops isei if pocc > 0; summarize occbst cgentcs cgenscs siops isei if (pocc > 0 & siops > 0); * note that the last summary shows us that a handful of cases have occs * and camsis scores but have missing siops scores by the ISMF translation; * Quick assessment (1): compare values by egp; sort psex; by psex: table egp if (pocc > 0 & siops > 0), c(mean cgentcs mean cgenscs mean siops mean isei) ; * Quick assessment (2) : compare values by an education recode; gen educ=peduc; recode educ 0/14=1 15/17=2 18/34=3 *=-9; label define edu 1 "0-14yrs" 2 "15-17yrs" 3 "18 or more years " -9 "Unknown"; label values educ edu; label variable educ "education categories"; tab educ ; sort psex; by psex: summarize educ cgentcs cgenscs siops isei if pocc > 0; by psex: oneway cgentcs educ if (pocc > 0 & educ > 0), tabulate; by psex: oneway cgenscs educ if (pocc > 0 & educ > 0), tabulate; by psex: oneway siops educ if (pocc > 0 & siops > 0 & educ > 0), tabulate; by psex: oneway isei educ if (pocc > 0 & isei > 0 & educ > 0), tabulate; /* For interest here are the Eta-squared statistics with education from above: Men: CAMSIS title only : 0.23 CAMSIS title by status : 0.22 SIOPS : 0.19 ISEI: 0.22 Women: CAMSIS title only : 0.20 CAMSIS title by status : 0.19 SIOPS : 0.15 ISEI: 0.13 note that for all 3 uk lis/les samples, isei for men is close to educ but not for women. */