** user=**** ** password=**** ** package=stata ** project=les #delimit; * UK LES 1997 : Example CAMSIS matching; use $uk97e; * Current occ unit (soc90)=fj04; * (incomplete) Employment status info from fj02 and fj06; * Derive employment status indicator; gen status=fj02; recode status 1=2 2 4=3 3 5=7 *=9; replace status=1 if (fj06 >= 5 & fj02==1); label define stat 1 "Self-Employed gt 25 employees" 2 "Self-Employed with employees" 3 "Self-Employed no employees" 4 "Manager" 6 "Supervisor / foreman" 7 "Employee" 9 "Unknown"; label values status stat; label variable status "Employment status"; tab status; tab status db02; * Derive indexing variable occbst; gen occbst=-999; replace occbst=fj04*10 + status if (fj04 > 0 ); tabulate status if (fj04 > 0 ), summarize(occbst) mean standard freq ; * Match with CAMSIS file using indexing variable; sort occbst; save cstemp, replace; use occbst hscs wscs htcs wtcs egp siops isei using $mydata\camsis\csukes97; 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 db02; * Current CAMSIS values are within gender; * also can make a cross-gender CAMSIS variable : ; gen cgentcs=-999; replace cgentcs=htcs if (db02==1); replace cgentcs=wtcs if (db02==2); gen cgenscs=-999; replace cgenscs=hscs if (db02==1); replace cgenscs=wscs if (db02==2); * Review distributions of scores; summarize occbst cgentcs cgenscs siops isei egp ; summarize occbst cgentcs cgenscs siops isei egp if fj04 > 0; summarize occbst cgentcs cgenscs siops isei egp if (fj04 > 0 & siops > 0); tab egp if egp > 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; * note also that a lot more cases are missing on egp, because of * insufficient status info; * Quick assessment (1): compare values by egp; sort db02; by db02: table egp if (fj04 > 0 & siops > 0), c(mean cgentcs mean cgenscs mean siops mean isei) ; * Quick assessment (2): compare values by an education recode; gen educ=et01; recode educ -9 -1 16 17 18 19 22=1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 20 21=2 1=3 ; label define edu 1 "Primary or less" 2 "Intermediate" 3 "High or Degree level " -999 "Unknown"; label values educ edu; label variable educ "education categories"; tab educ ; sort db02; by db02: summarize educ cgentcs cgenscs siops isei if fj04 > 0; by db02: oneway cgentcs educ if (fj04 > 0), tabulate; by db02: oneway cgenscs educ if (fj04 > 0), tabulate; by db02: oneway siops educ if (fj04 > 0 & siops > 0), tabulate; by db02: oneway isei educ if (fj04 > 0 & isei > 0), tabulate; /* For interest here are the Eta-squared statistics with education from above: Men: CAMSIS title only : 0.31 CAMSIS title by status : 0.30 SIOPS : 0.27 ISEI: 0.30 Women: CAMSIS title only : 0.29 CAMSIS title by status : 0.27 SIOPS : 0.23 ISEI: 0.22 */