** user=**** ** password=**** ** package=stata ** project=lis #delimit; * Sweden LIS 1987 : Example CAMSIS matching ; * (here to person file, applies equally to household file occ vars); use $sw87p; * Current occ unit (nyk minor group)=pocc; gen nykmin=-999; replace nykmin=pocc if (pocc >= 0 ); * Limited employment status info from ptypewk; * (mainly just missing info though); gen empst=0; replace empst=1 if (ptypewk==79); 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\csswis87.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; * no missing data at all for this sample - all nyk values * have camsis scores matched to them successfully; **********************************************; * Quick assessment: compare values by an education recode; gen educ=peduc; * No: Educ data is all missing for Sweden 87 LIS; /* recode educ 0 1 2 3 4 5=1 6=2 7 8 9=3 *=-9; label define edu 1 "Primary or less" 2 "Vocational" 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; by db02: oneway cgentcs educ if (pocc > 0), tabulate; */