**** Construction of a 16-class and 8-class schema for the person-file of the Swiss Household Panel 1999 **** Daniel Oesch, daniel.oesch@unil.ch, University of Lausanne, 21 October 2009 *-------------------------------------------- * 0. Define working directory *-------------------------------------------- cd C:\SHP // change according to where you have the SHP data files (downloaded from www.swisspanel.ch or from Data-CD) *--------------------------------------------------------------------------------------------- * 1. Merge differents files *------------------------------------------------------------------------------------------------------------------- *-------1.1 Merge last job file lwith shp99_p_user * select cases and variables use shp99_p_user, clear merge idpers using shp_lj, sort keep (is4laj__ xis4la__ p__w114 ljyy noga2l__) drop if _merge==2 // drop cases which were not present in 1999 keep idpers idspou idhous99 status99 weip99ts relarp99 wstat99 occupa99 noga2m99 /// p99w31 noga2l__ p__w114 is4maj99 xis4ma99 is4laj__ xis4la__ educat99 ljyy // for later waves than 1999, merge individual files of other years save temp\shp99_workfile_1, replace *----------------------------------------------------- * 2. Complete missing information on occupation from last job *----------------------------------------------------- use temp\shp99_workfile_1, clear * 2.1 Isco: Complete missing information on occupation from proxy-interview (from xis4 to is4) gen isco_mainjob99=is4maj99 replace isco_mainjob99=xis4ma99 if (is4maj99==. | is4maj99<0) recode isco_mainjob99 -9/-1=. // alls missing values defined as . gen isco_lastjob99=is4laj__ replace isco_lastjob99=xis4la__ if (is4laj__==. | is4laj__<0) recode isco_lastjob99 -9/-1=. * 2.2 Isco: Add information from last job for people without job at present gen isco_respondent99=. replace isco_respondent99=isco_mainjob99 replace isco_respondent99=isco_lastjob99 if (isco_respondent99==. | isco_respondent<0) recode isco_respondent -9/-1=. * 2.3 Take self-employment from last job gen selfem=p99w31 replace selfem=p__w114 if isco_mainjob99==. & isco_lastjob!=. * 2.4 Take sector employment from last job gen noga=noga2m99 replace noga = noga2l__ if isco_mainjob99==. & isco_lastjob!=. *---------------------------------------- * 3. Recode variables used to construct class variable *------------------------------- * 3.1 Recode education into three different levels recode educat99(-6/3=1)(4/6=2)(7/10=3), gen(educ_level99) label define educ_level99 /// 1 "Less than upper secondary education" /// 2 "Upper secondary education" /// 3 "Tertiary education" label values educ_level99 educ_level99 * 3.2 Recode self-employment / employer recode selfem (-3/-1=1)(1=2)(2/3=3)(4/7=4), gen (selfem_level99) label define selfem_level99 /// 1 "Not self-employed" /// 2 "Self-empl without employees" /// 3 "Self-empl with 1-9 employees" /// 4 "Self-empl with 10 or more" label values selfem_level99 selfem_level99 tab selfem_level99 *--------------------------------------- * 4. Recode classes to the 16-class schema *-------------------------------------------- gen class16=. * 4.1 Allocate self-employed to schema replace class16=1 if selfem_level99==4 replace class16=2 if inlist(selfem_level99,2,3) & inrange(isco_respondent99,2000,2470) replace class16=3 if selfem_level99==3 & (inrange(isco_respondent99,1000,1999) | inrange(isco_respondent99,3000,9330)) replace class16=4 if selfem_level99==2 & (inrange(isco_respondent99,1000,1999) | inrange(isco_respondent99,3000,9330)) * 4.2 Allocate employed managers and professionals (ISCO 1000-2470) to the schema replace class16=5 if selfem_level99==1 & inrange(isco_respondent99,110, 1239) replace class16=6 if selfem_level99==1 & inrange(isco_respondent99,1300, 1320) replace class16=9 if selfem_level99==1 & inrange(isco_respondent99,2100, 2213) replace class16=13 if selfem_level99==1 & inrange(isco_respondent99,2220, 2321) replace class16=14 if selfem_level99==1 & inrange(isco_respondent99,2330, 2332) replace class16=13 if selfem_level99==1 & inrange(isco_respondent99,2340, 2359) replace class16=5 if selfem_level99==1 & inrange(isco_respondent99,2410, 2429) replace class16=14 if selfem_level99==1 & inrange(isco_respondent99,2430, 2432) replace class16=13 if selfem_level99==1 & isco_respondent99==2440 replace class16=5 if selfem_level99==1 & isco_respondent99==2441 replace class16=13 if selfem_level99==1 & inrange(isco_respondent99,2442, 2443) replace class16=14 if selfem_level99==1 & isco_respondent99==2444 replace class16=13 if selfem_level99==1 & isco_respondent99==2445 replace class16=14 if selfem_level99==1 & inrange(isco_respondent99,2446, 2450) replace class16=13 if selfem_level99==1 & isco_respondent99==2451 replace class16=14 if selfem_level99==1 & inrange(isco_respondent99,2452, 2455) replace class16=13 if selfem_level99==1 & isco_respondent99==2460 replace class16=5 if selfem_level99==1 & isco_respondent99==2470 * 4.3 Allocate employed associate managers and semi-professionals (ISCO 3000) to the schema replace class16=10 if selfem_level99==1 & inrange(isco_respondent99,3100, 3152) replace class16=14 if selfem_level99==1 & isco_respondent99==3200 replace class16=10 if selfem_level99==1 & inrange(isco_respondent99,3210, 3213) replace class16=14 if selfem_level99==1 & inrange(isco_respondent99,3220, 3224) replace class16=15 if selfem_level99==1 & isco_respondent99==3225 replace class16=14 if selfem_level99==1 & isco_respondent99==3226 replace class16=15 if selfem_level99==1 & inrange(isco_respondent99,3227, 3228) replace class16=14 if selfem_level99==1 & inrange(isco_respondent99,3229, 3340) replace class16=6 if selfem_level99==1 & inrange(isco_respondent99,3400, 3433) replace class16=10 if selfem_level99==1 & isco_respondent99==3434 replace class16=6 if selfem_level99==1 & inrange(isco_respondent99,3440, 3450) replace class16=14 if selfem_level99==1 & inrange(isco_respondent99,3460, 3472) replace class16=15 if selfem_level99==1 & inrange(isco_respondent99,3473, 3475) replace class16=14 if selfem_level99==1 & isco_respondent99==3480 * 4.4 Allocate specific occupations to the schema *Professional military forces (isco 100) to associate managers replace class16=6 if selfem_level99==1 & isco_respondent99==100 *Locomotive engine drivers to technicians replace class16=10 if selfem_level99==1 & inlist(isco_respondent99,8310,8311) *Police officers to associate managers replace class16=6 if selfem_level99==1 & isco_respondent99==5162 *Bus and tram drivers to skilled and routine service workers replace class16=15 if selfem_level99==1 & isco_respondent99==8323 * 4.5 Allocate intermediate occupations to the schema (ISCO 4000-8340) and correct for skilled/unskilled (with/without upper secondary education) replace class16=7 if selfem_level99==1 & educ_level99!=1 & inrange(isco_respondent99,4000, 4223) replace class16=8 if selfem_level99==1 & educ_level99==1 & inrange(isco_respondent99,4000, 4223) replace class16=15 if selfem_level99==1 & educ_level99!=1 & inlist(isco_respondent99,5160, 5169) replace class16=16 if selfem_level99==1 & educ_level99==1 & inlist(isco_respondent99,5160, 5169) replace class16=7 if selfem_level99==1 & inlist(isco_respondent99,5161, 5163) replace class16=15 if selfem_level99==1 & educ_level99!=1 & inrange(isco_respondent99,5000, 5132) replace class16=16 if selfem_level99==1 & educ_level99==1 & inrange(isco_respondent99,5000, 5132) replace class16=16 if selfem_level99==1 & inlist(isco_respondent99,5133, 5139) replace class16=15 if selfem_level99==1 & educ_level99!=1 & inlist(isco_respondent99,5140, 5141, 5143) replace class16=16 if selfem_level99==1 & educ_level99==1 & inlist(isco_respondent99,5140, 5141, 5143) replace class16=16 if selfem_level99==1 & inlist(isco_respondent99,5142, 5149) replace class16=15 if selfem_level99==1 & educ_level99!=1 & inrange(isco_respondent99,5200, 5220) replace class16=16 if selfem_level99==1 & educ_level99==1 & inrange(isco_respondent99,5200, 5220) replace class16=11 if selfem_level99==1 & educ_level99!=1 & inrange(isco_respondent99,6000, 6154) replace class16=12 if selfem_level99==1 & educ_level99==1 & inrange(isco_respondent99,6000, 6154) replace class16=11 if selfem_level99==1 & educ_level99!=1 & inrange(isco_respondent99,7000, 7442) replace class16=12 if selfem_level99==1 & educ_level99==1 & inrange(isco_respondent99,7000, 7442) replace class16=11 if selfem_level99==1 & educ_level99!=1 & inrange(isco_respondent99,8000, 8279) replace class16=12 if selfem_level99==1 & educ_level99==1 & inrange(isco_respondent99,8000, 8279) replace class16=12 if selfem_level99==1 & inrange(isco_respondent99,8280, 8300) replace class16=11 if selfem_level99==1 & educ_level99!=1 & isco_respondent99==8312 replace class16=12 if selfem_level99==1 & educ_level99==1 & isco_respondent99==8312 replace class16=12 if selfem_level99==1 & inrange(isco_respondent99,8320, 8322) replace class16=11 if selfem_level99==1 & educ_level99!=1 & inrange(isco_respondent99,8323, 8324) replace class16=12 if selfem_level99==1 & educ_level99==1 & inrange(isco_respondent99,8323, 8324) replace class16=12 if selfem_level99==1 & isco_respondent99==8330 replace class16=11 if selfem_level99==1 & educ_level99!=1 & inrange(isco_respondent99,8331, 8340) replace class16=12 if selfem_level99==1 & educ_level99==1 & inrange(isco_respondent99,8331, 8340) * 4.6 Allocate elementary occupations (ISCO 9000-9330 ) replace class16=12 if selfem_level99==1 & inrange(isco_respondent99,9100, 9152) replace class16=16 if selfem_level99==1 & inrange(isco_respondent99,9153, 9330) replace class16=12 if selfem_level99==1 & isco_respondent99==9000 & inrange(noga,1,6) replace class16=12 if selfem_level99==1 & isco_respondent99==9000 & (inlist(noga,-3,-2) | inrange(noga,7,17)) * 4.7 Occupations impossible to allocate to a given class replace class16=. if selfem_level99==1 & isco_respondent99==2000 replace class16=. if selfem_level99==1 & isco_respondent99==3000 label define class16 /// 1 "Large employers (10 or more employees)" /// 2 "Self-employed professionals" /// 3 "Small business owners with 1-9 employees" /// 4 "Small business owners without employees" /// 5 "Managers and administrators" /// 6 "Associate managers and administrators" /// 7 "Skilled clerks" /// 8 "Routine clerks" /// 9 "Technical experts" /// 10 "Technicians" /// 11 "Skilled craft workers" /// 12 "Routine operatives" /// 13 "Socio-cultural professionals" /// 14 "Socio-cultural semi-professionals" /// 15 "Skilled service workers" /// 16 "Routine service workers" label values class16 class16 *-------------------------------------------- * 5. Recode 16-class schema into the simplified 8-class version *------------------------------------------------------- recode class16 (1/2=1)(3/4=2)(5/6=3)(7/8=4)(9/10=5)(11/12=6)(13/14=7)(15/16=8), gen(class8) label define class8 /// 1 "Self-employed professionals and large employers" /// 2 "Small business owners" /// 3 "(Associate) managers and administrators" /// 4 "Office clerks" /// 5 "Technical professionals and technicians" /// 6 "Production workers" /// 7 "Socio-cultural (semi-)professionals" /// 8 "Service workers" label values class8 class8 tab class16 tab class8 save temp\shp99_workfile_2, replace *----------------------------------------------------------------------- * 6. Replace class by class from partner if class is missing for respondent *-------------------------------------------------------------------------- * 6.1 create partner file * duplicate individual file changing variable names to create partner file use temp\shp99_workfile_2, clear renvars , postfix (_p) // eventually, "renvars" command has to be installed. Type "search renvars" into the command window and install command * create key for matching with individual file gen idspou99=idpers_p sort idspou99 save temp\partner, replace * 6.2 match partner file on individual file use temp\shp99_workfile_2, replace sort idspou99 merge idspou99 using M:\temp\partner, nol keep (class16_p class8_p) drop if _==2 // drop duplicate cases drop _ // drop merge variable sort idpers replace class16=class16_p if class16==. replace class8=class8_p if class8==. label var class16 "class oesch 16 categories" label var class8 "class oesch simplified" keep idpers class16 class8 tab class16, miss tab class8, miss save temp\shp99_final, replace **** References: **** Oesch, D. (2006a) "Coming to grips with a changing class structure" International Sociology 21 (2): 263-288 **** Oesch, D. (2006b) Oesch, D. (2006) "Redrawing the Class Map. Stratification and Institutions in Britain, Germany, Sweden and Switzerland", Basingstoke: Palgrave Macmillan