** user=**** ** password=**** ** package=stata ** project=lis #delimit; * Sweden LIS 1995 : Example CAMSIS matching ; * (here to person file, applies equally to household file occ vars); use $sw95p; * Current occ unit (nyk minor group)=pocc; gen nykmin=-999; replace nykmin=pocc if (pocc >= 0 ); * employment status info from plfs and ptypewk, here use former; gen empst=0; replace empst=1 if (plfs==4); replace empst=2 if (plfs==1 | plfs==2 | plfs==3); label define stat 0 "Unknown employment status" 1 "Self-employed" 2 "Employee" ; label values empst stat; label variable empst "Employment status"; tab empst psex; * Key indexing variables are nykmin and empst; tabulate empst, summarize(nykmin) mean standard freq ; * Check the employed info only ; tabulate empst if (nykmin > 0) , summarize(nykmin) mean standard freq ; sort nykmin empst; save cstemp, replace; clear; infile nykmin empst mcam fcam using $mydata\camsis\csswis95.dat; summarize; sort nykmin empst; merge nykmin empst using cstemp; gen occinfo=_merge; tab occinfo; drop if (occinfo==1); * (this removes those CAMSIS nykmin by empst values which are not represented in the LIS 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 nykmin empst cgentcs ; summarize nykmin empst cgentcs if pocc > 0; * Beware, quite a lot (20%) of occ values do not get * a camsis score matched to them because the nykmin * unit isn't represented in the index file; *****************************************; * Quick assessment: compare values by an education recode; gen educ=peduc; recode educ 1 2=1 3 4=2 5 6 7 =3 *=-9; label define edu 1 "Primary or less" 2 "Intermediate" 3 "Secondary or higher" ; label values educ edu; label variable educ "education categories"; tab educ ; sort psex; by psex: summarize educ cgentcs if (pocc > 0 & educ > 0) ; by psex: oneway cgentcs educ if (pocc > 0 & educ > 0), tabulate; ***********************************;