* GENERAL SETTINGS * Close log file if one is open: capture log close * Remove data and values from memory: clear * No line breaks in output window: set linesize 132 * No interruptions through "more" option: set more off * Save the path of the current working directory in a variable: local dir `c(pwd)' * Use log file: log using "`c(pwd)'\log.log", replace ****************************************************************************** * CONSTRUCTION OF SAMPLE ****************************************************************************** * Information from SOEP generated person data * 2014: use "`c(pwd)'\bepgen.dta", clear set more off d * Whether the individual is employed in the public or private sector: tab oeffd14, miss rename oeffd14 public replace public = 0 if public == 2 replace public = . if public < 0 tab public, miss * Employment status: tab emplst14, miss rename emplst14 employment gen employed = . replace employed = 0 if employment != . replace employed = 1 if employment == 1 | employment == 2 tab employed, miss gen parttime = . replace parttime = 0 if employment != . replace parttime = 1 if employment == 2 tab parttime, miss * Organization size: tab betr14, miss rename betr14 org_size replace org_size = . if org_size < 0 drop if org_size == 11 //We drop those who are self-employed without employees. tab org_size, miss * Nationality: German or other tab nation14, miss rename nation14 nation replace nation = . if nation < 0 gen german = . replace german = 0 if nation != . replace german = 1 if nation == 1 tab german, miss * Secondary school degree: We capture whether an individual has: * an upper secondary school degree (Abitur) or completed vocational training * (= 1) * or neither of both (= 0) tab bepsbil, miss gen abitur = . replace abitur = 0 if bepsbil != . replace abitur = 1 if bepsbil == 3 | bepsbil == 4 tab abitur, miss * We include Fachhochschulreife in the Abitur category. tab bepbbil01, miss gen vocational = . replace vocational = 0 if bepbbil01 != . replace vocational = 1 if bepbbil01 >= 1 & bepbbil01 <= 7 tab vocational, miss gen secondary = . replace secondary = 0 if abitur == 0 & vocational == 0 replace secondary = 1 if abitur == 1 | vocational == 1 tab secondary, miss * College degree: tab bepbbil02, miss gen college = . replace college = 0 if bepbbil02 != . replace college = 1 if bepbbil02 >= 1 & bepbbil02 <= 10 tab college, miss * Marital status: tab befamstd, miss gen married = . replace married = 0 if befamstd != . replace married = 1 if befamstd == 1 | befamstd == 2 | befamstd == 7 | befamstd == 8 * We include same-sex official partnerships in the "married" category. tab married, miss * Branch: tab nace14, miss * Nace is a very sensible classification but there are many different branches. rename nace14 branch replace branch = . if branch < 0 * Dummy variables for the different branches: * Analogously to the classification of the Federal Statistical Office * of Germany (Statistisches Bundesamt), the KldB 92 ("Klassifikation der * Berufe"), we build 6 groups. * We slightly deviate from the KldB 92 in the following ways. * First, since we only have a few observations in the group II * (mining, minerals industry), we integrate these professions in group III * (with fabrication). * Second, since we have a lot of teachers and other education professionals * in the dataset, we build an own group for education (including teachers * and academics), a subgroup of service (V). * Third, since we have a lot of doctors and other health/social care * personnel in both the private and public sector, we also build an own group * for this service branch (heaso). * Lastly, we do not need "other workforce" (VI). * As a result we have the following groups: * - Agriculture, cattle industry, forestry and horticulture (agri) * - Fabrication; mining and minerals industry (fabri) * - Technical professions (techn) * - Service: health and social care (heaso) * - Service: education (educa) * - Service: other professions (servi) gen branch_agric = . replace branch_agric = 0 if branch != . replace branch_agric = 1 if branch >= 1 & branch <= 5 gen branch_fabri = . replace branch_fabri = 0 if branch != . replace branch_fabri = 1 if (branch >= 10 & branch <= 28) | /// (branch >= 96 & branch <= 97) | branch == 100 gen branch_techn = . replace branch_techn = 0 if branch != . replace branch_techn = 1 if (branch >= 29 & branch <= 45) | branch == 99 gen branch_heaso = . replace branch_heaso = 0 if branch != . replace branch_heaso = 1 if branch == 85 gen branch_educa = . replace branch_educa = 0 if branch != . replace branch_educa = 1 if branch == 80 gen branch_servi = . replace branch_servi = 0 if branch != . replace branch_servi = 1 if (branch >= 50 & branch <= 75) | /// (branch >= 90 & branch <= 95) | branch == 98 tab branch branch_agric tab branch branch_fabri tab branch branch_techn tab branch branch_heaso tab branch branch_educa tab branch branch_servi tab branch_agric public, row tab branch_fabri public, row tab branch_techn public, row tab branch_heaso public, row tab branch_educa public, row tab branch_servi public, row * Build larger groups: * Caring branch (education, health, and social care): gen branch_care = . replace branch_care = 0 if branch != . replace branch_care = 1 if branch_educa == 1 | branch_heaso == 1 * Non-caring branches: gen branch_ncar = . replace branch_ncar = 0 if branch != . replace branch_ncar = 1 if branch_care == 0 * Non-caring non-service: gen branch_ncarn = . replace branch_ncarn = 0 if branch != . replace branch_ncarn = 1 if branch_care == 0 & branch_servi == 0 * Check whether there are enough observations of public and private sector * employees in all groups: tab branch_care public, row tab branch_educa public, row tab branch_heaso public, row tab branch_ncar public, row tab branch_servi public, row tab branch_ncarn public, row * In all groups there is at least an acceptable number of public and private * sector employees. tab public if branch == . tab public if branch != . * No systematic bias arises because those who report no branch are similarly * distributed between private and public employment as those who report a * branch. * Occupational position: tab stib14, miss rename stib14 position replace position = . if position < 0 * Apprentices and interns: gen training = . replace training = 0 if position != . replace training = 1 if position >= 120 & position <= 140 tab training, miss * Self-employed: gen selfemployed = . replace selfemployed = 0 if position != . replace selfemployed = 1 if position >= 411 & position <= 433 sum selfemployed * Civil servant (Beamte/r): gen civil = . replace civil = 0 if position != . replace civil = 1 if position >= 610 & position <= 640 tab civil, miss tab civil public, miss * Experience full-time employment in years: sum expft14 rename expft14 exp_full tab exp_full if exp_full < 0 replace exp_full = . if exp_full < 0 sum exp_full * Experience part-time employment in years: sum exppt14 rename exppt14 exp_part tab exp_part if exp_part < 0 replace exp_part = . if exp_part < 0 sum exp_part gen year = 2014 * Only keep relevant variables: keep persnr year public employed parttime training selfemployed civil /// secondary abitur vocational college /// married german branch branch_agric branch_fabri branch_techn /// branch_heaso branch_educa branch_servi /// branch_care branch_ncar branch_ncarn /// exp_full exp_part * Save data set: save "`c(pwd)'\data_2014_gen.dta", replace ****************************************************************************** * 2013: use "`c(pwd)'\bdpgen.dta", clear set more off d * Whether the individual is employed in the public or private sector: tab oeffd13, miss rename oeffd13 public replace public = 0 if public == 2 replace public = . if public < 0 tab public, miss * Employment status: tab emplst13, miss rename emplst13 employment gen employed = . replace employed = 0 if employment != . replace employed = 1 if employment == 1 | employment == 2 tab employed, miss gen parttime = . replace parttime = 0 if employment != . replace parttime = 1 if employment == 2 tab parttime, miss * Organization size: tab betr13, miss rename betr13 org_size replace org_size = . if org_size < 0 drop if org_size == 11 tab org_size, miss * Nationality: tab nation13, miss rename nation13 nation replace nation = . if nation < 0 gen german = . replace german = 0 if nation != . replace german = 1 if nation == 1 tab german, miss * Secondary school degree: tab bdpsbil, miss gen abitur = . replace abitur = 0 if bdpsbil != . replace abitur = 1 if bdpsbil == 3 | bdpsbil == 4 tab abitur, miss tab bdpbbil01, miss gen vocational = . replace vocational = 0 if bdpbbil01 != . replace vocational = 1 if bdpbbil01 >= 1 & bdpbbil01 <= 7 tab vocational, miss gen secondary = . replace secondary = 0 if abitur == 0 & vocational == 0 replace secondary = 1 if abitur == 1 | vocational == 1 tab secondary, miss * College degree: tab bdpbbil02, miss gen college = . replace college = 0 if bdpbbil02 != . replace college = 1 if bdpbbil02 >= 1 & bdpbbil02 <= 5 tab college, miss * Marital status: tab bdfamstd, miss gen married = . replace married = 0 if bdfamstd != . replace married = 1 if bdfamstd == 1 | bdfamstd == 2 | bdfamstd == 7 | bdfamstd == 8 tab married, miss * Branch: tab nace13, miss rename nace13 branch replace branch = . if branch < 0 gen branch_agric = . replace branch_agric = 0 if branch != . replace branch_agric = 1 if branch >= 1 & branch <= 5 gen branch_fabri = . replace branch_fabri = 0 if branch != . replace branch_fabri = 1 if (branch >= 10 & branch <= 28) | /// (branch >= 96 & branch <= 97) | branch == 100 gen branch_techn = . replace branch_techn = 0 if branch != . replace branch_techn = 1 if (branch >= 29 & branch <= 45) | branch == 99 gen branch_heaso = . replace branch_heaso = 0 if branch != . replace branch_heaso = 1 if branch == 85 gen branch_educa = . replace branch_educa = 0 if branch != . replace branch_educa = 1 if branch == 80 gen branch_servi = . replace branch_servi = 0 if branch != . replace branch_servi = 1 if (branch >= 50 & branch <= 75) | /// (branch >= 90 & branch <= 95) | branch == 98 gen branch_care = . replace branch_care = 0 if branch != . replace branch_care = 1 if branch_educa == 1 | branch_heaso == 1 gen branch_ncar = . replace branch_ncar = 0 if branch != . replace branch_ncar = 1 if branch_care == 0 gen branch_ncarn = . replace branch_ncarn = 0 if branch != . replace branch_ncarn = 1 if branch_care == 0 & branch_servi == 0 * Occupational position: tab stib13, miss rename stib13 position replace position = . if position < 0 * Apprentices and interns: gen training = . replace training = 0 if position != . replace training = 1 if position >= 120 & position <= 140 tab training, miss * Self-employed: gen selfemployed = . replace selfemployed = 0 if position != . replace selfemployed = 1 if position >= 411 & position <= 433 sum selfemployed * Civil servant (Beamte/r): gen civil = . replace civil = 0 if position != . replace civil = 1 if position >= 610 & position <= 640 tab civil, miss tab civil public, miss * Experience full-time employment in years: sum expft13 rename expft13 exp_full tab exp_full if exp_full < 0 replace exp_full = . if exp_full < 0 sum exp_full * Experience part-time employment in years: sum exppt13 rename exppt13 exp_part tab exp_part if exp_part < 0 replace exp_part = . if exp_part < 0 sum exp_part gen year = 2013 keep persnr year public employed parttime training selfemployed civil /// secondary abitur vocational college /// married german branch branch_agric branch_fabri branch_techn /// branch_heaso branch_educa branch_servi /// branch_care branch_ncar branch_ncarn /// exp_full exp_part save "`c(pwd)'\data_2013_gen.dta", replace ****************************************************************************** * 2012: use "`c(pwd)'\bcpgen.dta", clear set more off d * Whether the individual is employed in the public or private sector: tab oeffd12, miss rename oeffd12 public replace public = 0 if public == 2 replace public = . if public < 0 tab public, miss * Employment status: tab emplst12, miss rename emplst12 employment gen employed = . replace employed = 0 if employment != . replace employed = 1 if employment == 1 | employment == 2 tab employed, miss gen parttime = . replace parttime = 0 if employment != . replace parttime = 1 if employment == 2 tab parttime, miss * Organization size: tab betr12, miss rename betr12 org_size replace org_size = . if org_size < 0 drop if org_size == 11 tab org_size, miss * Nationality: tab nation12, miss rename nation12 nation replace nation = . if nation < 0 gen german = . replace german = 0 if nation != . replace german = 1 if nation == 1 tab german, miss * Secondary school degree: tab bcpsbil, miss gen abitur = . replace abitur = 0 if bcpsbil != . replace abitur = 1 if bcpsbil == 3 | bcpsbil == 4 tab abitur, miss tab bcpbbil01, miss gen vocational = . replace vocational = 0 if bcpbbil01 != . replace vocational = 1 if bcpbbil01 >= 1 & bcpbbil01 <= 7 tab vocational, miss gen secondary = . replace secondary = 0 if abitur == 0 & vocational == 0 replace secondary = 1 if abitur == 1 | vocational == 1 tab secondary, miss * College degree: tab bcpbbil02, miss gen college = . replace college = 0 if bcpbbil02 != . replace college = 1 if bcpbbil02 >= 1 & bcpbbil02 <= 5 tab college, miss * Marital status: tab bcfamstd, miss gen married = . replace married = 0 if bcfamstd != . replace married = 1 if bcfamstd == 1 | bcfamstd == 2 | bcfamstd == 7 | bcfamstd == 8 tab married, miss * Branch: tab nace12, miss rename nace12 branch replace branch = . if branch < 0 gen branch_agric = . replace branch_agric = 0 if branch != . replace branch_agric = 1 if branch >= 1 & branch <= 5 gen branch_fabri = . replace branch_fabri = 0 if branch != . replace branch_fabri = 1 if (branch >= 10 & branch <= 28) | /// (branch >= 96 & branch <= 97) | branch == 100 gen branch_techn = . replace branch_techn = 0 if branch != . replace branch_techn = 1 if (branch >= 29 & branch <= 45) | branch == 99 gen branch_heaso = . replace branch_heaso = 0 if branch != . replace branch_heaso = 1 if branch == 85 gen branch_educa = . replace branch_educa = 0 if branch != . replace branch_educa = 1 if branch == 80 gen branch_servi = . replace branch_servi = 0 if branch != . replace branch_servi = 1 if (branch >= 50 & branch <= 75) | /// (branch >= 90 & branch <= 95) | branch == 98 gen branch_care = . replace branch_care = 0 if branch != . replace branch_care = 1 if branch_educa == 1 | branch_heaso == 1 gen branch_ncar = . replace branch_ncar = 0 if branch != . replace branch_ncar = 1 if branch_care == 0 gen branch_ncarn = . replace branch_ncarn = 0 if branch != . replace branch_ncarn = 1 if branch_care == 0 & branch_servi == 0 * Occupational position: tab stib12, miss rename stib12 position replace position = . if position < 0 * Apprentices and interns: gen training = . replace training = 0 if position != . replace training = 1 if position >= 120 & position <= 140 tab training, miss * Self-employed: gen selfemployed = . replace selfemployed = 0 if position != . replace selfemployed = 1 if position >= 411 & position <= 433 sum selfemployed * Civil servant (Beamte/r): gen civil = . replace civil = 0 if position != . replace civil = 1 if position >= 610 & position <= 640 tab civil, miss tab civil public, miss * Experience full-time employment in years: sum expft12 rename expft12 exp_full tab exp_full if exp_full < 0 replace exp_full = . if exp_full < 0 sum exp_full * Experience part-time employment in years: sum exppt12 rename exppt12 exp_part tab exp_part if exp_part < 0 replace exp_part = . if exp_part < 0 sum exp_part gen year = 2012 keep persnr year public employed parttime training selfemployed civil /// secondary abitur vocational college /// married german branch branch_agric branch_fabri branch_techn /// branch_heaso branch_educa branch_servi /// branch_care branch_ncar branch_ncarn /// exp_full exp_part save "`c(pwd)'\data_2012_gen.dta", replace ****************************************************************************** * 2011: use "`c(pwd)'\bbpgen.dta", clear set more off d * Whether the individual is employed in the public or private sector: tab oeffd11, miss rename oeffd11 public replace public = 0 if public == 2 replace public = . if public < 0 tab public, miss * Employment status: tab emplst11, miss rename emplst11 employment gen employed = . replace employed = 0 if employment != . replace employed = 1 if employment == 1 | employment == 2 tab employed, miss gen parttime = . replace parttime = 0 if employment != . replace parttime = 1 if employment == 2 tab parttime, miss * Organization size: tab betr11, miss rename betr11 org_size replace org_size = . if org_size < 0 drop if org_size == 11 tab org_size, miss * Nationality: tab nation11, miss rename nation11 nation replace nation = . if nation < 0 gen german = . replace german = 0 if nation != . replace german = 1 if nation == 1 tab german, miss * Secondary school degree: tab bbpsbil, miss gen abitur = . replace abitur = 0 if bbpsbil != . replace abitur = 1 if bbpsbil == 3 | bbpsbil == 4 tab abitur, miss tab bbpbbil01, miss gen vocational = . replace vocational = 0 if bbpbbil01 != . replace vocational = 1 if bbpbbil01 >= 1 & bbpbbil01 <= 6 tab vocational, miss gen secondary = . replace secondary = 0 if abitur == 0 & vocational == 0 replace secondary = 1 if abitur == 1 | vocational == 1 tab secondary, miss * College degree: tab bbpbbil02, miss gen college = . replace college = 0 if bbpbbil02 != . replace college = 1 if bbpbbil02 >= 1 & bbpbbil02 <= 5 tab college, miss * Marital status: tab bbfamstd, miss gen married = . replace married = 0 if bbfamstd != . replace married = 1 if bbfamstd == 1 | bbfamstd == 2 | bbfamstd == 7 | bbfamstd == 8 tab married, miss * Branch: tab nace11, miss rename nace11 branch replace branch = . if branch < 0 gen branch_agric = . replace branch_agric = 0 if branch != . replace branch_agric = 1 if branch >= 1 & branch <= 5 gen branch_fabri = . replace branch_fabri = 0 if branch != . replace branch_fabri = 1 if (branch >= 10 & branch <= 28) | /// (branch >= 96 & branch <= 97) | branch == 100 gen branch_techn = . replace branch_techn = 0 if branch != . replace branch_techn = 1 if (branch >= 29 & branch <= 45) | branch == 99 gen branch_heaso = . replace branch_heaso = 0 if branch != . replace branch_heaso = 1 if branch == 85 gen branch_educa = . replace branch_educa = 0 if branch != . replace branch_educa = 1 if branch == 80 gen branch_servi = . replace branch_servi = 0 if branch != . replace branch_servi = 1 if (branch >= 50 & branch <= 75) | /// (branch >= 90 & branch <= 95) | branch == 98 gen branch_care = . replace branch_care = 0 if branch != . replace branch_care = 1 if branch_educa == 1 | branch_heaso == 1 gen branch_ncar = . replace branch_ncar = 0 if branch != . replace branch_ncar = 1 if branch_care == 0 gen branch_ncarn = . replace branch_ncarn = 0 if branch != . replace branch_ncarn = 1 if branch_care == 0 & branch_servi == 0 * Occupational position: tab stib11, miss rename stib11 position replace position = . if position < 0 * Apprentices and interns: gen training = . replace training = 0 if position != . replace training = 1 if position >= 120 & position <= 140 tab training, miss * Self-employed: gen selfemployed = . replace selfemployed = 0 if position != . replace selfemployed = 1 if position >= 411 & position <= 433 sum selfemployed * Civil servant (Beamte/r): gen civil = . replace civil = 0 if position != . replace civil = 1 if position >= 610 & position <= 640 tab civil, miss tab civil public, miss * Experience full-time employment in years: sum expft11 rename expft11 exp_full tab exp_full if exp_full < 0 replace exp_full = . if exp_full < 0 sum exp_full * Experience part-time employment in years: sum exppt11 rename exppt11 exp_part tab exp_part if exp_part < 0 replace exp_part = . if exp_part < 0 sum exp_part gen year = 2011 keep persnr year public employed parttime training selfemployed civil /// secondary abitur vocational college /// married german branch branch_agric branch_fabri branch_techn /// branch_heaso branch_educa branch_servi /// branch_care branch_ncar branch_ncarn /// exp_full exp_part save "`c(pwd)'\data_2011_gen.dta", replace ****************************************************************************** * 2010: use "`c(pwd)'\bapgen.dta", clear set more off d * Whether the individual is employed in the public or private sector: tab oeffd10, miss rename oeffd10 public replace public = 0 if public == 2 replace public = . if public < 0 tab public, miss * Employment status: tab emplst10, miss rename emplst10 employment gen employed = . replace employed = 0 if employment != . replace employed = 1 if employment == 1 | employment == 2 tab employed, miss gen parttime = . replace parttime = 0 if employment != . replace parttime = 1 if employment == 2 tab parttime, miss * Organization size: tab betr10, miss rename betr10 org_size replace org_size = . if org_size < 0 drop if org_size == 11 tab org_size, miss * Nationality: tab nation10, miss rename nation10 nation replace nation = . if nation < 0 gen german = . replace german = 0 if nation != . replace german = 1 if nation == 1 tab german, miss * Secondary school degree: tab bapsbil, miss gen abitur = . replace abitur = 0 if bapsbil != . replace abitur = 1 if bapsbil == 3 | bapsbil == 4 tab abitur, miss tab bapbbil01, miss gen vocational = . replace vocational = 0 if bapbbil01 != . replace vocational = 1 if bapbbil01 >= 1 & bapbbil01 <= 6 tab vocational, miss gen secondary = . replace secondary = 0 if abitur == 0 & vocational == 0 replace secondary = 1 if abitur == 1 | vocational == 1 tab secondary, miss * College degree: tab bapbbil02, miss gen college = . replace college = 0 if bapbbil02 != . replace college = 1 if bapbbil02 >= 1 & bapbbil02 <= 5 tab college, miss * Marital status: tab bafamstd, miss gen married = . replace married = 0 if bafamstd != . replace married = 1 if bafamstd == 1 | bafamstd == 2 | bafamstd == 7 tab married, miss * Branch: tab nace10, miss rename nace10 branch replace branch = . if branch < 0 gen branch_agric = . replace branch_agric = 0 if branch != . replace branch_agric = 1 if branch >= 1 & branch <= 5 gen branch_fabri = . replace branch_fabri = 0 if branch != . replace branch_fabri = 1 if (branch >= 10 & branch <= 28) | /// (branch >= 96 & branch <= 97) | branch == 100 gen branch_techn = . replace branch_techn = 0 if branch != . replace branch_techn = 1 if (branch >= 29 & branch <= 45) | branch == 99 gen branch_heaso = . replace branch_heaso = 0 if branch != . replace branch_heaso = 1 if branch == 85 gen branch_educa = . replace branch_educa = 0 if branch != . replace branch_educa = 1 if branch == 80 gen branch_servi = . replace branch_servi = 0 if branch != . replace branch_servi = 1 if (branch >= 50 & branch <= 75) | /// (branch >= 90 & branch <= 95) | branch == 98 gen branch_care = . replace branch_care = 0 if branch != . replace branch_care = 1 if branch_educa == 1 | branch_heaso == 1 gen branch_ncar = . replace branch_ncar = 0 if branch != . replace branch_ncar = 1 if branch_care == 0 gen branch_ncarn = . replace branch_ncarn = 0 if branch != . replace branch_ncarn = 1 if branch_care == 0 & branch_servi == 0 * Occupational position: tab stib10, miss rename stib10 position replace position = . if position < 0 * Apprentices and interns: gen training = . replace training = 0 if position != . replace training = 1 if position >= 120 & position <= 140 tab training, miss * Self-employed: gen selfemployed = . replace selfemployed = 0 if position != . replace selfemployed = 1 if position >= 411 & position <= 433 sum selfemployed * Civil servant (Beamte/r): gen civil = . replace civil = 0 if position != . replace civil = 1 if position >= 610 & position <= 640 tab civil, miss tab civil public, miss * Experience full-time employment in years: sum expft10 rename expft10 exp_full tab exp_full if exp_full < 0 replace exp_full = . if exp_full < 0 sum exp_full * Experience part-time employment in years: sum exppt10 rename exppt10 exp_part tab exp_part if exp_part < 0 replace exp_part = . if exp_part < 0 sum exp_part gen year = 2010 keep persnr year public employed parttime training selfemployed civil /// secondary abitur vocational college /// married german branch branch_agric branch_fabri branch_techn /// branch_heaso branch_educa branch_servi /// branch_care branch_ncar branch_ncarn /// exp_full exp_part save "`c(pwd)'\data_2010_gen.dta", replace ****************************************************************************** * 2009: use "`c(pwd)'\zpgen.dta", clear set more off d * Whether the individual is employed in the public or private sector: tab oeffd09, miss rename oeffd09 public replace public = 0 if public == 2 replace public = . if public < 0 tab public, miss * Employment status: tab emplst09, miss rename emplst09 employment gen employed = . replace employed = 0 if employment != . replace employed = 1 if employment == 1 | employment == 2 tab employed, miss gen parttime = . replace parttime = 0 if employment != . replace parttime = 1 if employment == 2 tab parttime, miss * Organization size: tab betr09, miss rename betr09 org_size replace org_size = . if org_size < 0 drop if org_size == 11 tab org_size, miss * Nationality: tab nation09, miss rename nation09 nation replace nation = . if nation < 0 gen german = . replace german = 0 if nation != . replace german = 1 if nation == 1 tab german, miss * Secondary school degree: tab zpsbil, miss gen abitur = . replace abitur = 0 if zpsbil != . replace abitur = 1 if zpsbil == 3 | zpsbil == 4 tab abitur, miss tab zpbbil01, miss gen vocational = . replace vocational = 0 if zpbbil01 != . replace vocational = 1 if zpbbil01 >= 1 & zpbbil01 <= 6 tab vocational, miss gen secondary = . replace secondary = 0 if abitur == 0 & vocational == 0 replace secondary = 1 if abitur == 1 | vocational == 1 tab secondary, miss * College degree: tab zpbbil02, miss gen college = . replace college = 0 if zpbbil02 != . replace college = 1 if zpbbil02 >= 1 & zpbbil02 <= 5 tab college, miss * Marital status: tab zfamstd, miss gen married = . replace married = 0 if zfamstd != . replace married = 1 if zfamstd == 1 | zfamstd == 2 | zfamstd == 7 tab married, miss * Branch: tab nace09, miss rename nace09 branch replace branch = . if branch < 0 gen branch_agric = . replace branch_agric = 0 if branch != . replace branch_agric = 1 if branch >= 1 & branch <= 5 gen branch_fabri = . replace branch_fabri = 0 if branch != . replace branch_fabri = 1 if (branch >= 10 & branch <= 28) | /// (branch >= 96 & branch <= 97) | branch == 100 gen branch_techn = . replace branch_techn = 0 if branch != . replace branch_techn = 1 if (branch >= 29 & branch <= 45) | branch == 99 gen branch_heaso = . replace branch_heaso = 0 if branch != . replace branch_heaso = 1 if branch == 85 gen branch_educa = . replace branch_educa = 0 if branch != . replace branch_educa = 1 if branch == 80 gen branch_servi = . replace branch_servi = 0 if branch != . replace branch_servi = 1 if (branch >= 50 & branch <= 75) | /// (branch >= 90 & branch <= 95) | branch == 98 gen branch_care = . replace branch_care = 0 if branch != . replace branch_care = 1 if branch_educa == 1 | branch_heaso == 1 gen branch_ncar = . replace branch_ncar = 0 if branch != . replace branch_ncar = 1 if branch_care == 0 gen branch_ncarn = . replace branch_ncarn = 0 if branch != . replace branch_ncarn = 1 if branch_care == 0 & branch_servi == 0 * Occupational position: tab stib09, miss rename stib09 position replace position = . if position < 0 * Apprentices and interns: gen training = . replace training = 0 if position != . replace training = 1 if position >= 120 & position <= 140 tab training, miss * Self-employed: gen selfemployed = . replace selfemployed = 0 if position != . replace selfemployed = 1 if position >= 411 & position <= 433 sum selfemployed * Civil servant (Beamte/r): gen civil = . replace civil = 0 if position != . replace civil = 1 if position >= 610 & position <= 640 tab civil, miss tab civil public, miss * Experience full-time employment in years: sum expft09 rename expft09 exp_full tab exp_full if exp_full < 0 replace exp_full = . if exp_full < 0 sum exp_full * Experience part-time employment in years: sum exppt09 rename exppt09 exp_part tab exp_part if exp_part < 0 replace exp_part = . if exp_part < 0 sum exp_part gen year = 2009 keep persnr year public employed parttime training selfemployed civil /// secondary abitur vocational college /// married german branch branch_agric branch_fabri branch_techn /// branch_heaso branch_educa branch_servi /// branch_care branch_ncar branch_ncarn /// exp_full exp_part save "`c(pwd)'\data_2009_gen.dta", replace ****************************************************************************** * 2008: use "`c(pwd)'\ypgen.dta", clear set more off d * Whether the individual is employed in the public or private sector: tab oeffd08, miss rename oeffd08 public replace public = 0 if public == 2 replace public = . if public < 0 tab public, miss * Employment status: tab emplst08, miss rename emplst08 employment gen employed = . replace employed = 0 if employment != . replace employed = 1 if employment == 1 | employment == 2 tab employed, miss gen parttime = . replace parttime = 0 if employment != . replace parttime = 1 if employment == 2 tab parttime, miss * Organization size: tab betr08, miss rename betr08 org_size replace org_size = . if org_size < 0 drop if org_size == 11 tab org_size, miss * Nationality: tab nation08, miss rename nation08 nation replace nation = . if nation < 0 gen german = . replace german = 0 if nation != . replace german = 1 if nation == 1 tab german, miss * Secondary school degree: tab ypsbil, miss gen abitur = . replace abitur = 0 if ypsbil != . replace abitur = 1 if ypsbil == 3 | ypsbil == 4 tab abitur, miss tab ypbbil01, miss gen vocational = . replace vocational = 0 if ypbbil01 != . replace vocational = 1 if ypbbil01 >= 1 & ypbbil01 <= 6 tab vocational, miss gen secondary = . replace secondary = 0 if abitur == 0 & vocational == 0 replace secondary = 1 if abitur == 1 | vocational == 1 tab secondary, miss * College degree: tab ypbbil02, miss gen college = . replace college = 0 if ypbbil02 != . replace college = 1 if ypbbil02 >= 1 & ypbbil02 <= 5 tab college, miss * Marital status: tab yfamstd, miss gen married = . replace married = 0 if yfamstd != . replace married = 1 if yfamstd == 1 | yfamstd == 2 | yfamstd == 7 tab married, miss * Branch: tab nace08, miss rename nace08 branch replace branch = . if branch < 0 gen branch_agric = . replace branch_agric = 0 if branch != . replace branch_agric = 1 if branch >= 1 & branch <= 5 gen branch_fabri = . replace branch_fabri = 0 if branch != . replace branch_fabri = 1 if (branch >= 10 & branch <= 28) | /// (branch >= 96 & branch <= 97) | branch == 100 gen branch_techn = . replace branch_techn = 0 if branch != . replace branch_techn = 1 if (branch >= 29 & branch <= 45) | branch == 99 gen branch_heaso = . replace branch_heaso = 0 if branch != . replace branch_heaso = 1 if branch == 85 gen branch_educa = . replace branch_educa = 0 if branch != . replace branch_educa = 1 if branch == 80 gen branch_servi = . replace branch_servi = 0 if branch != . replace branch_servi = 1 if (branch >= 50 & branch <= 75) | /// (branch >= 90 & branch <= 95) | branch == 98 gen branch_care = . replace branch_care = 0 if branch != . replace branch_care = 1 if branch_educa == 1 | branch_heaso == 1 gen branch_ncar = . replace branch_ncar = 0 if branch != . replace branch_ncar = 1 if branch_care == 0 gen branch_ncarn = . replace branch_ncarn = 0 if branch != . replace branch_ncarn = 1 if branch_care == 0 & branch_servi == 0 * Occupational position: tab stib08, miss rename stib08 position replace position = . if position < 0 * Apprentices and interns: gen training = . replace training = 0 if position != . replace training = 1 if position >= 120 & position <= 140 tab training, miss * Self-employed: gen selfemployed = . replace selfemployed = 0 if position != . replace selfemployed = 1 if position >= 411 & position <= 433 sum selfemployed * Civil servant (Beamte/r): gen civil = . replace civil = 0 if position != . replace civil = 1 if position >= 610 & position <= 640 tab civil, miss tab civil public, miss * Experience full-time employment in years: sum expft08 rename expft08 exp_full tab exp_full if exp_full < 0 replace exp_full = . if exp_full < 0 sum exp_full * Experience part-time employment in years: sum exppt08 rename exppt08 exp_part tab exp_part if exp_part < 0 replace exp_part = . if exp_part < 0 sum exp_part gen year = 2008 keep persnr year public employed parttime training selfemployed civil /// secondary abitur vocational college /// married german branch branch_agric branch_fabri branch_techn /// branch_heaso branch_educa branch_servi /// branch_care branch_ncar branch_ncarn /// exp_full exp_part save "`c(pwd)'\data_2008_gen.dta", replace ****************************************************************************** * 2007: use "`c(pwd)'\xpgen.dta", clear set more off d * Whether the individual is employed in the public or private sector: tab oeffd07, miss rename oeffd07 public replace public = 0 if public == 2 replace public = . if public < 0 tab public, miss * Employment status: tab emplst07, miss rename emplst07 employment gen employed = . replace employed = 0 if employment != . replace employed = 1 if employment == 1 | employment == 2 tab employed, miss gen parttime = . replace parttime = 0 if employment != . replace parttime = 1 if employment == 2 tab parttime, miss * Organization size: tab betr07, miss rename betr07 org_size replace org_size = . if org_size < 0 drop if org_size == 11 tab org_size, miss * Nationality: tab nation07, miss rename nation07 nation replace nation = . if nation < 0 gen german = . replace german = 0 if nation != . replace german = 1 if nation == 1 tab german, miss * Secondary school degree: tab xpsbil, miss gen abitur = . replace abitur = 0 if xpsbil != . replace abitur = 1 if xpsbil == 3 | xpsbil == 4 tab abitur, miss tab xpbbil01, miss gen vocational = . replace vocational = 0 if xpbbil01 != . replace vocational = 1 if xpbbil01 >= 1 & xpbbil01 <= 6 tab vocational, miss gen secondary = . replace secondary = 0 if abitur == 0 & vocational == 0 replace secondary = 1 if abitur == 1 | vocational == 1 tab secondary, miss * College degree: tab xpbbil02, miss gen college = . replace college = 0 if xpbbil02 != . replace college = 1 if xpbbil02 >= 1 & xpbbil02 <= 5 tab college, miss * Marital status: tab xfamstd, miss gen married = . replace married = 0 if xfamstd != . replace married = 1 if xfamstd == 1 | xfamstd == 2 | xfamstd == 7 tab married, miss * Branch: tab nace07, miss rename nace07 branch replace branch = . if branch < 0 gen branch_agric = . replace branch_agric = 0 if branch != . replace branch_agric = 1 if branch >= 1 & branch <= 5 gen branch_fabri = . replace branch_fabri = 0 if branch != . replace branch_fabri = 1 if (branch >= 10 & branch <= 28) | /// (branch >= 96 & branch <= 97) | branch == 100 gen branch_techn = . replace branch_techn = 0 if branch != . replace branch_techn = 1 if (branch >= 29 & branch <= 45) | branch == 99 gen branch_heaso = . replace branch_heaso = 0 if branch != . replace branch_heaso = 1 if branch == 85 gen branch_educa = . replace branch_educa = 0 if branch != . replace branch_educa = 1 if branch == 80 gen branch_servi = . replace branch_servi = 0 if branch != . replace branch_servi = 1 if (branch >= 50 & branch <= 75) | /// (branch >= 90 & branch <= 95) | branch == 98 gen branch_care = . replace branch_care = 0 if branch != . replace branch_care = 1 if branch_educa == 1 | branch_heaso == 1 gen branch_ncar = . replace branch_ncar = 0 if branch != . replace branch_ncar = 1 if branch_care == 0 gen branch_ncarn = . replace branch_ncarn = 0 if branch != . replace branch_ncarn = 1 if branch_care == 0 & branch_servi == 0 * Occupational position: tab stib07, miss rename stib07 position replace position = . if position < 0 * Apprentices and interns: gen training = . replace training = 0 if position != . replace training = 1 if position >= 120 & position <= 140 tab training, miss * Self-employed: gen selfemployed = . replace selfemployed = 0 if position != . replace selfemployed = 1 if position >= 411 & position <= 433 sum selfemployed * Civil servant (Beamte/r): gen civil = . replace civil = 0 if position != . replace civil = 1 if position >= 610 & position <= 640 tab civil, miss tab civil public, miss * Experience full-time employment in years: sum expft07 rename expft07 exp_full tab exp_full if exp_full < 0 replace exp_full = . if exp_full < 0 sum exp_full * Experience part-time employment in years: sum exppt07 rename exppt07 exp_part tab exp_part if exp_part < 0 replace exp_part = . if exp_part < 0 sum exp_part gen year = 2007 keep persnr year public employed parttime training selfemployed civil /// secondary abitur vocational college /// married german branch branch_agric branch_fabri branch_techn /// branch_heaso branch_educa branch_servi /// branch_care branch_ncar branch_ncarn /// exp_full exp_part save "`c(pwd)'\data_2007_gen.dta", replace ****************************************************************************** * 2006: use "`c(pwd)'\wpgen.dta", clear set more off d * Whether the individual is employed in the public or private sector: tab oeffd06, miss rename oeffd06 public replace public = 0 if public == 2 replace public = . if public < 0 tab public, miss * Employment status: tab emplst06, miss rename emplst06 employment gen employed = . replace employed = 0 if employment != . replace employed = 1 if employment == 1 | employment == 2 tab employed, miss gen parttime = . replace parttime = 0 if employment != . replace parttime = 1 if employment == 2 tab parttime, miss * Organization size: tab betr06, miss rename betr06 org_size replace org_size = . if org_size < 0 drop if org_size == 11 tab org_size, miss * Nationality: tab nation06, miss rename nation06 nation replace nation = . if nation < 0 gen german = . replace german = 0 if nation != . replace german = 1 if nation == 1 tab german, miss * Secondary school degree: tab wpsbil, miss gen abitur = . replace abitur = 0 if wpsbil != . replace abitur = 1 if wpsbil == 3 | wpsbil == 4 tab abitur, miss tab wpbbil01, miss gen vocational = . replace vocational = 0 if wpbbil01 != . replace vocational = 1 if wpbbil01 >= 1 & wpbbil01 <= 6 tab vocational, miss gen secondary = . replace secondary = 0 if abitur == 0 & vocational == 0 replace secondary = 1 if abitur == 1 | vocational == 1 tab secondary, miss * College degree: tab wpbbil02, miss gen college = . replace college = 0 if wpbbil02 != . replace college = 1 if wpbbil02 >= 1 & wpbbil02 <= 5 tab college, miss * Marital status: tab wfamstd, miss gen married = . replace married = 0 if wfamstd != . replace married = 1 if wfamstd == 1 | wfamstd == 2 | wfamstd == 7 tab married, miss * Branch: tab nace06, miss rename nace06 branch replace branch = . if branch < 0 gen branch_agric = . replace branch_agric = 0 if branch != . replace branch_agric = 1 if branch >= 1 & branch <= 5 gen branch_fabri = . replace branch_fabri = 0 if branch != . replace branch_fabri = 1 if (branch >= 10 & branch <= 28) | /// (branch >= 96 & branch <= 97) | branch == 100 gen branch_techn = . replace branch_techn = 0 if branch != . replace branch_techn = 1 if (branch >= 29 & branch <= 45) | branch == 99 gen branch_heaso = . replace branch_heaso = 0 if branch != . replace branch_heaso = 1 if branch == 85 gen branch_educa = . replace branch_educa = 0 if branch != . replace branch_educa = 1 if branch == 80 gen branch_servi = . replace branch_servi = 0 if branch != . replace branch_servi = 1 if (branch >= 50 & branch <= 75) | /// (branch >= 90 & branch <= 95) | branch == 98 gen branch_care = . replace branch_care = 0 if branch != . replace branch_care = 1 if branch_educa == 1 | branch_heaso == 1 gen branch_ncar = . replace branch_ncar = 0 if branch != . replace branch_ncar = 1 if branch_care == 0 gen branch_ncarn = . replace branch_ncarn = 0 if branch != . replace branch_ncarn = 1 if branch_care == 0 & branch_servi == 0 * Occupational position: tab stib06, miss rename stib06 position replace position = . if position < 0 * Apprentices and interns: gen training = . replace training = 0 if position != . replace training = 1 if position >= 120 & position <= 140 tab training, miss * Self-employed: gen selfemployed = . replace selfemployed = 0 if position != . replace selfemployed = 1 if position >= 411 & position <= 433 sum selfemployed * Civil servant (Beamte/r): gen civil = . replace civil = 0 if position != . replace civil = 1 if position >= 610 & position <= 640 tab civil, miss tab civil public, miss * Experience full-time employment in years: sum expft06 rename expft06 exp_full tab exp_full if exp_full < 0 replace exp_full = . if exp_full < 0 sum exp_full * Experience part-time employment in years: sum exppt06 rename exppt06 exp_part tab exp_part if exp_part < 0 replace exp_part = . if exp_part < 0 sum exp_part gen year = 2006 keep persnr year public employed parttime training selfemployed civil /// secondary abitur vocational college /// married german branch branch_agric branch_fabri branch_techn /// branch_heaso branch_educa branch_servi /// branch_care branch_ncar branch_ncarn /// exp_full exp_part save "`c(pwd)'\data_2006_gen.dta", replace ****************************************************************************** * 2005: use "`c(pwd)'\vpgen.dta", clear set more off d * Whether the individual is employed in the public or private sector: tab oeffd05, miss rename oeffd05 public replace public = 0 if public == 2 replace public = . if public < 0 tab public, miss * Employment status: tab emplst05, miss rename emplst05 employment gen employed = . replace employed = 0 if employment != . replace employed = 1 if employment == 1 | employment == 2 tab employed, miss gen parttime = . replace parttime = 0 if employment != . replace parttime = 1 if employment == 2 tab parttime, miss * Organization size: tab betr05, miss rename betr05 org_size replace org_size = . if org_size < 0 drop if org_size == 11 tab org_size, miss * Nationality: tab nation05, miss rename nation05 nation replace nation = . if nation < 0 gen german = . replace german = 0 if nation != . replace german = 1 if nation == 1 tab german, miss * Secondary school degree: tab vpsbil, miss gen abitur = . replace abitur = 0 if vpsbil != . replace abitur = 1 if vpsbil == 3 | vpsbil == 4 tab abitur, miss tab vpbbil01, miss gen vocational = . replace vocational = 0 if vpbbil01 != . replace vocational = 1 if vpbbil01 >= 1 & vpbbil01 <= 6 tab vocational, miss gen secondary = . replace secondary = 0 if abitur == 0 & vocational == 0 replace secondary = 1 if abitur == 1 | vocational == 1 tab secondary, miss * College degree: tab vpbbil02, miss gen college = . replace college = 0 if vpbbil02 != . replace college = 1 if vpbbil02 >= 1 & vpbbil02 <= 5 tab college, miss * Marital status: tab vfamstd, miss gen married = . replace married = 0 if vfamstd != . replace married = 1 if vfamstd == 1 | vfamstd == 2 | vfamstd == 7 tab married, miss * Branch: tab nace05, miss rename nace05 branch replace branch = . if branch < 0 gen branch_agric = . replace branch_agric = 0 if branch != . replace branch_agric = 1 if branch >= 1 & branch <= 5 gen branch_fabri = . replace branch_fabri = 0 if branch != . replace branch_fabri = 1 if (branch >= 10 & branch <= 28) | /// (branch >= 96 & branch <= 97) | branch == 100 gen branch_techn = . replace branch_techn = 0 if branch != . replace branch_techn = 1 if (branch >= 29 & branch <= 45) | branch == 99 gen branch_heaso = . replace branch_heaso = 0 if branch != . replace branch_heaso = 1 if branch == 85 gen branch_educa = . replace branch_educa = 0 if branch != . replace branch_educa = 1 if branch == 80 gen branch_servi = . replace branch_servi = 0 if branch != . replace branch_servi = 1 if (branch >= 50 & branch <= 75) | /// (branch >= 90 & branch <= 95) | branch == 98 gen branch_care = . replace branch_care = 0 if branch != . replace branch_care = 1 if branch_educa == 1 | branch_heaso == 1 gen branch_ncar = . replace branch_ncar = 0 if branch != . replace branch_ncar = 1 if branch_care == 0 gen branch_ncarn = . replace branch_ncarn = 0 if branch != . replace branch_ncarn = 1 if branch_care == 0 & branch_servi == 0 * Occupational position: tab stib05, miss rename stib05 position replace position = . if position < 0 * Apprentices and interns: gen training = . replace training = 0 if position != . replace training = 1 if position >= 120 & position <= 140 tab training, miss * Self-employed: gen selfemployed = . replace selfemployed = 0 if position != . replace selfemployed = 1 if position >= 411 & position <= 433 sum selfemployed * Civil servant (Beamte/r): gen civil = . replace civil = 0 if position != . replace civil = 1 if position >= 610 & position <= 640 tab civil, miss tab civil public, miss * Experience full-time employment in years: sum expft05 rename expft05 exp_full tab exp_full if exp_full < 0 replace exp_full = . if exp_full < 0 sum exp_full * Experience part-time employment in years: sum exppt05 rename exppt05 exp_part tab exp_part if exp_part < 0 replace exp_part = . if exp_part < 0 sum exp_part gen year = 2005 keep persnr year public employed parttime training selfemployed civil /// secondary abitur vocational college /// married german branch branch_agric branch_fabri branch_techn /// branch_heaso branch_educa branch_servi /// branch_care branch_ncar branch_ncarn /// exp_full exp_part save "`c(pwd)'\data_2005_gen.dta", replace ****************************************************************************** * Combine data across years to one file: use "`c(pwd)'\data_2005_gen.dta" append using "`c(pwd)'\data_2006_gen.dta" append using "`c(pwd)'\data_2007_gen.dta" append using "`c(pwd)'\data_2008_gen.dta" append using "`c(pwd)'\data_2009_gen.dta" append using "`c(pwd)'\data_2010_gen.dta" append using "`c(pwd)'\data_2011_gen.dta" append using "`c(pwd)'\data_2012_gen.dta" append using "`c(pwd)'\data_2013_gen.dta" append using "`c(pwd)'\data_2014_gen.dta" save "`c(pwd)'\data_gen.dta", replace ****************************************************************************** * Information from extensive SOEP person files * 2014: use "`c(pwd)'\bep.dta", clear set more off d * Merge region (German state) from household file: set more off merge n:1 hhnrakt using "`c(pwd)'\behbrutto.dta", keepusing(bebula) * Key variable is the household number ("hhnrakt"). drop if _merge == 2 * Drop observations from the merged data set ("using") that cannot be used * because these individuals are not included in the baseline data set * ("master"). drop _merge //Drop the "_merge" variable. rename bebula region tab region, miss * Gender: tab bep12601, miss rename bep12601 gender gen female = . replace female = 0 if gender == 1 replace female = 1 if gender == 2 tab female, miss * Age: tab bep12603, miss //Year of birth rename bep12603 year_birth replace year_birth = . if year_birth < 0 gen age = . replace age = 2014 - year_birth if year_birth != . sum age * Risk seeking: tab bep04, miss rename bep04 risk_seek replace risk_seek = . if risk_seek < 0 sum risk_seek * Risk aversion: tab risk_seek, miss gen risk_avers = . replace risk_avers = 10 - risk_seek if risk_seek != . tab risk_seek risk_avers * Risk seeking with respect to the occupational career: tab bep12504, miss rename bep12504 risk_seek_oc replace risk_seek_oc = . if risk_seek_oc < 0 * Risk aversion with respect to the occupational career: gen risk_av_oc = 10 - risk_seek_oc if risk_seek_oc != . tab risk_av_oc, miss * Merge Big Five personality traits from 2013 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bdp.dta", keepusing(bdp15101-bdp15115) * Key variable is the person number ("persnr"). drop if _merge == 2 drop _merge tab bdp15101, miss rename bdp15101 thoroughworker replace thoroughworker = . if thoroughworker < 0 tab bdp15102, miss rename bdp15102 communicative replace communicative = . if communicative < 0 tab bdp15103, miss rename bdp15103 coarse replace coarse = . if coarse < 0 tab bdp15104, miss rename bdp15104 original replace original = . if original < 0 tab bdp15105, miss rename bdp15105 worry replace worry = . if worry < 0 tab bdp15106, miss rename bdp15106 forgive replace forgive = . if forgive < 0 tab bdp15107, miss rename bdp15107 laziness replace laziness = . if laziness < 0 tab bdp15108, miss rename bdp15108 sociable replace sociable = . if sociable < 0 tab bdp15109, miss rename bdp15109 experiences replace experiences = . if experiences < 0 tab bdp15110, miss rename bdp15110 nervous replace nervous = . if nervous < 0 tab bdp15111, miss rename bdp15111 efficacy replace efficacy = . if efficacy < 0 tab bdp15112, miss rename bdp15112 reserved replace reserved = . if reserved < 0 tab bdp15113, miss rename bdp15113 courtesy replace courtesy = . if courtesy < 0 tab bdp15114, miss rename bdp15114 imagination replace imagination = . if imagination < 0 tab bdp15115, miss rename bdp15115 stress_resistant replace stress_resistant = . if stress_resistant < 0 tab1 thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant * Check correlations between items: corr thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant * Check Cronbach's alpha values * and how Cronbach's alpha would change if one variable was excluded: alpha communicative sociable reserved, item alpha original experiences imagination, item alpha thoroughworker laziness efficacy, item alpha coarse forgive courtesy, item alpha worry nervous stress_resistant, item * Some scales have only moderate internal consistency. * Nevertheless, we keep this established scale and do not want to additionally * shorten the short measures for a slightly increased Cronbach's alpha. * Dropping important items would recude the construct validity. factor thoroughworker communicative coarse original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination /// stress_resistant, ipf fac(5) * Iterated principal-factor analysis with 5 factors estat kmo //Check sampling adequacy rot, promax (4) blanks (.3) * Rotate factor loadings to achieve more distinct factors * (rotation with power of 4). * Do not show small loadings below .3. estat common //Check correlations between factors predict extrav openness conscient agreeable neurot sum extrav openness conscient agreeable neurot * Merge reciprocity from 2010 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bap.dta", keepusing(bap12401-bap12410) drop if _merge == 2 drop _merge tab1 bap12401 bap12402 bap12403 bap12404 bap12405 bap12406 bap12407 /// bap12408 bap12409 bap12410 replace bap12401 = . if bap12401 < 0 replace bap12402 = . if bap12402 < 0 replace bap12403 = . if bap12403 < 0 replace bap12404 = . if bap12404 < 0 replace bap12405 = . if bap12405 < 0 replace bap12406 = . if bap12406 < 0 replace bap12407 = . if bap12407 < 0 replace bap12408 = . if bap12408 < 0 replace bap12409 = . if bap12409 < 0 replace bap12410 = . if bap12410 < 0 corr bap12401 bap12402 bap12403 bap12404 bap12405 bap12406 bap12407 /// bap12408 bap12409 bap12410 alpha bap12401 bap12404 bap12406, item //Scale for positive reciprocity alpha bap12402 bap12403 bap12405 bap12409 bap12410, item //Negative reciprocity * The internal consistency of negative reciprocity is already acceptable (.78) * and would only slightly increase if one item was dropped. factor bap12401 bap12402 bap12403 bap12404 bap12405 bap12406 bap12407 /// bap12408 bap12409 bap12410, ipf fac(2) estat kmo rot, promax (4) blanks (.3) estat common predict recipr_neg recipr_pos * Merge trust from 2013 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bdp.dta", keepusing(bdp0301-bdp0303) drop if _merge == 2 drop _merge tab1 bdp0301 bdp0302 bdp0303 replace bdp0301 = . if bdp0301 < 0 replace bdp0302 = . if bdp0302 < 0 replace bdp0303 = . if bdp0303 < 0 corr bdp0301 bdp0302 bdp0303 alpha bdp0301 bdp0302 bdp0303, item * The moderate internal consistency (.63) would only slightly increase * if one item of the (already short) scale was dropped. * The risk of not sufficiently capturing the whole construct would be too high * if the scale was further shortened. factor bdp0301 bdp0302 bdp0303, ipf fac(1) estat kmo predict trust * Merge importance of life domains from 2012 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bcp.dta", keepusing(bcp0301 bcp0302 bcp0308) drop if _merge == 2 drop _merge tab1 bcp0301 bcp0302 bcp0308, miss rename bcp0301 low_financial //Wichtigkeit: Sich etwas leisten können rename bcp0302 low_altruism //Wichtigkeit: Für andere da sein rename bcp0308 low_civic_virt //Wichtigk.: Sich politisch, gesellsch. einsetzen replace low_financial = . if low_financial < 0 replace low_altruism = . if low_altruism < 0 replace low_civic_virt = . if low_civic_virt < 0 gen financial = . replace financial = 5 - low_financial if low_financial != . gen altruism = . replace altruism = 5 - low_altruism if low_altruism != . gen civic_virt = . replace civic_virt = 5 - low_civic_virt if low_civic_virt != . * Merge locus of control from 2010 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bap.dta", keepusing(bap0201-bap0210) drop if _merge == 2 drop _merge tab1 bap0201 bap0202 bap0203 bap0204 bap0205 bap0206 bap0207 bap0208 /// bap0209 bap0210, miss replace bap0201 = . if bap0201 < 0 replace bap0202 = . if bap0202 < 0 replace bap0203 = . if bap0203 < 0 replace bap0204 = . if bap0204 < 0 replace bap0205 = . if bap0205 < 0 replace bap0206 = . if bap0206 < 0 replace bap0207 = . if bap0207 < 0 replace bap0208 = . if bap0208 < 0 replace bap0209 = . if bap0209 < 0 replace bap0210 = . if bap0210 < 0 corr bap0201 bap0202 bap0203 bap0204 bap0205 bap0206 bap0207 bap0208 /// bap0209 bap0210 alpha bap0201 bap0202 bap0203 bap0204 bap0205 bap0206 bap0207 bap0208 /// bap0209 bap0210, item * Internal consistency can be most substantially increased by dropping * item 04 ("If a person is socially or politically active, he/she can * have an effect on social conditions"). * This is also in line with previous literature * (Heywood/Jirjahn/Struewing 2017). * Therefore, we do not include item 04 when constructing locus of control. factor bap0201 bap0202 bap0203 bap0205 bap0206 /// bap0207 bap0208 bap0209 bap0210, ipf fac(1) estat kmo predict low_loc sum low_loc gen loc = (-1) * low_loc sum loc /* * Merge voluntary activities from 2013 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bdp.dta", keepusing(bdp1108) drop if _merge == 2 drop _merge tab bdp1108, miss rename bdp1108 volunt_act_inv gen volunt_act = . replace volunt_act = 6 - volunt_act_inv if volunt_act_inv >= 1 & volunt_act_inv <= 5 tab volunt_act, miss * "Voluntary activities in associations, organizations, ..." * 1 = never; 2 = less frequently; 3 = at least once per month; * 4 = at least once per week; 5 = every day */ * The coding of the voluntary activities variable in 2013 is different * from the coding in other years (2011, 2009, 2007, 2005). * To remain consistent, we better use the variable from 2011: * Merge voluntary activities from 2011 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bbp.dta", keepusing(bbp0307) drop if _merge == 2 drop _merge tab bbp0307, miss rename bbp0307 volunt_act_inv gen volunt_act = . replace volunt_act = 5 - volunt_act_inv if volunt_act_inv >= 1 & volunt_act_inv <= 4 tab volunt_act, miss * "Voluntary activities" * Formulation in questionnaire (2005): * "Ehrenamtliche Tätigkeiten in Vereinen, Verbänden oder sozialen Diensten" * 1 = never; 2 = less frequently; 3 = every month; 4 = every week * Merge helping behavior from 2011 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bbp.dta", keepusing(bbp0306) drop if _merge == 2 drop _merge tab bbp0306, miss rename bbp0306 helping_inv gen helping = . replace helping = 5 - helping_inv if helping_inv >= 1 & helping_inv <= 4 tab helping, miss * "Assisting/helping friends, relatives" * Formulation in questionnaire (2005): * "Mithelfen, wenn bei Freunden, Verwandten oder Nachbarn etwas zu tun ist" * 1 = never; 2 = less frequently; 3 = every month; 4 = every week * ABM-Maßnahme or 1 euro job (special programs for unemployed): tab bep39, miss rename bep39 abm replace abm = 0 if abm == -2 | abm == 3 replace abm = . if abm == -1 tab abm, miss * Questionnaire (2007): "Handelt es sich um eine ABM-Stelle oder * eine Gemeinnützige Arbeit (1-Euro-Job)?" gen year = 2014 * Only keep relevant variables: keep persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant * Order variables in data set: order persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant * Save data set: save "`c(pwd)'\data_2014_p.dta", replace ****************************************************************************** * 2013: use "`c(pwd)'\bdp.dta", clear set more off d * Merge region (German state) from household file: set more off merge n:1 hhnrakt using "`c(pwd)'\bdhbrutto.dta", keepusing(bdbula) drop if _merge == 2 drop _merge rename bdbula region tab region, miss * Gender: tab bdp13401, miss rename bdp13401 gender gen female = . replace female = 0 if gender == 1 replace female = 1 if gender == 2 tab female, miss * Age: tab bdp13403, miss rename bdp13403 year_birth replace year_birth = . if year_birth < 0 gen age = . replace age = 2013 - year_birth if year_birth != . sum age * Risk seeking: tab bdp154, miss rename bdp154 risk_seek replace risk_seek = . if risk_seek < 0 * Risk aversion: tab risk_seek, miss gen risk_avers = . replace risk_avers = 10 - risk_seek if risk_seek != . tab risk_seek risk_avers * Merge risk seeking with respect to the occupational career from 2009 dataset: set more off merge 1:1 persnr using "`c(pwd)'\zp.dta", keepusing(zp11804) drop if _merge == 2 drop _merge tab zp11804, miss rename zp11804 risk_seek_oc replace risk_seek_oc = . if risk_seek_oc < 0 * Risk aversion with respect to the occupational career: gen risk_av_oc = 10 - risk_seek_oc if risk_seek_oc != . tab risk_av_oc, miss * Big Five personality traits: tab bdp15101, miss rename bdp15101 thoroughworker replace thoroughworker = . if thoroughworker < 0 tab bdp15102, miss rename bdp15102 communicative replace communicative = . if communicative < 0 tab bdp15103, miss rename bdp15103 coarse replace coarse = . if coarse < 0 tab bdp15104, miss rename bdp15104 original replace original = . if original < 0 tab bdp15105, miss rename bdp15105 worry replace worry = . if worry < 0 tab bdp15106, miss rename bdp15106 forgive replace forgive = . if forgive < 0 tab bdp15107, miss rename bdp15107 laziness replace laziness = . if laziness < 0 tab bdp15108, miss rename bdp15108 sociable replace sociable = . if sociable < 0 tab bdp15109, miss rename bdp15109 experiences replace experiences = . if experiences < 0 tab bdp15110, miss rename bdp15110 nervous replace nervous = . if nervous < 0 tab bdp15111, miss rename bdp15111 efficacy replace efficacy = . if efficacy < 0 tab bdp15112, miss rename bdp15112 reserved replace reserved = . if reserved < 0 tab bdp15113, miss rename bdp15113 courtesy replace courtesy = . if courtesy < 0 tab bdp15114, miss rename bdp15114 imagination replace imagination = . if imagination < 0 tab bdp15115, miss rename bdp15115 stress_resistant replace stress_resistant = . if stress_resistant < 0 tab1 thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant corr thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant factor thoroughworker communicative coarse original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination /// stress_resistant, ipf fac(5) rot, promax (4) blanks (.3) predict extrav openness conscient agreeable neurot sum extrav openness conscient agreeable neurot * Merge reciprocity from 2010 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bap.dta", keepusing(bap12401-bap12410) drop if _merge == 2 drop _merge tab1 bap12401 bap12402 bap12403 bap12404 bap12405 bap12406 bap12407 /// bap12408 bap12409 bap12410 replace bap12401 = . if bap12401 < 0 replace bap12402 = . if bap12402 < 0 replace bap12403 = . if bap12403 < 0 replace bap12404 = . if bap12404 < 0 replace bap12405 = . if bap12405 < 0 replace bap12406 = . if bap12406 < 0 replace bap12407 = . if bap12407 < 0 replace bap12408 = . if bap12408 < 0 replace bap12409 = . if bap12409 < 0 replace bap12410 = . if bap12410 < 0 factor bap12401 bap12402 bap12403 bap12404 bap12405 bap12406 bap12407 /// bap12408 bap12409 bap12410, ipf fac(2) rot, promax (4) blanks (.3) predict recipr_neg recipr_pos * Trust: tab1 bdp0301 bdp0302 bdp0303 replace bdp0301 = . if bdp0301 < 0 replace bdp0302 = . if bdp0302 < 0 replace bdp0303 = . if bdp0303 < 0 factor bdp0301 bdp0302 bdp0303, ipf fac(1) predict trust * Merge importance of life domains from 2012 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bcp.dta", keepusing(bcp0301 bcp0302 bcp0308) drop if _merge == 2 drop _merge tab1 bcp0301 bcp0302 bcp0308, miss rename bcp0301 low_financial rename bcp0302 low_altruism rename bcp0308 low_civic_virt replace low_financial = . if low_financial < 0 replace low_altruism = . if low_altruism < 0 replace low_civic_virt = . if low_civic_virt < 0 gen financial = . replace financial = 5 - low_financial if low_financial != . gen altruism = . replace altruism = 5 - low_altruism if low_altruism != . gen civic_virt = . replace civic_virt = 5 - low_civic_virt if low_civic_virt != . * Merge locus of control from 2010 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bap.dta", keepusing(bap0201-bap0210) drop if _merge == 2 drop _merge tab1 bap0201 bap0202 bap0203 bap0204 bap0205 bap0206 bap0207 bap0208 /// bap0209 bap0210, miss replace bap0201 = . if bap0201 < 0 replace bap0202 = . if bap0202 < 0 replace bap0203 = . if bap0203 < 0 replace bap0204 = . if bap0204 < 0 replace bap0205 = . if bap0205 < 0 replace bap0206 = . if bap0206 < 0 replace bap0207 = . if bap0207 < 0 replace bap0208 = . if bap0208 < 0 replace bap0209 = . if bap0209 < 0 replace bap0210 = . if bap0210 < 0 factor bap0201 bap0202 bap0203 bap0205 bap0206 /// bap0207 bap0208 bap0209 bap0210, ipf fac(1) predict low_loc sum low_loc gen loc = (-1) * low_loc sum loc /* * Voluntary activities: tab bdp1108, miss rename bdp1108 volunt_act_inv gen volunt_act = . replace volunt_act = 5 - volunt_act_inv if volunt_act_inv >= 1 & volunt_act_inv <= 5 tab volunt_act, miss */ * Merge voluntary activities from 2011 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bbp.dta", keepusing(bbp0307) drop if _merge == 2 drop _merge tab bbp0307, miss rename bbp0307 volunt_act_inv gen volunt_act = . replace volunt_act = 5 - volunt_act_inv if volunt_act_inv >= 1 & volunt_act_inv <= 4 tab volunt_act, miss * Merge helping behavior from 2011 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bbp.dta", keepusing(bbp0306) drop if _merge == 2 drop _merge tab bbp0306, miss rename bbp0306 helping_inv gen helping = . replace helping = 5 - helping_inv if helping_inv >= 1 & helping_inv <= 4 tab helping, miss * ABM-Maßnahme or 1 euro job: tab bdp50, miss rename bdp50 abm replace abm = 0 if abm == -2 | abm == 3 replace abm = . if abm == -1 tab abm, miss gen year = 2013 keep persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant order persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant save "`c(pwd)'\data_2013_p.dta", replace ****************************************************************************** * 2012: use "`c(pwd)'\bcp.dta", clear set more off d * Merge region (German state) from household file: set more off merge n:1 hhnrakt using "`c(pwd)'\bchbrutto.dta", keepusing(bcbula) drop if _merge == 2 drop _merge rename bcbula region tab region, miss * Gender: tab bcp12801, miss rename bcp12801 gender gen female = . replace female = 0 if gender == 1 replace female = 1 if gender == 2 tab female, miss * Age: tab bcp12803, miss rename bcp12803 year_birth replace year_birth = . if year_birth < 0 gen age = . replace age = 2012 - year_birth if year_birth != . sum age * Risk seeking: tab bcp148, miss rename bcp148 risk_seek replace risk_seek = . if risk_seek < 0 * Risk aversion: tab risk_seek, miss gen risk_avers = . replace risk_avers = 10 - risk_seek if risk_seek != . tab risk_seek risk_avers * Merge risk seeking with respect to the occupational career from 2009 dataset: set more off merge 1:1 persnr using "`c(pwd)'\zp.dta", keepusing(zp11804) drop if _merge == 2 drop _merge tab zp11804, miss rename zp11804 risk_seek_oc replace risk_seek_oc = . if risk_seek_oc < 0 * Risk aversion with respect to the occupational career: gen risk_av_oc = 10 - risk_seek_oc if risk_seek_oc != . tab risk_av_oc, miss * Merge Big Five personality traits from 2009 dataset: set more off merge 1:1 persnr using "`c(pwd)'\zp.dta", keepusing(zp12001-zp12015) drop if _merge == 2 drop _merge tab zp12001, miss rename zp12001 thoroughworker replace thoroughworker = . if thoroughworker < 0 tab zp12002, miss rename zp12002 communicative replace communicative = . if communicative < 0 tab zp12003, miss rename zp12003 coarse replace coarse = . if coarse < 0 tab zp12004, miss rename zp12004 original replace original = . if original < 0 tab zp12005, miss rename zp12005 worry replace worry = . if worry < 0 tab zp12006, miss rename zp12006 forgive replace forgive = . if forgive < 0 tab zp12007, miss rename zp12007 laziness replace laziness = . if laziness < 0 tab zp12008, miss rename zp12008 sociable replace sociable = . if sociable < 0 tab zp12009, miss rename zp12009 experiences replace experiences = . if experiences < 0 tab zp12010, miss rename zp12010 nervous replace nervous = . if nervous < 0 tab zp12011, miss rename zp12011 efficacy replace efficacy = . if efficacy < 0 tab zp12012, miss rename zp12012 reserved replace reserved = . if reserved < 0 tab zp12013, miss rename zp12013 courtesy replace courtesy = . if courtesy < 0 tab zp12014, miss rename zp12014 imagination replace imagination = . if imagination < 0 tab zp12015, miss rename zp12015 stress_resistant replace stress_resistant = . if stress_resistant < 0 tab1 thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant corr thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant factor thoroughworker communicative coarse original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination /// stress_resistant, ipf fac(5) rot, promax (4) blanks (.3) predict extrav openness conscient agreeable neurot sum extrav openness conscient agreeable neurot * Merge reciprocity from 2010 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bap.dta", keepusing(bap12401-bap12410) drop if _merge == 2 drop _merge tab1 bap12401 bap12402 bap12403 bap12404 bap12405 bap12406 bap12407 /// bap12408 bap12409 bap12410 replace bap12401 = . if bap12401 < 0 replace bap12402 = . if bap12402 < 0 replace bap12403 = . if bap12403 < 0 replace bap12404 = . if bap12404 < 0 replace bap12405 = . if bap12405 < 0 replace bap12406 = . if bap12406 < 0 replace bap12407 = . if bap12407 < 0 replace bap12408 = . if bap12408 < 0 replace bap12409 = . if bap12409 < 0 replace bap12410 = . if bap12410 < 0 factor bap12401 bap12402 bap12403 bap12404 bap12405 bap12406 bap12407 /// bap12408 bap12409 bap12410, ipf fac(2) rot, promax (4) blanks (.3) predict recipr_neg recipr_pos * Merge trust from 2008 dataset: set more off merge 1:1 persnr using "`c(pwd)'\yp.dta", keepusing(yp0301-yp0303) drop if _merge == 2 drop _merge tab1 yp0301 yp0302 yp0303 replace yp0301 = . if yp0301 < 0 replace yp0302 = . if yp0302 < 0 replace yp0303 = . if yp0303 < 0 factor yp0301 yp0302 yp0303, ipf fac(1) predict trust * Importance of life domains: tab1 bcp0301 bcp0302 bcp0308, miss rename bcp0301 low_financial rename bcp0302 low_altruism rename bcp0308 low_civic_virt replace low_financial = . if low_financial < 0 replace low_altruism = . if low_altruism < 0 replace low_civic_virt = . if low_civic_virt < 0 gen financial = . replace financial = 5 - low_financial if low_financial != . gen altruism = . replace altruism = 5 - low_altruism if low_altruism != . gen civic_virt = . replace civic_virt = 5 - low_civic_virt if low_civic_virt != . * Merge locus of control from 2010 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bap.dta", keepusing(bap0201-bap0210) drop if _merge == 2 drop _merge tab1 bap0201 bap0202 bap0203 bap0204 bap0205 bap0206 bap0207 bap0208 /// bap0209 bap0210, miss replace bap0201 = . if bap0201 < 0 replace bap0202 = . if bap0202 < 0 replace bap0203 = . if bap0203 < 0 replace bap0204 = . if bap0204 < 0 replace bap0205 = . if bap0205 < 0 replace bap0206 = . if bap0206 < 0 replace bap0207 = . if bap0207 < 0 replace bap0208 = . if bap0208 < 0 replace bap0209 = . if bap0209 < 0 replace bap0210 = . if bap0210 < 0 factor bap0201 bap0202 bap0203 bap0205 bap0206 /// bap0207 bap0208 bap0209 bap0210, ipf fac(1) predict low_loc sum low_loc gen loc = (-1) * low_loc sum loc * Merge voluntary activities from 2011 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bbp.dta", keepusing(bbp0307) drop if _merge == 2 drop _merge tab bbp0307, miss rename bbp0307 volunt_act_inv gen volunt_act = . replace volunt_act = 5 - volunt_act_inv if volunt_act_inv >= 1 & volunt_act_inv <= 4 tab volunt_act, miss * Merge helping behavior from 2011 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bbp.dta", keepusing(bbp0306) drop if _merge == 2 drop _merge tab bbp0306, miss rename bbp0306 helping_inv gen helping = . replace helping = 5 - helping_inv if helping_inv >= 1 & helping_inv <= 4 tab helping, miss * ABM-Maßnahme or 1 euro job: tab bcp39, miss rename bcp39 abm replace abm = 0 if abm == -2 | abm == 3 replace abm = 1 if abm == 2 replace abm = . if abm == -1 | abm == -6 tab abm, miss gen year = 2012 keep persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant order persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant save "`c(pwd)'\data_2012_p.dta", replace ****************************************************************************** * 2011: use "`c(pwd)'\bbp.dta", clear set more off d * Merge region (German state) from household file: set more off merge n:1 hhnrakt using "`c(pwd)'\bbhbrutto.dta", keepusing(bbbula) drop if _merge == 2 drop _merge rename bbbula region tab region, miss * Gender: tab bbp13201, miss rename bbp13201 gender gen female = . replace female = 0 if gender == 1 replace female = 1 if gender == 2 tab female, miss * Age: tab bbp13202, miss rename bbp13202 year_birth replace year_birth = . if year_birth < 0 gen age = . replace age = 2011 - year_birth if year_birth != . * Risk seeking: tab bbp121, miss rename bbp121 risk_seek replace risk_seek = . if risk_seek < 0 * Risk aversion: tab risk_seek, miss gen risk_avers = . replace risk_avers = 10 - risk_seek if risk_seek != . tab risk_seek risk_avers * Merge risk seeking with respect to the occupational career from 2009 dataset: set more off merge 1:1 persnr using "`c(pwd)'\zp.dta", keepusing(zp11804) drop if _merge == 2 drop _merge tab zp11804, miss rename zp11804 risk_seek_oc replace risk_seek_oc = . if risk_seek_oc < 0 * Risk aversion with respect to the occupational career: gen risk_av_oc = 10 - risk_seek_oc if risk_seek_oc != . tab risk_av_oc, miss * Merge Big Five personality traits from 2009 dataset: set more off merge 1:1 persnr using "`c(pwd)'\zp.dta", keepusing(zp12001-zp12015) drop if _merge == 2 drop _merge tab zp12001, miss rename zp12001 thoroughworker replace thoroughworker = . if thoroughworker < 0 tab zp12002, miss rename zp12002 communicative replace communicative = . if communicative < 0 tab zp12003, miss rename zp12003 coarse replace coarse = . if coarse < 0 tab zp12004, miss rename zp12004 original replace original = . if original < 0 tab zp12005, miss rename zp12005 worry replace worry = . if worry < 0 tab zp12006, miss rename zp12006 forgive replace forgive = . if forgive < 0 tab zp12007, miss rename zp12007 laziness replace laziness = . if laziness < 0 tab zp12008, miss rename zp12008 sociable replace sociable = . if sociable < 0 tab zp12009, miss rename zp12009 experiences replace experiences = . if experiences < 0 tab zp12010, miss rename zp12010 nervous replace nervous = . if nervous < 0 tab zp12011, miss rename zp12011 efficacy replace efficacy = . if efficacy < 0 tab zp12012, miss rename zp12012 reserved replace reserved = . if reserved < 0 tab zp12013, miss rename zp12013 courtesy replace courtesy = . if courtesy < 0 tab zp12014, miss rename zp12014 imagination replace imagination = . if imagination < 0 tab zp12015, miss rename zp12015 stress_resistant replace stress_resistant = . if stress_resistant < 0 tab1 thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant corr thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant factor thoroughworker communicative coarse original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination /// stress_resistant, ipf fac(5) rot, promax (4) blanks (.3) predict extrav openness conscient agreeable neurot sum extrav openness conscient agreeable neurot * Merge reciprocity from 2010 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bap.dta", keepusing(bap12401-bap12410) drop if _merge == 2 drop _merge tab1 bap12401 bap12402 bap12403 bap12404 bap12405 bap12406 bap12407 /// bap12408 bap12409 bap12410 replace bap12401 = . if bap12401 < 0 replace bap12402 = . if bap12402 < 0 replace bap12403 = . if bap12403 < 0 replace bap12404 = . if bap12404 < 0 replace bap12405 = . if bap12405 < 0 replace bap12406 = . if bap12406 < 0 replace bap12407 = . if bap12407 < 0 replace bap12408 = . if bap12408 < 0 replace bap12409 = . if bap12409 < 0 replace bap12410 = . if bap12410 < 0 factor bap12401 bap12402 bap12403 bap12404 bap12405 bap12406 bap12407 /// bap12408 bap12409 bap12410, ipf fac(2) rot, promax (4) blanks (.3) predict recipr_neg recipr_pos * Merge trust from 2008 dataset: set more off merge 1:1 persnr using "`c(pwd)'\yp.dta", keepusing(yp0301-yp0303) drop if _merge == 2 drop _merge tab1 yp0301 yp0302 yp0303 replace yp0301 = . if yp0301 < 0 replace yp0302 = . if yp0302 < 0 replace yp0303 = . if yp0303 < 0 factor yp0301 yp0302 yp0303, ipf fac(1) predict trust * Merge importance of life domains from 2010 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bap.dta", keepusing(f10p002a f10p002b f10p002h) drop if _merge == 2 drop _merge tab1 f10p002a f10p002b f10p002h, miss rename f10p002a low_financial rename f10p002b low_altruism rename f10p002h low_civic_virt replace low_financial = . if low_financial < 0 replace low_altruism = . if low_altruism < 0 replace low_civic_virt = . if low_civic_virt < 0 * Because of many missings in 2010, also merge importance of life domains * from 2008: set more off merge 1:1 persnr using "`c(pwd)'\yp.dta", keepusing(yp7801 yp7802 yp7808) drop if _merge == 2 drop _merge tab1 yp7801 yp7802 yp7808, miss rename yp7801 low_financial_08 rename yp7802 low_altruism_08 rename yp7808 low_civic_virt_08 replace low_financial_08 = . if low_financial_08 < 0 replace low_altruism_08 = . if low_altruism_08 < 0 replace low_civic_virt_08 = . if low_civic_virt_08 < 0 * Use information from 2008 if information from 2010 is unavailable: replace low_financial = low_financial_08 /// if low_financial == . & low_financial_08 != . replace low_altruism = low_altruism_08 /// if low_altruism == . & low_altruism_08 != . replace low_civic_virt = low_civic_virt_08 /// if low_civic_virt == . & low_civic_virt_08 != . gen financial = . replace financial = 5 - low_financial if low_financial != . gen altruism = . replace altruism = 5 - low_altruism if low_altruism != . gen civic_virt = . replace civic_virt = 5 - low_civic_virt if low_civic_virt != . * Merge locus of control from 2010 dataset: set more off merge 1:1 persnr using "`c(pwd)'\bap.dta", keepusing(bap0201-bap0210) drop if _merge == 2 drop _merge tab1 bap0201 bap0202 bap0203 bap0204 bap0205 bap0206 bap0207 bap0208 /// bap0209 bap0210, miss replace bap0201 = . if bap0201 < 0 replace bap0202 = . if bap0202 < 0 replace bap0203 = . if bap0203 < 0 replace bap0204 = . if bap0204 < 0 replace bap0205 = . if bap0205 < 0 replace bap0206 = . if bap0206 < 0 replace bap0207 = . if bap0207 < 0 replace bap0208 = . if bap0208 < 0 replace bap0209 = . if bap0209 < 0 replace bap0210 = . if bap0210 < 0 factor bap0201 bap0202 bap0203 bap0205 bap0206 /// bap0207 bap0208 bap0209 bap0210, ipf fac(1) predict low_loc sum low_loc gen loc = (-1) * low_loc sum loc * Voluntary activities: tab bbp0307, miss rename bbp0307 volunt_act_inv gen volunt_act = . replace volunt_act = 5 - volunt_act_inv if volunt_act_inv >= 1 & volunt_act_inv <= 4 tab volunt_act, miss * Helping behavior: tab bbp0306, miss rename bbp0306 helping_inv gen helping = . replace helping = 5 - helping_inv if helping_inv >= 1 & helping_inv <= 4 tab helping, miss * ABM-Maßnahme or 1 euro job: tab bbp41, miss rename bbp41 abm replace abm = 0 if abm == -2 | abm == 3 replace abm = 1 if abm == 2 replace abm = . if abm == -1 | abm == -6 tab abm, miss gen year = 2011 keep persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant order persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant save "`c(pwd)'\data_2011_p.dta", replace ****************************************************************************** * 2010: use "`c(pwd)'\bap.dta", clear set more off d * Merge region (German state) from household file: set more off merge n:1 hhnrakt using "`c(pwd)'\bahbrutto.dta", keepusing(babula) drop if _merge == 2 drop _merge rename babula region tab region, miss * Gender: tab bap15001, miss rename bap15001 gender gen female = . replace female = 0 if gender == 1 replace female = 1 if gender == 2 tab female, miss * Age: tab bap15002, miss rename bap15002 year_birth replace year_birth = . if year_birth < 0 gen age = . replace age = 2010 - year_birth if year_birth != . * Risk seeking: tab bap123, miss rename bap123 risk_seek replace risk_seek = . if risk_seek < 0 sum risk_seek * Risk aversion: tab risk_seek, miss gen risk_avers = . replace risk_avers = 10 - risk_seek if risk_seek != . tab risk_seek risk_avers * Merge risk seeking with respect to the occupational career from 2009 dataset: set more off merge 1:1 persnr using "`c(pwd)'\zp.dta", keepusing(zp11804) drop if _merge == 2 drop _merge tab zp11804, miss rename zp11804 risk_seek_oc replace risk_seek_oc = . if risk_seek_oc < 0 * Risk aversion with respect to the occupational career: gen risk_av_oc = 10 - risk_seek_oc if risk_seek_oc != . tab risk_av_oc, miss * Merge Big Five personality traits from 2009 dataset: set more off merge 1:1 persnr using "`c(pwd)'\zp.dta", keepusing(zp12001-zp12015) drop if _merge == 2 drop _merge tab zp12001, miss rename zp12001 thoroughworker replace thoroughworker = . if thoroughworker < 0 tab zp12002, miss rename zp12002 communicative replace communicative = . if communicative < 0 tab zp12003, miss rename zp12003 coarse replace coarse = . if coarse < 0 tab zp12004, miss rename zp12004 original replace original = . if original < 0 tab zp12005, miss rename zp12005 worry replace worry = . if worry < 0 tab zp12006, miss rename zp12006 forgive replace forgive = . if forgive < 0 tab zp12007, miss rename zp12007 laziness replace laziness = . if laziness < 0 tab zp12008, miss rename zp12008 sociable replace sociable = . if sociable < 0 tab zp12009, miss rename zp12009 experiences replace experiences = . if experiences < 0 tab zp12010, miss rename zp12010 nervous replace nervous = . if nervous < 0 tab zp12011, miss rename zp12011 efficacy replace efficacy = . if efficacy < 0 tab zp12012, miss rename zp12012 reserved replace reserved = . if reserved < 0 tab zp12013, miss rename zp12013 courtesy replace courtesy = . if courtesy < 0 tab zp12014, miss rename zp12014 imagination replace imagination = . if imagination < 0 tab zp12015, miss rename zp12015 stress_resistant replace stress_resistant = . if stress_resistant < 0 tab1 thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant corr thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant factor thoroughworker communicative coarse original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination /// stress_resistant, ipf fac(5) rot, promax (4) blanks (.3) predict extrav openness conscient agreeable neurot sum extrav openness conscient agreeable neurot * Reciprocity: tab1 bap12401 bap12402 bap12403 bap12404 bap12405 bap12406 bap12407 /// bap12408 bap12409 bap12410 replace bap12401 = . if bap12401 < 0 replace bap12402 = . if bap12402 < 0 replace bap12403 = . if bap12403 < 0 replace bap12404 = . if bap12404 < 0 replace bap12405 = . if bap12405 < 0 replace bap12406 = . if bap12406 < 0 replace bap12407 = . if bap12407 < 0 replace bap12408 = . if bap12408 < 0 replace bap12409 = . if bap12409 < 0 replace bap12410 = . if bap12410 < 0 factor bap12401 bap12402 bap12403 bap12404 bap12405 bap12406 bap12407 /// bap12408 bap12409 bap12410, ipf fac(2) rot, promax (4) blanks (.3) predict recipr_neg recipr_pos * Merge trust from 2008 dataset: set more off merge 1:1 persnr using "`c(pwd)'\yp.dta", keepusing(yp0301-yp0303) drop if _merge == 2 drop _merge tab1 yp0301 yp0302 yp0303 replace yp0301 = . if yp0301 < 0 replace yp0302 = . if yp0302 < 0 replace yp0303 = . if yp0303 < 0 factor yp0301 yp0302 yp0303, ipf fac(1) predict trust * Importance of life domains: tab1 f10p002a f10p002b f10p002h, miss rename f10p002a low_financial rename f10p002b low_altruism rename f10p002h low_civic_virt replace low_financial = . if low_financial < 0 replace low_altruism = . if low_altruism < 0 replace low_civic_virt = . if low_civic_virt < 0 * Because of many missings in 2010, also merge importance of life domains * from 2008: set more off merge 1:1 persnr using "`c(pwd)'\yp.dta", keepusing(yp7801 yp7802 yp7808) drop if _merge == 2 drop _merge tab1 yp7801 yp7802 yp7808, miss rename yp7801 low_financial_08 rename yp7802 low_altruism_08 rename yp7808 low_civic_virt_08 replace low_financial_08 = . if low_financial_08 < 0 replace low_altruism_08 = . if low_altruism_08 < 0 replace low_civic_virt_08 = . if low_civic_virt_08 < 0 * Use information from 2008 if information from 2010 is unavailable: replace low_financial = low_financial_08 /// if low_financial == . & low_financial_08 != . replace low_altruism = low_altruism_08 /// if low_altruism == . & low_altruism_08 != . replace low_civic_virt = low_civic_virt_08 /// if low_civic_virt == . & low_civic_virt_08 != . gen financial = . replace financial = 5 - low_financial if low_financial != . gen altruism = . replace altruism = 5 - low_altruism if low_altruism != . gen civic_virt = . replace civic_virt = 5 - low_civic_virt if low_civic_virt != . * Locus of control: tab1 bap0201 bap0202 bap0203 bap0204 bap0205 bap0206 bap0207 bap0208 /// bap0209 bap0210, miss replace bap0201 = . if bap0201 < 0 replace bap0202 = . if bap0202 < 0 replace bap0203 = . if bap0203 < 0 replace bap0204 = . if bap0204 < 0 replace bap0205 = . if bap0205 < 0 replace bap0206 = . if bap0206 < 0 replace bap0207 = . if bap0207 < 0 replace bap0208 = . if bap0208 < 0 replace bap0209 = . if bap0209 < 0 replace bap0210 = . if bap0210 < 0 factor bap0201 bap0202 bap0203 bap0205 bap0206 /// bap0207 bap0208 bap0209 bap0210, ipf fac(1) predict low_loc sum low_loc gen loc = (-1) * low_loc sum loc * Merge voluntary activities from 2009 dataset: set more off merge 1:1 persnr using "`c(pwd)'\zp.dta", keepusing(zp0307) drop if _merge == 2 drop _merge tab zp0307, miss rename zp0307 volunt_act_inv gen volunt_act = . replace volunt_act = 5 - volunt_act_inv if volunt_act_inv >= 1 & volunt_act_inv <= 4 tab volunt_act, miss * Merge helping behavior from 2009 dataset: set more off merge 1:1 persnr using "`c(pwd)'\zp.dta", keepusing(zp0306) drop if _merge == 2 drop _merge tab zp0306, miss rename zp0306 helping_inv gen helping = . replace helping = 5 - helping_inv if helping_inv >= 1 & helping_inv <= 4 tab helping, miss * ABM-Maßnahme or 1 euro job: tab bap37, miss rename bap37 abm replace abm = 0 if abm == -2 | abm == 3 replace abm = 1 if abm == 2 replace abm = . if abm == -1 tab abm, miss gen year = 2010 keep persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant order persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant save "`c(pwd)'\data_2010_p.dta", replace ****************************************************************************** * 2009: use "`c(pwd)'\zp.dta", clear set more off d * Merge region (German state) from household file: set more off merge n:1 hhnrakt using "`c(pwd)'\zhbrutto.dta", keepusing(zbula) drop if _merge == 2 drop _merge rename zbula region tab region, miss * Gender: tab zp12901, miss rename zp12901 gender gen female = . replace female = 0 if gender == 1 replace female = 1 if gender == 2 tab female, miss * Age: tab zp12902, miss rename zp12902 year_birth replace year_birth = . if year_birth < 0 gen age = . replace age = 2009 - year_birth if year_birth != . * Risk seeking: tab zp121, miss rename zp121 risk_seek replace risk_seek = . if risk_seek < 0 sum risk_seek * Risk aversion: tab risk_seek, miss gen risk_avers = . replace risk_avers = 10 - risk_seek if risk_seek != . tab risk_seek risk_avers * Risk seeking with respect to the occupational career: tab zp11804, miss rename zp11804 risk_seek_oc replace risk_seek_oc = . if risk_seek_oc < 0 * Risk aversion with respect to the occupational career: gen risk_av_oc = 10 - risk_seek_oc if risk_seek_oc != . tab risk_av_oc, miss * Big Five personality traits: tab zp12001, miss rename zp12001 thoroughworker replace thoroughworker = . if thoroughworker < 0 tab zp12002, miss rename zp12002 communicative replace communicative = . if communicative < 0 tab zp12003, miss rename zp12003 coarse replace coarse = . if coarse < 0 tab zp12004, miss rename zp12004 original replace original = . if original < 0 tab zp12005, miss rename zp12005 worry replace worry = . if worry < 0 tab zp12006, miss rename zp12006 forgive replace forgive = . if forgive < 0 tab zp12007, miss rename zp12007 laziness replace laziness = . if laziness < 0 tab zp12008, miss rename zp12008 sociable replace sociable = . if sociable < 0 tab zp12009, miss rename zp12009 experiences replace experiences = . if experiences < 0 tab zp12010, miss rename zp12010 nervous replace nervous = . if nervous < 0 tab zp12011, miss rename zp12011 efficacy replace efficacy = . if efficacy < 0 tab zp12012, miss rename zp12012 reserved replace reserved = . if reserved < 0 tab zp12013, miss rename zp12013 courtesy replace courtesy = . if courtesy < 0 tab zp12014, miss rename zp12014 imagination replace imagination = . if imagination < 0 tab zp12015, miss rename zp12015 stress_resistant replace stress_resistant = . if stress_resistant < 0 tab1 thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant corr thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant factor thoroughworker communicative coarse original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination /// stress_resistant, ipf fac(5) rot, promax (4) blanks (.3) predict extrav openness conscient agreeable neurot sum extrav openness conscient agreeable neurot * Merge reciprocity from 2005 dataset: set more off merge 1:1 persnr using "`c(pwd)'\vp.dta", keepusing(vp12601-vp12606) drop if _merge == 2 drop _merge tab1 vp12601 vp12602 vp12603 vp12604 vp12605 vp12606 replace vp12601 = . if vp12601 < 0 replace vp12602 = . if vp12602 < 0 replace vp12603 = . if vp12603 < 0 replace vp12604 = . if vp12604 < 0 replace vp12605 = . if vp12605 < 0 replace vp12606 = . if vp12606 < 0 factor vp12601 vp12602 vp12603 vp12604 vp12605 vp12606, ipf fac(2) rot, promax (4) blanks (.3) predict recipr_neg recipr_pos * Merge trust from 2008 dataset: set more off merge 1:1 persnr using "`c(pwd)'\yp.dta", keepusing(yp0301-yp0303) drop if _merge == 2 drop _merge tab1 yp0301 yp0302 yp0303 replace yp0301 = . if yp0301 < 0 replace yp0302 = . if yp0302 < 0 replace yp0303 = . if yp0303 < 0 factor yp0301 yp0302 yp0303, ipf fac(1) predict trust * Merge importance of life domains from 2008 dataset: set more off merge 1:1 persnr using "`c(pwd)'\yp.dta", keepusing(yp7801 yp7802 yp7808) drop if _merge == 2 drop _merge tab1 yp7801 yp7802 yp7808, miss rename yp7801 low_financial rename yp7802 low_altruism rename yp7808 low_civic_virt replace low_financial = . if low_financial < 0 replace low_altruism = . if low_altruism < 0 replace low_civic_virt = . if low_civic_virt < 0 gen financial = . replace financial = 5 - low_financial if low_financial != . gen altruism = . replace altruism = 5 - low_altruism if low_altruism != . gen civic_virt = . replace civic_virt = 5 - low_civic_virt if low_civic_virt != . * Merge locus of control from 2005 dataset: set more off merge 1:1 persnr using "`c(pwd)'\vp.dta", keepusing(vp12701-vp12710) drop if _merge == 2 drop _merge tab1 vp12701 vp12702 vp12703 vp12704 vp12705 vp12706 vp12707 vp12708 /// vp12709 vp12710, miss replace vp12701 = . if vp12701 < 0 replace vp12702 = . if vp12702 < 0 replace vp12703 = . if vp12703 < 0 replace vp12704 = . if vp12704 < 0 replace vp12705 = . if vp12705 < 0 replace vp12706 = . if vp12706 < 0 replace vp12707 = . if vp12707 < 0 replace vp12708 = . if vp12708 < 0 replace vp12709 = . if vp12709 < 0 replace vp12710 = . if vp12710 < 0 factor vp12701 vp12702 vp12703 vp12705 vp12706 /// vp12707 vp12708 vp12709 vp12710, ipf fac(1) predict low_loc sum low_loc gen loc = (-1) * low_loc sum loc * Voluntary activities: tab zp0307, miss rename zp0307 volunt_act_inv gen volunt_act = . replace volunt_act = 5 - volunt_act_inv if volunt_act_inv >= 1 & volunt_act_inv <= 4 tab volunt_act, miss * Helping behavior: tab zp0306, miss rename zp0306 helping_inv gen helping = . replace helping = 5 - helping_inv if helping_inv >= 1 & helping_inv <= 4 tab helping, miss * ABM-Maßnahme or 1 euro job: tab zp41, miss rename zp41 abm replace abm = 0 if abm == -2 | abm == 3 replace abm = 1 if abm == 2 replace abm = . if abm == -1 tab abm, miss gen year = 2009 keep persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant order persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant save "`c(pwd)'\data_2009_p.dta", replace ****************************************************************************** * 2008: use "`c(pwd)'\yp.dta", clear set more off d * Merge region (German state) from household file: set more off merge n:1 hhnrakt using "`c(pwd)'\yhbrutto.dta", keepusing(ybula) drop if _merge == 2 drop _merge rename ybula region tab region, miss * Gender: tab yp14801, miss rename yp14801 gender gen female = . replace female = 0 if gender == 1 replace female = 1 if gender == 2 tab female, miss * Age: tab yp14802, miss rename yp14802 year_birth replace year_birth = . if year_birth < 0 gen age = . replace age = 2008 - year_birth if year_birth != . * Risk seeking: tab yp10, miss rename yp10 risk_seek replace risk_seek = . if risk_seek < 0 sum risk_seek * Risk aversion: tab risk_seek, miss gen risk_avers = . replace risk_avers = 10 - risk_seek if risk_seek != . tab risk_seek risk_avers * Merge risk seeking with respect to the occupational career from 2004 dataset: set more off merge 1:1 persnr using "`c(pwd)'\up.dta", keepusing(up12004) drop if _merge == 2 drop _merge tab up12004, miss rename up12004 risk_seek_oc replace risk_seek_oc = . if risk_seek_oc < 0 * Risk aversion with respect to the occupational career: gen risk_av_oc = 10 - risk_seek_oc if risk_seek_oc != . tab risk_av_oc, miss * Merge Big Five personality traits from 2005 dataset: set more off merge 1:1 persnr using "`c(pwd)'\vp.dta", keepusing(vp12501-vp12515) drop if _merge == 2 drop _merge tab vp12501, miss rename vp12501 thoroughworker replace thoroughworker = . if thoroughworker < 0 tab vp12502, miss rename vp12502 communicative replace communicative = . if communicative < 0 tab vp12503, miss rename vp12503 coarse replace coarse = . if coarse < 0 tab vp12504, miss rename vp12504 original replace original = . if original < 0 tab vp12505, miss rename vp12505 worry replace worry = . if worry < 0 tab vp12506, miss rename vp12506 forgive replace forgive = . if forgive < 0 tab vp12507, miss rename vp12507 laziness replace laziness = . if laziness < 0 tab vp12508, miss rename vp12508 sociable replace sociable = . if sociable < 0 tab vp12509, miss rename vp12509 experiences replace experiences = . if experiences < 0 tab vp12510, miss rename vp12510 nervous replace nervous = . if nervous < 0 tab vp12511, miss rename vp12511 efficacy replace efficacy = . if efficacy < 0 tab vp12512, miss rename vp12512 reserved replace reserved = . if reserved < 0 tab vp12513, miss rename vp12513 courtesy replace courtesy = . if courtesy < 0 tab vp12514, miss rename vp12514 imagination replace imagination = . if imagination < 0 tab vp12515, miss rename vp12515 stress_resistant replace stress_resistant = . if stress_resistant < 0 tab1 thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant corr thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant factor thoroughworker communicative coarse original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination /// stress_resistant, ipf fac(5) rot, promax (4) blanks (.3) predict extrav openness conscient agreeable neurot sum extrav openness conscient agreeable neurot * Merge reciprocity from 2005 dataset: set more off merge 1:1 persnr using "`c(pwd)'\vp.dta", keepusing(vp12601-vp12606) drop if _merge == 2 drop _merge tab1 vp12601 vp12602 vp12603 vp12604 vp12605 vp12606 replace vp12601 = . if vp12601 < 0 replace vp12602 = . if vp12602 < 0 replace vp12603 = . if vp12603 < 0 replace vp12604 = . if vp12604 < 0 replace vp12605 = . if vp12605 < 0 replace vp12606 = . if vp12606 < 0 factor vp12601 vp12602 vp12603 vp12604 vp12605 vp12606, ipf fac(2) rot, promax (4) blanks (.3) predict recipr_neg recipr_pos * Trust: tab1 yp0301 yp0302 yp0303 yp04 yp05 replace yp0301 = . if yp0301 < 0 replace yp0302 = . if yp0302 < 0 replace yp0303 = . if yp0303 < 0 replace yp04 = . if yp04 < 0 replace yp05 = . if yp05 < 0 factor yp0301 yp0302 yp0303 yp04 yp05, ipf fac(1) predict trust * Importance of life domains: tab1 yp7801 yp7802 yp7808, miss rename yp7801 low_financial rename yp7802 low_altruism rename yp7808 low_civic_virt replace low_financial = . if low_financial < 0 replace low_altruism = . if low_altruism < 0 replace low_civic_virt = . if low_civic_virt < 0 gen financial = . replace financial = 5 - low_financial if low_financial != . gen altruism = . replace altruism = 5 - low_altruism if low_altruism != . gen civic_virt = . replace civic_virt = 5 - low_civic_virt if low_civic_virt != . * Merge locus of control from 2005 dataset: set more off merge 1:1 persnr using "`c(pwd)'\vp.dta", keepusing(vp12701-vp12710) drop if _merge == 2 drop _merge tab1 vp12701 vp12702 vp12703 vp12704 vp12705 vp12706 vp12707 vp12708 /// vp12709 vp12710, miss replace vp12701 = . if vp12701 < 0 replace vp12702 = . if vp12702 < 0 replace vp12703 = . if vp12703 < 0 replace vp12704 = . if vp12704 < 0 replace vp12705 = . if vp12705 < 0 replace vp12706 = . if vp12706 < 0 replace vp12707 = . if vp12707 < 0 replace vp12708 = . if vp12708 < 0 replace vp12709 = . if vp12709 < 0 replace vp12710 = . if vp12710 < 0 factor vp12701 vp12702 vp12703 vp12705 vp12706 /// vp12707 vp12708 vp12709 vp12710, ipf fac(1) predict low_loc sum low_loc gen loc = (-1) * low_loc sum loc * Voluntary activities: tab yp1807, miss * Now again with the option "every day" (as in 2013). * To remain consistent, we better take the variable from the previous year: * Merge voluntary activities from 2007 dataset: set more off merge 1:1 persnr using "`c(pwd)'\xp.dta", keepusing(xp0307) drop if _merge == 2 drop _merge tab xp0307, miss rename xp0307 volunt_act_inv gen volunt_act = . replace volunt_act = 5 - volunt_act_inv if volunt_act_inv >= 1 & volunt_act_inv <= 4 tab volunt_act, miss * From 0 to 3 (never; less frequently; every month; every week) * Merge helping behavior from 2007 dataset: set more off merge 1:1 persnr using "`c(pwd)'\xp.dta", keepusing(xp0306) drop if _merge == 2 drop _merge tab xp0306, miss rename xp0306 helping_inv gen helping = . replace helping = 5 - helping_inv if helping_inv >= 1 & helping_inv <= 4 tab helping, miss * ABM-Maßnahme or 1 euro job: tab yp45, miss rename yp45 abm replace abm = 0 if abm == -2 | abm == 3 replace abm = 1 if abm == 2 replace abm = . if abm == -1 tab abm, miss gen year = 2008 keep persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant order persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant save "`c(pwd)'\data_2008_p.dta", replace ****************************************************************************** * 2007: use "`c(pwd)'\xp.dta", clear set more off d * Merge region (German state) from household file: set more off merge n:1 hhnrakt using "`c(pwd)'\xhbrutto.dta", keepusing(xbula) drop if _merge == 2 drop _merge rename xbula region tab region, miss * Gender: tab xp13101, miss rename xp13101 gender gen female = . replace female = 0 if gender == 1 replace female = 1 if gender == 2 tab female, miss * Age: tab xp13102, miss rename xp13102 year_birth replace year_birth = . if year_birth < 0 gen age = . replace age = 2007 - year_birth if year_birth != . * Merge risk seeking from 2006 dataset: set more off merge 1:1 persnr using "`c(pwd)'\wp.dta", keepusing(wp123) drop if _merge == 2 drop _merge tab wp123, miss rename wp123 risk_seek replace risk_seek = . if risk_seek < 0 sum risk_seek * Risk aversion: tab risk_seek, miss gen risk_avers = . replace risk_avers = 10 - risk_seek if risk_seek != . tab risk_seek risk_avers * Merge risk seeking with respect to the occupational career from 2004 dataset: set more off merge 1:1 persnr using "`c(pwd)'\up.dta", keepusing(up12004) drop if _merge == 2 drop _merge tab up12004, miss rename up12004 risk_seek_oc replace risk_seek_oc = . if risk_seek_oc < 0 * Risk aversion with respect to the occupational career: gen risk_av_oc = 10 - risk_seek_oc if risk_seek_oc != . tab risk_av_oc, miss * Merge Big Five personality traits from 2005 dataset: set more off merge 1:1 persnr using "`c(pwd)'\vp.dta", keepusing(vp12501-vp12515) drop if _merge == 2 drop _merge tab vp12501, miss rename vp12501 thoroughworker replace thoroughworker = . if thoroughworker < 0 tab vp12502, miss rename vp12502 communicative replace communicative = . if communicative < 0 tab vp12503, miss rename vp12503 coarse replace coarse = . if coarse < 0 tab vp12504, miss rename vp12504 original replace original = . if original < 0 tab vp12505, miss rename vp12505 worry replace worry = . if worry < 0 tab vp12506, miss rename vp12506 forgive replace forgive = . if forgive < 0 tab vp12507, miss rename vp12507 laziness replace laziness = . if laziness < 0 tab vp12508, miss rename vp12508 sociable replace sociable = . if sociable < 0 tab vp12509, miss rename vp12509 experiences replace experiences = . if experiences < 0 tab vp12510, miss rename vp12510 nervous replace nervous = . if nervous < 0 tab vp12511, miss rename vp12511 efficacy replace efficacy = . if efficacy < 0 tab vp12512, miss rename vp12512 reserved replace reserved = . if reserved < 0 tab vp12513, miss rename vp12513 courtesy replace courtesy = . if courtesy < 0 tab vp12514, miss rename vp12514 imagination replace imagination = . if imagination < 0 tab vp12515, miss rename vp12515 stress_resistant replace stress_resistant = . if stress_resistant < 0 tab1 thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant corr thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant factor thoroughworker communicative coarse original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination /// stress_resistant, ipf fac(5) rot, promax (4) blanks (.3) predict extrav openness conscient agreeable neurot sum extrav openness conscient agreeable neurot * Merge reciprocity from 2005 dataset: set more off merge 1:1 persnr using "`c(pwd)'\vp.dta", keepusing(vp12601-vp12606) drop if _merge == 2 drop _merge tab1 vp12601 vp12602 vp12603 vp12604 vp12605 vp12606 replace vp12601 = . if vp12601 < 0 replace vp12602 = . if vp12602 < 0 replace vp12603 = . if vp12603 < 0 replace vp12604 = . if vp12604 < 0 replace vp12605 = . if vp12605 < 0 replace vp12606 = . if vp12606 < 0 factor vp12601 vp12602 vp12603 vp12604 vp12605 vp12606, ipf fac(2) rot, promax (4) blanks (.3) predict recipr_neg recipr_pos * Merge trust from 2003 dataset: set more off merge 1:1 persnr using "`c(pwd)'\tp.dta", keepusing(tp0301-tp0303) drop if _merge == 2 drop _merge tab1 tp0301 tp0302 tp0303 replace tp0301 = . if tp0301 < 0 replace tp0302 = . if tp0302 < 0 replace tp0303 = . if tp0303 < 0 factor tp0301 tp0302 tp0303, ipf fac(1) predict trust * Merge importance of life domains from 2004 dataset: set more off merge 1:1 persnr using "`c(pwd)'\up.dta", keepusing(up0601 up0602 up0608) drop if _merge == 2 drop _merge tab1 up0601 up0602 up0608, miss rename up0601 low_financial rename up0602 low_altruism rename up0608 low_civic_virt replace low_financial = . if low_financial < 0 replace low_altruism = . if low_altruism < 0 replace low_civic_virt = . if low_civic_virt < 0 gen financial = . replace financial = 5 - low_financial if low_financial != . gen altruism = . replace altruism = 5 - low_altruism if low_altruism != . gen civic_virt = . replace civic_virt = 5 - low_civic_virt if low_civic_virt != . * Merge locus of control from 2005 dataset: set more off merge 1:1 persnr using "`c(pwd)'\vp.dta", keepusing(vp12701-vp12710) drop if _merge == 2 drop _merge tab1 vp12701 vp12702 vp12703 vp12704 vp12705 vp12706 vp12707 vp12708 /// vp12709 vp12710, miss replace vp12701 = . if vp12701 < 0 replace vp12702 = . if vp12702 < 0 replace vp12703 = . if vp12703 < 0 replace vp12704 = . if vp12704 < 0 replace vp12705 = . if vp12705 < 0 replace vp12706 = . if vp12706 < 0 replace vp12707 = . if vp12707 < 0 replace vp12708 = . if vp12708 < 0 replace vp12709 = . if vp12709 < 0 replace vp12710 = . if vp12710 < 0 factor vp12701 vp12702 vp12703 vp12705 vp12706 /// vp12707 vp12708 vp12709 vp12710, ipf fac(1) predict low_loc sum low_loc gen loc = (-1) * low_loc sum loc * Voluntary activities: tab xp0307, miss rename xp0307 volunt_act_inv gen volunt_act = . replace volunt_act = 5 - volunt_act_inv if volunt_act_inv >= 1 & volunt_act_inv <= 4 tab volunt_act, miss * Helping behavior: tab xp0306, miss rename xp0306 helping_inv gen helping = . replace helping = 5 - helping_inv if helping_inv >= 1 & helping_inv <= 4 tab helping, miss * ABM-Maßnahme or 1 euro job: tab xp46, miss rename xp46 abm replace abm = 0 if abm == -2 | abm == 3 replace abm = 1 if abm == 2 replace abm = . if abm == -1 tab abm, miss gen year = 2007 keep persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant order persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant save "`c(pwd)'\data_2007_p.dta", replace ****************************************************************************** * 2006: use "`c(pwd)'\wp.dta", clear set more off d * Merge region (German state) from household file: set more off merge n:1 hhnrakt using "`c(pwd)'\whbrutto.dta", keepusing(wbula) drop if _merge == 2 drop _merge rename wbula region tab region, miss * Gender: tab wp12401, miss rename wp12401 gender gen female = . replace female = 0 if gender == 1 replace female = 1 if gender == 2 tab female, miss * Age: tab wp12402, miss rename wp12402 year_birth replace year_birth = . if year_birth < 0 gen age = . replace age = 2006 - year_birth if year_birth != . * Risk seeking: tab wp123, miss rename wp123 risk_seek replace risk_seek = . if risk_seek < 0 sum risk_seek * Risk aversion: tab risk_seek, miss gen risk_avers = . replace risk_avers = 10 - risk_seek if risk_seek != . tab risk_seek risk_avers * Merge risk seeking with respect to the occupational career from 2004 dataset: set more off merge 1:1 persnr using "`c(pwd)'\up.dta", keepusing(up12004) drop if _merge == 2 drop _merge tab up12004, miss rename up12004 risk_seek_oc replace risk_seek_oc = . if risk_seek_oc < 0 * Risk aversion with respect to the occupational career: gen risk_av_oc = 10 - risk_seek_oc if risk_seek_oc != . tab risk_av_oc, miss * Merge Big Five personality traits from 2005 dataset: set more off merge 1:1 persnr using "`c(pwd)'\vp.dta", keepusing(vp12501-vp12515) drop if _merge == 2 drop _merge tab vp12501, miss rename vp12501 thoroughworker replace thoroughworker = . if thoroughworker < 0 tab vp12502, miss rename vp12502 communicative replace communicative = . if communicative < 0 tab vp12503, miss rename vp12503 coarse replace coarse = . if coarse < 0 tab vp12504, miss rename vp12504 original replace original = . if original < 0 tab vp12505, miss rename vp12505 worry replace worry = . if worry < 0 tab vp12506, miss rename vp12506 forgive replace forgive = . if forgive < 0 tab vp12507, miss rename vp12507 laziness replace laziness = . if laziness < 0 tab vp12508, miss rename vp12508 sociable replace sociable = . if sociable < 0 tab vp12509, miss rename vp12509 experiences replace experiences = . if experiences < 0 tab vp12510, miss rename vp12510 nervous replace nervous = . if nervous < 0 tab vp12511, miss rename vp12511 efficacy replace efficacy = . if efficacy < 0 tab vp12512, miss rename vp12512 reserved replace reserved = . if reserved < 0 tab vp12513, miss rename vp12513 courtesy replace courtesy = . if courtesy < 0 tab vp12514, miss rename vp12514 imagination replace imagination = . if imagination < 0 tab vp12515, miss rename vp12515 stress_resistant replace stress_resistant = . if stress_resistant < 0 tab1 thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant corr thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant factor thoroughworker communicative coarse original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination /// stress_resistant, ipf fac(5) rot, promax (4) blanks (.3) predict extrav openness conscient agreeable neurot sum extrav openness conscient agreeable neurot * Merge reciprocity from 2005 dataset: set more off merge 1:1 persnr using "`c(pwd)'\vp.dta", keepusing(vp12601-vp12606) drop if _merge == 2 drop _merge tab1 vp12601 vp12602 vp12603 vp12604 vp12605 vp12606 replace vp12601 = . if vp12601 < 0 replace vp12602 = . if vp12602 < 0 replace vp12603 = . if vp12603 < 0 replace vp12604 = . if vp12604 < 0 replace vp12605 = . if vp12605 < 0 replace vp12606 = . if vp12606 < 0 factor vp12601 vp12602 vp12603 vp12604 vp12605 vp12606, ipf fac(2) rot, promax (4) blanks (.3) predict recipr_neg recipr_pos * Merge trust from 2003 dataset: set more off merge 1:1 persnr using "`c(pwd)'\tp.dta", keepusing(tp0301-tp0303) drop if _merge == 2 drop _merge tab1 tp0301 tp0302 tp0303 replace tp0301 = . if tp0301 < 0 replace tp0302 = . if tp0302 < 0 replace tp0303 = . if tp0303 < 0 factor tp0301 tp0302 tp0303, ipf fac(1) predict trust * Merge importance of life domains from 2004 dataset: set more off merge 1:1 persnr using "`c(pwd)'\up.dta", keepusing(up0601 up0602 up0608) drop if _merge == 2 drop _merge tab1 up0601 up0602 up0608, miss rename up0601 low_financial rename up0602 low_altruism rename up0608 low_civic_virt replace low_financial = . if low_financial < 0 replace low_altruism = . if low_altruism < 0 replace low_civic_virt = . if low_civic_virt < 0 gen financial = . replace financial = 5 - low_financial if low_financial != . gen altruism = . replace altruism = 5 - low_altruism if low_altruism != . gen civic_virt = . replace civic_virt = 5 - low_civic_virt if low_civic_virt != . * Merge locus of control from 2005 dataset: set more off merge 1:1 persnr using "`c(pwd)'\vp.dta", keepusing(vp12701-vp12710) drop if _merge == 2 drop _merge tab1 vp12701 vp12702 vp12703 vp12704 vp12705 vp12706 vp12707 vp12708 /// vp12709 vp12710, miss replace vp12701 = . if vp12701 < 0 replace vp12702 = . if vp12702 < 0 replace vp12703 = . if vp12703 < 0 replace vp12704 = . if vp12704 < 0 replace vp12705 = . if vp12705 < 0 replace vp12706 = . if vp12706 < 0 replace vp12707 = . if vp12707 < 0 replace vp12708 = . if vp12708 < 0 replace vp12709 = . if vp12709 < 0 replace vp12710 = . if vp12710 < 0 factor vp12701 vp12702 vp12703 vp12705 vp12706 /// vp12707 vp12708 vp12709 vp12710, ipf fac(1) predict low_loc sum low_loc gen loc = (-1) * low_loc sum loc * Merge voluntary activities from 2005 dataset: set more off merge 1:1 persnr using "`c(pwd)'\vp.dta", keepusing(vp0307) drop if _merge == 2 drop _merge tab vp0307, miss rename vp0307 volunt_act_inv gen volunt_act = . replace volunt_act = 5 - volunt_act_inv if volunt_act_inv >= 1 & volunt_act_inv <= 4 tab volunt_act, miss * Merge helping behavior from 2005 dataset: set more off merge 1:1 persnr using "`c(pwd)'\vp.dta", keepusing(vp0306) drop if _merge == 2 drop _merge tab vp0306, miss rename vp0306 helping_inv gen helping = . replace helping = 5 - helping_inv if helping_inv >= 1 & helping_inv <= 4 tab helping, miss * ABM-Maßnahme or 1 euro job: tab wp35, miss rename wp35 abm replace abm = 0 if abm == -2 | abm == 3 replace abm = 1 if abm == 2 replace abm = . if abm == -1 tab abm, miss gen year = 2006 keep persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant order persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant save "`c(pwd)'\data_2006_p.dta", replace ****************************************************************************** * 2005: use "`c(pwd)'\vp.dta", clear set more off d * Merge region (German state) from household file: set more off merge n:1 hhnrakt using "`c(pwd)'\vhbrutto.dta", keepusing(vbula) drop if _merge == 2 drop _merge rename vbula region tab region, miss * Gender: tab vp14701, miss rename vp14701 gender gen female = . replace female = 0 if gender == 1 replace female = 1 if gender == 2 tab female, miss * Age: tab vp14702, miss rename vp14702 year_birth replace year_birth = . if year_birth < 0 gen age = . replace age = 2005 - year_birth if year_birth != . * Merge risk seeking from 2004 dataset: set more off merge 1:1 persnr using "`c(pwd)'\up.dta", keepusing(up119) drop if _merge == 2 drop _merge tab up119, miss rename up119 risk_seek replace risk_seek = . if risk_seek < 0 sum risk_seek * Risk aversion: tab risk_seek, miss gen risk_avers = . replace risk_avers = 10 - risk_seek if risk_seek != . tab risk_seek risk_avers * Merge risk seeking with respect to the occupational career from 2004 dataset: set more off merge 1:1 persnr using "`c(pwd)'\up.dta", keepusing(up12004) drop if _merge == 2 drop _merge tab up12004, miss rename up12004 risk_seek_oc replace risk_seek_oc = . if risk_seek_oc < 0 * Risk aversion with respect to the occupational career: gen risk_av_oc = 10 - risk_seek_oc if risk_seek_oc != . tab risk_av_oc, miss * Big Five personality traits: tab vp12501, miss rename vp12501 thoroughworker replace thoroughworker = . if thoroughworker < 0 tab vp12502, miss rename vp12502 communicative replace communicative = . if communicative < 0 tab vp12503, miss rename vp12503 coarse replace coarse = . if coarse < 0 tab vp12504, miss rename vp12504 original replace original = . if original < 0 tab vp12505, miss rename vp12505 worry replace worry = . if worry < 0 tab vp12506, miss rename vp12506 forgive replace forgive = . if forgive < 0 tab vp12507, miss rename vp12507 laziness replace laziness = . if laziness < 0 tab vp12508, miss rename vp12508 sociable replace sociable = . if sociable < 0 tab vp12509, miss rename vp12509 experiences replace experiences = . if experiences < 0 tab vp12510, miss rename vp12510 nervous replace nervous = . if nervous < 0 tab vp12511, miss rename vp12511 efficacy replace efficacy = . if efficacy < 0 tab vp12512, miss rename vp12512 reserved replace reserved = . if reserved < 0 tab vp12513, miss rename vp12513 courtesy replace courtesy = . if courtesy < 0 tab vp12514, miss rename vp12514 imagination replace imagination = . if imagination < 0 tab vp12515, miss rename vp12515 stress_resistant replace stress_resistant = . if stress_resistant < 0 tab1 thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant corr thoroughworker communicative original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination stress_resistant factor thoroughworker communicative coarse original worry forgive laziness /// sociable experiences nervous efficacy reserved courtesy imagination /// stress_resistant, ipf fac(5) rot, promax (4) blanks (.3) predict extrav openness conscient agreeable neurot sum extrav openness conscient agreeable neurot * Reciprocity: tab1 vp12601 vp12602 vp12603 vp12604 vp12605 vp12606 replace vp12601 = . if vp12601 < 0 replace vp12602 = . if vp12602 < 0 replace vp12603 = . if vp12603 < 0 replace vp12604 = . if vp12604 < 0 replace vp12605 = . if vp12605 < 0 replace vp12606 = . if vp12606 < 0 factor vp12601 vp12602 vp12603 vp12604 vp12605 vp12606, ipf fac(2) rot, promax (4) blanks (.3) predict recipr_neg recipr_pos * Merge trust from 2003 dataset: set more off merge 1:1 persnr using "`c(pwd)'\tp.dta", keepusing(tp0301-tp0303) drop if _merge == 2 drop _merge tab1 tp0301 tp0302 tp0303 replace tp0301 = . if tp0301 < 0 replace tp0302 = . if tp0302 < 0 replace tp0303 = . if tp0303 < 0 factor tp0301 tp0302 tp0303, ipf fac(1) predict trust * Merge importance of life domains from 2004 dataset: set more off merge 1:1 persnr using "`c(pwd)'\up.dta", keepusing(up0601 up0602 up0608) drop if _merge == 2 drop _merge tab1 up0601 up0602 up0608, miss rename up0601 low_financial rename up0602 low_altruism rename up0608 low_civic_virt replace low_financial = . if low_financial < 0 replace low_altruism = . if low_altruism < 0 replace low_civic_virt = . if low_civic_virt < 0 gen financial = . replace financial = 5 - low_financial if low_financial != . gen altruism = . replace altruism = 5 - low_altruism if low_altruism != . gen civic_virt = . replace civic_virt = 5 - low_civic_virt if low_civic_virt != . * Locus of control: tab1 vp12701 vp12702 vp12703 vp12704 vp12705 vp12706 vp12707 vp12708 /// vp12709 vp12710, miss replace vp12701 = . if vp12701 < 0 replace vp12702 = . if vp12702 < 0 replace vp12703 = . if vp12703 < 0 replace vp12704 = . if vp12704 < 0 replace vp12705 = . if vp12705 < 0 replace vp12706 = . if vp12706 < 0 replace vp12707 = . if vp12707 < 0 replace vp12708 = . if vp12708 < 0 replace vp12709 = . if vp12709 < 0 replace vp12710 = . if vp12710 < 0 factor vp12701 vp12702 vp12703 vp12705 vp12706 /// vp12707 vp12708 vp12709 vp12710, ipf fac(1) predict low_loc sum low_loc gen loc = (-1) * low_loc sum loc * Voluntary activities: tab vp0307, miss rename vp0307 volunt_act_inv gen volunt_act = . replace volunt_act = 5 - volunt_act_inv if volunt_act_inv >= 1 & volunt_act_inv <= 4 tab volunt_act, miss * Helping behavior: tab vp0306, miss rename vp0306 helping_inv gen helping = . replace helping = 5 - helping_inv if helping_inv >= 1 & helping_inv <= 4 tab helping, miss * ABM-Maßnahme or 1 euro job: tab vp42, miss rename vp42 abm replace abm = 0 if abm == -2 | abm == 3 replace abm = 1 if abm == 2 replace abm = . if abm == -1 tab abm, miss gen year = 2005 keep persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant order persnr year region /// civic_virt altruism risk_avers risk_av_oc financial /// volunt_act helping /// openness extrav conscient agreeable neurot /// loc trust recipr_pos recipr_neg /// age female /// abm /// original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant save "`c(pwd)'\data_2005_p.dta", replace ****************************************************************************** * Combine data across years to one file: use "`c(pwd)'\data_2005_p.dta" append using "`c(pwd)'\data_2006_p.dta" append using "`c(pwd)'\data_2007_p.dta" append using "`c(pwd)'\data_2008_p.dta" append using "`c(pwd)'\data_2009_p.dta" append using "`c(pwd)'\data_2010_p.dta" append using "`c(pwd)'\data_2011_p.dta" append using "`c(pwd)'\data_2012_p.dta" append using "`c(pwd)'\data_2013_p.dta" append using "`c(pwd)'\data_2014_p.dta" save "`c(pwd)'\data_p.dta", replace ****************************************************************************** * Merge data sets and prepare samples use "`c(pwd)'\data_gen.dta", clear set more off merge 1:1 persnr year using "`c(pwd)'\data_p.dta" tab year if _merge == 1 keep if _merge == 3 drop _merge * Reduce missings in gender variable. * Assumption: Gender remains stable across years for the same individual, * if no other information is provided. bysort year: tab female, miss sort persnr year local i = 1 while `i' <= 9 { replace female = female[_n-`i'] if female == . & female[_n-`i'] != . /// & persnr == persnr[_n-`i'] replace female = female[_n+`i'] if female == . & female[_n+`i'] != . /// & persnr == persnr[_n+`i'] local i = `i' + 1 } bysort year: tab female, miss * Merge migration background from pfad file rename persnr pid * The pfad data set uses the variable name "pid" instead of "persnr". * Therefore, we temporarily use the name "pid" in the merging process. merge m:1 pid using "D:\SOEP\ppfad.dta", keepusing(migback) drop if _merge == 2 drop _merge rename pid persnr tab migback, miss gen mig_back = . replace mig_back = 0 if migback == 1 replace mig_back = 1 if migback == 2 replace mig_back = 1 if migback == 3 * Migration background is 1 if direct or indirect migration background tab mig_back, miss * Year dummies for pooled panel data analyses tab year, miss gen year_2005 = (year == 2005) gen year_2006 = (year == 2006) gen year_2007 = (year == 2007) gen year_2008 = (year == 2008) gen year_2009 = (year == 2009) gen year_2010 = (year == 2010) gen year_2011 = (year == 2011) gen year_2012 = (year == 2012) gen year_2013 = (year == 2013) gen year_2014 = (year == 2014) tab1 year_2005 year_2014, miss * Create alternative Big Five measures with average scores of the three items * that measure a specific trait * The 15 items on which the Big Five personality traits are based: tab1 original experiences imagination /// communicative sociable reserved /// thoroughworker laziness efficacy /// coarse forgive courtesy /// worry nervous stress_resistant, miss * We need the inverse of some variables to construct the traits * conscientiousness, extraversion, agreeableness, and neuroticism: gen laziness_inv = 8 - laziness gen reserved_inv = 8 - reserved gen coarse_inv = 8 - coarse gen stress_resist_inv = 8 - stress_resist tab1 reserved_inv laziness_inv coarse_inv stress_resist_inv, miss * Average scores: gen openness_a = (original + experiences + imagination) / 3 gen conscient_a = (thoroughworker + laziness_inv + efficacy) / 3 gen extrav_a = (communicative + sociable + reserved_inv) / 3 gen agreeable_a = (coarse_inv + forgive + courtesy) / 3 gen neurot_a = (worry + nervous + stress_resist_inv) / 3 tab1 openness_a conscient_a extrav_a agreeable_a neurot_a, miss * Create an overall measure of work experience * (combining experience in full-time jobs and in part-time jobs) * for the distinction between different experience levels * How are full- and part-time experience related? sum exp_part if exp_full < 2 sum exp_part if exp_full >= 2 & exp_full < 20 sum exp_part if exp_full >= 20 pwcorr exp_full exp_part, sig * Create variable: gen exp = exp_full + 0.5 * exp_part sum exp_full exp * Save full data set save "`c(pwd)'\data_merged.dta", replace ****************************************************************************** * Build sample from 2005 to 2014, those who are employed and not self-employed use "`c(pwd)'\data_merged.dta", clear set more off * Now we are only interested in those who are employed, not selfemployed, * have an upper secondary school or vocational degree, * and are not apprentices or interns or 1 euro jobbers etc. keep if employed == 1 keep if selfemployed == 0 keep if secondary == 1 keep if training == 0 keep if abm == 0 * Keep only observations with the necessary information. drop if public == . drop if civic_virt == . drop if altruism == . drop if risk_avers == . drop if laziness == . drop if financial == . drop if age == . drop if female == . drop if married == . drop if german == . drop if mig_back == . drop if college == . drop if exp_full == . drop if exp_part == . drop if openness == . drop if conscient == . drop if extrav == . drop if agreeable == . drop if neurot == . * How many missings would occur if other personality traits * (beyond the Big Five) were additionally included in the main analysis? count if loc == . //Locus of control: 6,119 missing values count if trust == . //Trust: 1,147 missing values count if recipr_pos == . //Positive reciprocity: 5,625 missings count if recipr_neg == . //Negative reciprocity: 5,625 missings * Generate variables for sector switching (private -> public and vice versa). * We capture the year immediately BEFORE the sector change, * because in the year in which the sector change is reported, * motives may already be influenced by work experience in the new sector. sort persnr year * Change from private to public in the next year: * 1 if change, 0 if person stays in private sector gen c_publ_next = . replace c_publ_next = 0 if public == 0 replace c_publ_next = 1 if public == 0 & public[_n+1] == 1 /// & persnr == persnr[_n+1] * Change from public to private in the next year: * 1 if change, 0 if person stays in public sector gen c_priv_next = . replace c_priv_next = 0 if public == 1 replace c_priv_next = 1 if public == 1 & public[_n+1] == 0 /// & persnr == persnr[_n+1] tab c_publ_next, miss * 883 changes from private to public tab c_priv_next, miss * 923 changes from public to private * Create variables for sector-specific work experience * for socialization analysis gen exp_public = . gen exp_private = . * In the year in which a person is observed the first time, * first set to 0; then, set to 1 if employed in the respective sector sort persnr year replace exp_public = 0 if persnr != persnr[_n-1] replace exp_private = 0 if persnr != persnr[_n-1] replace exp_public = 1 if persnr != persnr[_n-1] & public == 1 replace exp_private = 1 if persnr != persnr[_n-1] & public == 0 * In each year from 2006 to 2014, * if it is not the first time that a person is observed: * first take the values from the previous year; * then, increase public sector work experience if employed in the public sector, * and increase private sector work experience if employed in the private sector: local i = 2006 while `i' <= 2014 { replace exp_public = exp_public[_n-1] if year == `i' & persnr == persnr[_n-1] replace exp_private = exp_private[_n-1] if year == `i' & persnr == persnr[_n-1] replace exp_public = exp_public[_n-1] + 1 if year == `i' & public == 1 /// & persnr == persnr[_n-1] replace exp_private = exp_private[_n-1] + 1 if year == `i' & public == 0 /// & persnr == persnr[_n-1] local i = `i' + 1 } * Check outcomes: tab exp_public, miss tab exp_private, miss order persnr year public exp_public exp_private count * 63,180 observations for main analysis egen individuals = group(persnr) sum individuals * 13,683 different individuals * z-standardization of variables egen civic_virt_z = std(civic_virt) egen altruism_z = std(altruism) egen risk_avers_z = std(risk_avers) egen laziness_z = std(laziness) egen financial_z = std(financial) egen openness_z = std(openness) egen conscient_z = std(conscient) egen extrav_z = std(extrav) egen agreeable_z = std(agreeable) egen neurot_z = std(neurot) * z-standardization of average scores: egen openness_s = std(openness_a) egen conscient_s = std(conscient_a) egen extrav_s = std(extrav_a) egen agreeable_s = std(agreeable_a) egen neurot_s = std(neurot_a) * z-standardization of additional personality variables (for robustness checks): egen volunt_act_z = std(volunt_act) egen helping_z = std(helping) egen risk_av_oc_z = std(risk_av_oc) egen loc_z = std(loc) egen trust_z = std(trust) egen recipr_pos_z = std(recipr_pos) egen recipr_neg_z = std(recipr_neg) * Save sample of employees save "`c(pwd)'\sample_emp.dta", replace ****************************************************************************** * Build sample from 2005 to 2014, year before employment (no self-employment) use "`c(pwd)'\data_merged.dta", clear set more off * We now want to capture individuals in the year before they are employed * the first time. * Criteria: no full-time work experience, not employed, * employed in the next year, not self-employed in the next year, * upper secondary school or vocational degree by next year, * no training status (apprenticeship or internship) in the next year * and no unemployment program in the next year. sort persnr year tab exp_full, miss gen before_start = 0 replace before_start = 1 if exp_full == 0 & employed == 0 /// & employed[_n+1] == 1 & selfemployed[_n+1] == 0 & secondary[_n+1] == 1 /// & training[_n+1] == 0 & abm[_n+1] == 0 & persnr == persnr[_n+1] * We make sure that for every individual such an event is captured only * once (the first time). local i = 1 while `i' <= 9 { replace before_start = 0 if before_start == 1 & before_start[_n-`i'] == 1 /// & persnr == persnr[_n-`i'] local i = `i' + 1 } count if before_start == 1 order persnr year employed exp_full before_start public * As the dependent variable, we need the sector in the next year. sort persnr year gen public_next = . replace public_next = public[_n+1] if before_start == 1 order persnr year employed exp_full before_start public public_next * As a control variable, we need the education information of the next year. gen college_next = . replace college_next = college[_n+1] if before_start == 1 * We focus on the year before the first employment. keep if before_start == 1 * Again we focus on the time from 2005 to 2014. drop if year <= 2004 * Keep only observations with the necessary information. drop if public_next == . drop if civic_virt == . drop if altruism == . drop if risk_avers == . drop if laziness == . drop if financial == . drop if age == . drop if female == . drop if married == . drop if german == . drop if mig_back == . drop if college_next == . drop if openness == . drop if conscient == . drop if extrav == . drop if agreeable == . drop if neurot == . count * 878 observations * z-standardization of variables egen civic_virt_z = std(civic_virt) egen altruism_z = std(altruism) egen risk_avers_z = std(risk_avers) egen laziness_z = std(laziness) egen financial_z = std(financial) egen openness_z = std(openness) egen conscient_z = std(conscient) egen extrav_z = std(extrav) egen agreeable_z = std(agreeable) egen neurot_z = std(neurot) * Save sample of year before first employment save "`c(pwd)'\sample_bef.dta", replace ****************************************************************************** * Build large sample from 2005 to 2014: employed with self-employed use "`c(pwd)'\data_merged.dta", clear set more off * No restriction with regard to self-employment keep if employed == 1 * We still restrict the analysis to those who are employed ("erwerbstätig"). keep if secondary == 1 keep if training == 0 keep if abm == 0 * Keep only observations with the necessary information. drop if public == . drop if civic_virt == . drop if altruism == . drop if risk_avers == . drop if laziness == . drop if financial == . drop if age == . drop if female == . drop if married == . drop if german == . drop if mig_back == . drop if college == . drop if exp_full == . drop if exp_part == . drop if openness == . drop if conscient == . drop if extrav == . drop if agreeable == . drop if neurot == . count * 67,225 observations count if selfemployed == 1 * 4,045 observations of self-employed * z-standardization of variables egen civic_virt_z = std(civic_virt) egen altruism_z = std(altruism) egen risk_avers_z = std(risk_avers) egen laziness_z = std(laziness) egen financial_z = std(financial) egen openness_z = std(openness) egen conscient_z = std(conscient) egen extrav_z = std(extrav) egen agreeable_z = std(agreeable) egen neurot_z = std(neurot) * Save extended sample save "`c(pwd)'\sample_ext.dta", replace ****************************************************************************** * DATA ANALYSIS ****************************************************************************** * Descriptive statistics use "`c(pwd)'\sample_emp.dta", clear set more off * Summary statistics of all variables * Install package for exporting tables: ssc install estout * Public sector: estpost sum civic_virt altruism /// risk_avers laziness financial /// age female married german mig_back college exp_full exp_part /// openness conscient extrav agreeable neurot /// volunt_act helping risk_av_oc loc trust recipr_pos recipr_neg /// branch_care branch_educa branch_heaso branch_ncar branch_servi /// if public == 1 * Export to table with three columns, * three decimal places for mean and standard deviation (sd): esttab using "`c(pwd)'\sum_publ.rtf", /// rtf replace cells("count(fmt(0)) mean(fmt(3)) sd(fmt(3))") * Private sector: estpost sum civic_virt altruism /// risk_avers laziness financial /// age female married german mig_back college exp_full exp_part /// openness conscient extrav agreeable neurot /// volunt_act helping risk_av_oc loc trust recipr_pos recipr_neg /// branch_care branch_educa branch_heaso branch_ncar branch_servi /// if public == 0 esttab using "`c(pwd)'\sum_priv.rtf", /// rtf replace cells("count(fmt(0)) mean(fmt(3)) sd(fmt(3))") * Test significance of differences with t-tests: ttest civic_virt, by(public) ttest altruism, by(public) ttest risk_avers, by(public) ttest laziness, by(public) ttest financial, by(public) ttest age, by(public) ttest female, by(public) ttest married, by(public) ttest german, by(public) ttest mig_back, by(public) ttest college, by(public) ttest exp_full, by(public) ttest exp_part, by(public) ttest openness, by(public) ttest conscient, by(public) ttest extrav, by(public) ttest agreeable, by(public) ttest neurot, by(public) ttest volunt_act, by(public) ttest helping, by(public) ttest risk_av_oc, by(public) ttest loc, by(public) ttest trust, by(public) ttest recipr_pos, by(public) ttest recipr_neg, by(public) ttest branch_care, by(public) ttest branch_educa, by(public) ttest branch_heaso, by(public) ttest branch_ncar, by(public) ttest branch_servi, by(public) * Descriptive statistics and bivariate correlations estpost sum public civic_virt altruism risk_avers laziness financial esttab using "`c(pwd)'\sum.rtf", /// rtf replace cells("count(fmt(0)) mean(fmt(3)) sd(fmt(3))") pwcorr public civic_virt_z altruism_z risk_avers_z laziness_z financial_z, sig * Correlations between motives and Big Five personality traits pwcorr civic_virt_z altruism_z risk_avers_z laziness_z financial_z /// openness_z conscient_z extrav_z agreeable_z neurot_z , sig * Considerable correlations (<= -.25 or >= .25) only exist between some * Big Five variables * and between laziness and some Big Five variables (laziness is part of * the construction of conscientiousness). ****************************************************************************** * Main analysis use "`c(pwd)'\sample_emp.dta", clear set more off quietly reg public /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 estat hettest * Breusch-Pagan / Cook-Weisberg test for heteroskedasticity: * assumption of homoscedasticity rejected (p < .01) * -> use robust standard errors * (1) probit public /// civic_virt_z /// year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) margins, dydx(*) post * Export to Word file: outreg2 using "`c(pwd)'\main.rtf", /// replace dec(3) see word * (2) probit public /// civic_virt_z altruism_z /// year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\main.rtf", /// dec(3) see word * (3) probit public /// civic_virt_z altruism_z risk_avers_z laziness_z financial_z /// year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\main.rtf", /// dec(3) see word * (4) probit public /// civic_virt_z altruism_z risk_avers_z laziness_z financial_z /// age female married german mig_back college exp_full exp_part /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\main.rtf", /// dec(3) see word * (5) probit public /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\main.rtf", /// dec(3) see word * Test differences between coefficients: test civic_virt_z = altruism_z * Civic virtue > altruism (p < .01) test civic_virt_z = risk_avers_z * Civic virtue > risk aversion (p < .01) test civic_virt_z = financial_z * Civic virtue > financial motivation (p < .01) * Is the coefficient for civic virtue also significantly larger * than the coefficient for LOW importance of money? gen low_fin_z = (-1) * financial_z probit public /// civic_virt_z altruism_z risk_avers_z low_fin_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) margins, dydx(*) post test civic_virt_z = low_fin_z * Yes * Exclude civic virtue: probit public /// altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) margins, dydx(*) post * Now larger effect of altruism (0.015, p < .01) * Using average scores for the Big Five personality traits: probit public /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_s extrav_s conscient_s agreeable_s neurot_s /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) margins, dydx(*) post * No major differences * Marginal effects calculated at the means of the explanatory variables * instead of average marginal effects: probit public /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z extrav_z conscient_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) margins, dydx(*) atmeans post * No major differences ****************************************************************************** * Robustness check: behavioral measures of prosocial motivation use "`c(pwd)'\sample_emp.dta", clear set more off drop if volunt_act_z == . drop if helping_z == . probit public /// volunt_act_z helping_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\rob_behav.rtf", /// replace dec(3) see word * Test differences between coefficients: test volunt_act_z = helping_z * Voluntary activities > helping behavior (p < .01) test volunt_act_z = risk_avers_z * Voluntary activities > risk aversion (p < .01) test volunt_act_z = financial_z * Voluntary activities > financial motivation (p < .01) ****************************************************************************** * Robustness check: occupation-related instead of general risk aversion use "`c(pwd)'\sample_emp.dta", clear set more off probit public /// civic_virt_z altruism_z risk_av_oc_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\rob_occrisk.rtf", /// replace dec(3) see word * Test differences between coefficients: test civic_virt_z = altruism_z * Civic virtue > altruism (p < .01) test civic_virt_z = risk_av_oc_z * Civic virtue > occ. risk aversion (p < .01) test civic_virt_z = financial_z * Civic virtue > financial motivation (p < .01) ****************************************************************************** * Robustness check: inclusion of additional personality traits use "`c(pwd)'\sample_emp.dta", clear set more off count if loc_z != . & trust_z != . & recipr_pos_z != . & recipr_neg_z != . * Final sample reduced to 55,681 observations probit public /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// loc_z trust_z recipr_pos_z recipr_neg_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\rob_addperso.rtf", /// replace dec(3) see word ****************************************************************************** * Robustness check: different education levels use "`c(pwd)'\sample_emp.dta", clear set more off * (1) Full sample: probit public /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\rob_educ.rtf", /// replace dec(3) see word * (2) No college degree: sum public if college == 0 * Baseline share of public sector employment in this group: 24.8% probit public /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// if college == 0 , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\rob_educ.rtf", /// dec(3) see word * (3) College degree: sum public if college == 1 * Baseline share of public sector employment in this group: 45.9% probit public /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// if college == 1 , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\rob_educ.rtf", /// dec(3) see word ****************************************************************************** * Robustness check: different experience levels use "`c(pwd)'\sample_emp.dta", clear set more off * (1) Full sample: probit public /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\rob_exp.rtf", /// replace dec(3) see word * (2) Experience < 2 years: probit public /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// if exp < 2 , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\rob_exp.rtf", /// dec(3) see word * (3) Experience 2-20 years: probit public /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// if exp >= 2 & exp < 20 , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\rob_exp.rtf", /// dec(3) see word * (4) Experience >= 20 years: probit public /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// if exp >= 20 , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\rob_exp.rtf", /// dec(3) see word ****************************************************************************** * Robustness check: only years in which civic virtue is assessed (2008 and '12) use "`c(pwd)'\sample_emp.dta", clear set more off keep if year == 2008 | year == 2012 count * 11,299 observations tab public, miss * 30.4% public sector probit public /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2008 /// , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\rob_0812.rtf", /// replace dec(3) see word * Test differences between coefficients: test civic_virt_z = altruism_z * Civic virtue > altruism (p < .01) test civic_virt_z = risk_avers_z * Civic virtue > risk aversion (p < .01) test civic_virt_z = financial_z * Civic virtue > financial motivation (p < .01) ****************************************************************************** * Robustness check: different branches use "`c(pwd)'\sample_emp.dta", clear set more off * (1) Caring branch: sum public if branch_care == 1 * 13,930 observations, 64.7% public sector probit public /// civic_virt_z altruism_z risk_avers_z financial /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// if branch_care == 1 , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\rob_branches.rtf", /// replace dec(3) see word * (2) Caring -> education: sum public if branch_educa == 1 * 5,918 observations, 86.9% public sector probit public /// civic_virt_z altruism_z risk_avers_z financial /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// if branch_educa == 1 , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\rob_branches.rtf", /// dec(3) see word * (3) Caring -> health and social care: sum public if branch_heaso == 1 * 8,012 observations, 48.3% public sector probit public /// civic_virt_z altruism_z risk_avers_z financial /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// if branch_heaso == 1 , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\rob_branches.rtf", /// dec(3) see word * (4) Non-caring branches: sum public if branch_ncar == 1 * 48,256 observations, 21.3% public sector probit public /// civic_virt_z altruism_z risk_avers_z financial /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// if branch_ncar == 1 , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\rob_branches.rtf", /// dec(3) see word * (5) Non-caring branches -> service: sum public if branch_servi == 1 * 28,282 observations, 33.8% public sector probit public /// civic_virt_z altruism_z risk_avers_z financial /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// if branch_servi == 1 , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\rob_branches.rtf", /// dec(3) see word ****************************************************************************** * Selection analysis * Selection at the start of the career: * individuals observed before their first labor market entry use "`c(pwd)'\sample_bef.dta", clear set more off sum public_next * The baseline share of public sector employment in the next year is 27.4%. * (1) probit public_next /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college_next /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust margins, dydx(*) post outreg2 using "`c(pwd)'\select.rtf", /// replace dec(3) see word * Selection during the career: explanation of sector changes use "`c(pwd)'\sample_emp.dta", clear set more off sum c_publ_next * The baseline share of changes to the public sector in the next year, * relative to staying in the private sector, is 2.0%. * (2) reg c_publ_next /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) outreg2 using "`c(pwd)'\select.rtf", /// dec(3) see word sum c_priv_next * The baseline share of changes to the private sector in the next year, * relative to staying in the public sector, is 4.7%. * (3) reg c_priv_next /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) outreg2 using "`c(pwd)'\select.rtf", /// dec(3) see word ****************************************************************************** * Socialization: fixed effects regressions of motives on sector-specific exp. use "`c(pwd)'\sample_emp.dta", clear set more off * Define panel variable (individual) and time variable (year): xtset persnr year quietly reg civic_virt_z exp_public exp_private estat hettest * Breusch-Pagan / Cook-Weisberg test for heteroskedasticity: * assumption of homoscedasticity rejected (p < .01) * -> use robust standard errors * (1) Civic virtue xtreg civic_virt_z exp_public exp_private /// , fe robust outreg2 using "`c(pwd)'\fe.rtf", /// replace dec(3) see word test exp_public = exp_private * No significant difference between public and private sector (p = .50) * (2) Altruism xtreg altruism_z exp_public exp_private /// , fe robust outreg2 using "`c(pwd)'\fe.rtf", /// dec(3) see word test exp_public = exp_private * No significant difference between public and private sector (p = .17) * (3) Risk aversion xtreg risk_avers_z exp_public exp_private /// , fe robust outreg2 using "`c(pwd)'\fe.rtf", /// dec(3) see word test exp_public = exp_private * No significant difference between public and private sector (p = .56) * (4) Laziness xtreg laziness_z exp_public exp_private /// , fe robust outreg2 using "`c(pwd)'\fe.rtf", /// dec(3) see word test exp_public = exp_private * No significant difference between public and private sector (p = .65) * (5) Financial motivation xtreg financial_z exp_public exp_private /// , fe robust outreg2 using "`c(pwd)'\fe.rtf", /// dec(3) see word test exp_public = exp_private * No significant difference between public and private sector (p = .90) * Robustness check: use only years in which respective motive is observed xtreg civic_virt_z exp_public exp_private /// if year == 2008 | year == 2012, fe robust outreg2 using "`c(pwd)'\fe_rob_years.rtf", /// replace dec(3) see word test exp_public = exp_private * No change to baseline results xtreg altruism_z exp_public exp_private /// if year == 2008 | year == 2012, fe robust outreg2 using "`c(pwd)'\fe_rob_years.rtf", /// dec(3) see word test exp_public = exp_private * No change to baseline results xtreg risk_avers_z exp_public exp_private /// if year != 2005 & year != 2007, fe robust outreg2 using "`c(pwd)'\fe_rob_years.rtf", /// dec(3) see word test exp_public = exp_private * No change to baseline results xtreg laziness_z exp_public exp_private /// if year == 2005 | year == 2009 | year == 2013, fe robust outreg2 using "`c(pwd)'\fe_rob_years.rtf", /// dec(3) see word test exp_public = exp_private * No change to baseline results xtreg financial_z exp_public exp_private /// if year == 2008 | year == 2012, fe robust outreg2 using "`c(pwd)'\fe_rob_years.rtf", /// dec(3) see word test exp_public = exp_private * No change to baseline results * Robustness check: include control variables (except age, because changes in * age highly collinear with changes in experience within individuals; * for the same reason, year dummies are not included) xtreg civic_virt_z exp_public exp_private /// female married german mig_back college /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region , fe robust outreg2 using "`c(pwd)'\fe_rob_contr.rtf", /// replace dec(3) see word test exp_public = exp_private * No change to baseline results xtreg altruism_z exp_public exp_private /// female married german mig_back college /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region , fe robust outreg2 using "`c(pwd)'\fe_rob_contr.rtf", /// dec(3) see word test exp_public = exp_private * No change to baseline results xtreg risk_avers_z exp_public exp_private /// female married german mig_back college /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region , fe robust outreg2 using "`c(pwd)'\fe_rob_contr.rtf", /// dec(3) see word test exp_public = exp_private * No change to baseline results xtreg laziness_z exp_public exp_private /// female married german mig_back college /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region , fe robust outreg2 using "`c(pwd)'\fe_rob_contr.rtf", /// dec(3) see word test exp_public = exp_private * No change to baseline results xtreg financial_z exp_public exp_private /// female married german mig_back college /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region , fe robust outreg2 using "`c(pwd)'\fe_rob_contr.rtf", /// dec(3) see word test exp_public = exp_private * No change to baseline results ****************************************************************************** * Exploratory analysis: civic virtue and self-employment use "`c(pwd)'\sample_ext.dta", clear set more off quietly reg selfemployed /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 estat hettest * Breusch-Pagan / Cook-Weisberg test for heteroskedasticity: * assumption of homoscedasticity rejected (p < .01) * -> use robust standard errors * (1) Self-employed compared to all others sum selfemployed * The baseline share of self-employed is 6.0%. probit selfemployed /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// , robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\selfemp.rtf", /// replace dec(3) see word * (2) Self-employed compared to public sector employees sum selfemployed if selfemployed == 1 | (public == 1 & selfemployed == 0) * The baseline share of self-employed relative to public sector employees * is 17.2%. probit selfemployed /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// if selfemployed == 1 | (public == 1 & selfemployed == 0), robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\selfemp.rtf", /// dec(3) see word * (3) Self-employed compared to private sector employees sum selfemployed if selfemployed == 1 | (public == 0 & selfemployed == 0) * The baseline share of self-employed relative to private sector employees * is 8.5%. probit selfemployed /// civic_virt_z altruism_z risk_avers_z financial_z /// age female married german mig_back college exp_full exp_part /// openness_z conscient_z extrav_z agreeable_z neurot_z /// i.region year_2005 year_2006 year_2007 year_2008 year_2009 year_2010 /// year_2011 year_2012 year_2013 /// if selfemployed == 1 | (public == 0 & selfemployed == 0), robust cluster(persnr) margins, dydx(*) post outreg2 using "`c(pwd)'\selfemp.rtf", /// dec(3) see word ****************************************************************************** log close