** user=**** ** password=**** ** package=stata ** project=lis #delimit; * US LIS 1997 : STATA Example CAMSIS matching to US 97 data; use $us97p; * Current occ unit (isco88's)=pocc; * (incomplete) Employment status info from ptypewk only; * Derive employment status variable; gen status=ptypewk; recode status 1 8=5 2 3 4=4 5=1 6=3 7=2 *=9; 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 psex; * Key indexing variable is occbst; gen occbst=-999; replace occbst=pocc*10 + status if (pocc > 0 ); tabulate status if (pocc > 0 ), summarize(occbst) mean standard freq ; * Merge files with CAMSIS scores using indexing variable; sort occbst; save cstemp, replace; use occbst hscs wscs htcs wtcs siops isei using $mydata\camsis\csusis97; 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 variable 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: compare values by an education recode; di "Education"; * some recode of education ; gen educ=peduc; recode educ 1=1 2 3 4=2 5 6 7 8=3; label define edu 1 "Elementary" 2 "Intermediate" 3 "Degree or above"; 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), tabulate; by psex: oneway cgenscs educ if (pocc > 0), tabulate; by psex: oneway siops educ if (pocc > 0 & siops > 0), tabulate; by psex: oneway isei educ if (pocc > 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. */