** user=**** ** password=**** ** package=stata ** project=les #delimit; * UK LES 1989 : STATA Example CAMSIS matching to UK 89 data; use $uk89e; * Current occ unit (isco88's)=fj04; * (incomplete) Employment status info from fj02 and fj06; * Derive employment status info; gen status=fj02; recode status 1=2 2=3 3=7 *=9; replace status=1 if (fj06==6 & 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 db02; * Derive indexing variable; gen iscobst=-999; replace iscobst=fj04*10 + status if (fj04 > 0 ); tabulate status if (fj04 > 0 ), summarize(iscobst) mean standard freq ; * Match with CAMSIS file using indexing variable; sort iscobst; save cstemp, replace; use iscobst hiscs wiscs hitcs witcs siops isei using $mydata\camsis\csukes89; summarize; sort iscobst; merge iscobst using cstemp; gen occinfo=_merge; tab occinfo; drop if (occinfo==1); * (this removes those iscobst values which are not represented in the LES sample); tab occinfo db02; * Current values are within gender; * also can make a cross-gender CAMSIS variable : ; gen cgentcs=-999; replace cgentcs=hitcs if (db02==1); replace cgentcs=witcs if (db02==2); gen cgenscs=-999; replace cgenscs=hiscs if (db02==1); replace cgenscs=wiscs if (db02==2); * Check overall distributions; summarize iscobst cgentcs cgenscs siops isei ; summarize iscobst cgentcs cgenscs siops isei if fj04 > 0; summarize iscobst cgentcs cgenscs siops isei if (fj04 > 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: compare values by a UK education recode; gen educ=et01; recode educ 0 1 99=1 2 3 =2 5 6 7=3 ; label define edu 1 "Primary or less" 2 "Intermediate" 3 "Degree level"; label values educ edu; label variable educ "education categories"; drop if (educ < 1); tab educ et01 ; 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.26 CAMSIS title by status : 0.25 SIOPS : 0.26 ISEI: 0.29 Women: CAMSIS title only : 0.33 CAMSIS title by status : 0.29 SIOPS : 0.30 ISEI: 0.23 */