** user=**** ** password=**** ** package=stata ** project=les #delimit; * US LES 1990 : STATA example CAMSIS matching to US 90 data; use $us90e; * Current occ unit (isco88's)=fj04; * (incomplete) Employment status info from fj02 and fj05; * Derive employment status indicator; gen status=fj02; recode status 1=1 3=5 4=2 *=9; replace status=4 if (fj05==1 & fj02==3); label define stat 1 "Self-Employed, not incorporated" 2 "Family Worker" 3 "Self-Employed, incorporated" 4 "Government Employee" 5 "Other Employee" 9 "Unknown"; label values status stat; label variable status "Employment status"; tab status db02; * Key indexing variable is iscobst; gen iscobst=-999; replace iscobst=fj04*10 + status if (fj04 > 0 ); tabulate status if (fj04 > 0 ), summarize(iscobst) mean standard freq ; * Match with CAMSIS scores file using index variable; sort iscobst; save cstemp, replace; use iscobst hiscs wiscs hitcs witcs siops isei using $mydata\camsis\csuses90; 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); * Reveiw variable 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 an education recode; gen educ=et01; recode educ 0 1 2=1 3=2 4=3 *=-9; label define edu 1 "Primary or less" 2 "Intermediate" 3 "High or Degree level "; 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. CAMSIS title by status : 0. SIOPS : 0. ISEI: 0. Women: CAMSIS title only : 0. CAMSIS title by status : 0. SIOPS : 0. ISEI: 0. */