** user=**** ** password=**** ** package=stata ** project=lis #delimit; * SWITZERLAND LIS 1992 : Example CAMSIS matching to CH 92 data; use $ch92p; * Current occ unit (btap minor groups)=pocc; * most Employment status info available on plfs; gen empst=plfs; recode empst 1 2=1 3 5 6=6 4=5 *=0; label define stat 0 "Status unknown" 1 "Self-employed (all)" 2 "Self-Employed (principals)" 5 "Family Assistant" 6 "Employee"; label values empst stat; label variable empst "Employment status"; tab empst psex; * Key indexing variables are occ (btap) and empst; gen btap=-999; replace btap=pocc if (pocc > 0 ); tabulate empst if (pocc > 0 ), summarize(btap) mean standard freq ; sort btap empst; save cstemp, replace; clear; infile btap empst mcam fcam siops isei using $mydata\camsis\cschis92.dat; summarize; sort btap empst; merge btap empst using cstemp; gen occinfo=_merge; tab occinfo; drop if (occinfo==1); * (this removes those btap empst 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=mcam if (psex==1); replace cgentcs=fcam if (psex==2); summarize btap empst cgentcs siops isei ; summarize btap empst cgentcs siops isei if pocc > 0; summarize btap empst cgentcs siops isei if (pocc > 0 & siops > 0); summarize btap empst cgentcs siops isei if (pocc > 0 & siops > 0 & cgentcs > 0); * A small number of occs don't have camsis or isei/siops * scores matched to them because their btap minor groups are not * covered by the camsis index file; mvdecode cgentcs, mv(-999); * Declare some missing values; ***************************************; * Quick assessment: compare values by an education recode; di "Education"; * some recode of education ; gen educ=peduc; recode educ 0 1=1 2 3 4 5 7 8 9=2 6 10 11 12 13 14 15=3 ; 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 ; * note high level of missing data, 50 percent of cases; * this is because this var is only collected for household heads; tab psex; * note a couple of missing psexes; keep if (psex == 1 | psex ==2); sort psex; by psex: summarize educ cgentcs siops isei if cgenscs > 0; by psex: oneway cgentcs 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; **************************************;