********************************************************************* *** Estimation and preparation LPP Data *** by Stephan Brunow: stephan.brunow@iab.de *** *** Eckhardt Bode, Stephan Brunow, Ingrid Ott, Alina Sorgner (2018), *** Worker Personality: Another Skill Bias beyond Education in the Digital Age. *** German Economic Review *** ********************************************************************* ******************************* *** *** read Infofile containing Region and industry * use \\iab.baintern.de\dfs\017\Ablagen\D01700-Projekte\D01700-Florida\data\merge_idnum_jahr_betnr_auftr, clear //this is confidential data and can only be accessed via a Guest stay at the IAB * drop if idnum==-9 * drop if jahr!=2012 * save data\idnum_kreis, replace *** read LPP-Personen-Data use lpp\lpp_employee_1213_v1.dta, clear merge 1:m pers_id using orig/LPP/LPP_Personen_Berufe_WZ, keep(match master) //Add individuals employment history: this is confidential data and can only be accessed via a Guest stay at the IAB drop w08_2 gen year_s=year(begepi) gen year_e=year(endepi) drop if year_s==2013 //Lösche Infos, die 2013 beginnen drop if year_e<2012 gen month_e=month(endepi) gen month_s=month(begepi) drop if month_e<12 by pers_id, sort: egen max_mon=max(month_s) drop if month_s!=max_mon drop max_mon merge m:1 lpp_betnr using orig\lpp\lpp_employer_1213_v1, keepusing(idnum) nogen //add IDNUM; this is confidential data and can only be accessed via a Guest stay at the IAB drop if idnum==. merge m:1 idnum using data\idnum_kreis, keep(match master) nogen drop if pers_id==. drop erst_auftr letzt_auftr wz73_num wz93_num wz03_num by pers_id, sort: egen test=mean(beruf_kons) gen deviat=test-beruf_kons sum deviat, de by pers_id, sort: gen case=_n drop if case>1 & deviat==0 sum deviat, de drop test by pers_id, sort: gen test=_N tab test drop if test>1 drop deviat test case _merge *** Füge probabilities der computisierbarkeit hinzu ren beruf_kons ieb_beruf_kons_num merge m:1 ieb_beruf_kons_num using orig\prob-kldb2010-harmonisiert, drop _merge *** Creative occupations gen beruf_string=string(ieb_beruf_kons_num) ren ieb_beruf_kons_num beruf_zahl ren beruf_string ieb_beruf_kons_num merge m:1 ieb_beruf_kons_num using orig\scc_manually_prepared, nogen ren ieb_beruf_kons_num beruf_string ren beruf_zahl ieb_beruf_kons_num gen d_cp=0 replace d_cp=1 if scc==1 | cp==1 *** Big5 *** Rekursive Erhebung: Missings löschen und Umkodieren foreach var in a b c d e f g h i j k l m n o p { drop if F605`var'<1 drop if F605`var'>5 } foreach var in l c g o { recode F605`var' (1 = 5) (2 = 4) (3 = 3) (4 = 2) (5 = 1) } *** Problem: in LPP ist Kodierung genau anders herum (1=trifft voll zu und in allen anderen Datensätzen ist 1=trifft gar nicht zu): Umdrehen. foreach var in a b c d e f g h i j k l m n o p { recode F605`var' (1 = 5) (2 = 4) (3 = 3) (4 = 2) (5 = 1) } *** BFI (erhoben wie in SOEP) gen BFI_E_l = (F605l+F605p+F605b+F605h)/4 gen BFI_V_l = (F605m+F605f+F605c)/3 gen BFI_G_l = (F605a+F605g+F605k)/3 gen BFI_N_l = (F605o+F605e+F605j)/3 gen BFI_O_l = (F605i+F605n+F605d)/3 *** Z-Transformation durchführen foreach var of varlist BFI_E_l BFI_V_l BFI_G_l BFI_N_l BFI_O_l { sum `var' gen `var'_z=(`var'-r(mean))/r(sd) } global bfk_p_z "BFI_O_l_z BFI_G_l_z BFI_E_l_z BFI_V_l_z BFI_N_l_z " *** Kontrollvariablen gen d_mann=1 if F3==1 replace d_mann=0 if F3==2 drop if F811==-6 gen d_ausl=1 if F811!=1 replace d_ausl=0 if F811==1 gen palter=2012-F1 gen palter2=palter*palter drop if F801<0 //Keine Angabe löschen drop if F801==8 //Anderer Schulabschluss gen year_school=9 if F801<3 //kein Abschluss oder Haupt/Volksschule replace year_school=10 if F801==3 //Realschule replace year_school=13 if F801==4 | F801==5 //Abi replace year_school=18 if F802==5 | F802==5 //Uni gen year_school_2=year_school*year_school gen wz08_2=trunc(wz08_num/1000) gen region= beh_ao_krs_num gen bula=trunc(region/1000) merge m:1 region using orig/ktyp2008.dta, keep(match master) tab region if _merge==1 //Alles rtyp=2 gen rtyp=1 if ktyp2008==1 | ktyp2008==2 | ktyp2008==3 | ktyp2008==4 replace rtyp=2 if ktyp2008==5 | ktyp2008==6 | ktyp2008==7 replace rtyp=3 if ktyp2008==8 | ktyp2008==9 replace rtyp=2 if _merge==1 & rtyp==. drop _merge label define rtyp 1 "Agglomeration" 2 "Urbaner Raum" 3 "Ländlicher Raum" label values rtyp rtyp ******************************************************************************************************* *** *** Estimation est drop _all *** Baseline Model glm prob $bfk_p_z year_school year_school_2 palter palter2 d_mann d_ausl i.bula i.wz08_2, family(binomial) link(probit) vce(cluster ieb_beruf_kons_num) testparm i.wz08_2 qui estadd scalar WZ08_chi2=r(chi2) qui estadd scalar WZ08_prob=r(p) testparm i.bula qui estadd scalar BuLa_chi2=r(chi2) qui estadd scalar BuLa_prob=r(p) testparm $bfk_p_z qui estadd scalar Big5_chi2=r(chi2) qui estadd scalar Big5_prob=r(p) testparm palter palter2 qui estadd scalar age_chi2=r(chi2) qui estadd scalar age_prob=r(p) testparm year_school year_school_2 qui estadd scalar edu_chi2=r(chi2) qui estadd scalar edu_prob=r(p) est store glm_Tab1 *** Estimate Baseline without education variables. glm prob $bfk_p_z palter palter2 d_mann d_ausl i.bula i.wz08_2, family(binomial) link(probit) vce(cluster ieb_beruf_kons_num) testparm i.wz08_2 qui estadd scalar WZ08_chi2=r(chi2) qui estadd scalar WZ08_prob=r(p) testparm i.bula qui estadd scalar BuLa_chi2=r(chi2) qui estadd scalar BuLa_prob=r(p) testparm $bfk_p_z qui estadd scalar Big5_chi2=r(chi2) qui estadd scalar Big5_prob=r(p) testparm palter palter2 qui estadd scalar age_chi2=r(chi2) qui estadd scalar age_prob=r(p) est store glm_Tab2 lrtest glm_Tab1 ., force *** Estimate Model without Industry FE glm prob $bfk_p_z year_school year_school_2 palter palter2 d_mann d_ausl i.bula , family(binomial) link(probit) vce(cluster ieb_beruf_kons_num) testparm i.bula qui estadd scalar BuLa_chi2=r(chi2) qui estadd scalar BuLa_prob=r(p) testparm $bfk_p_z qui estadd scalar Big5_chi2=r(chi2) qui estadd scalar Big5_prob=r(p) testparm palter palter2 qui estadd scalar age_chi2=r(chi2) qui estadd scalar age_prob=r(p) testparm year_school year_school_2 qui estadd scalar edu_chi2=r(chi2) qui estadd scalar edu_prob=r(p) est store glm_Tab3 lrtest glm_Tab1 ., force set linesize 255 estout glm*, varw(25) modelw(21) starlevels(* .1 ** .05 *** .01) cells(b(star fmt(3)) se(par fmt(3))) drop(*wz08_2 ) /// stat(N N_clust ll r2 r2_a WZ08_chi2 WZ08_prob BuLa_chi2 BuLa_prob age_chi2 age_prob edu_chi2 edu_prob Big5_edu_chi2 Big5_edu_prob Big5_chi2 Big5_prob Big5_age_chi2 Big5_age_prob Big5_M_chi2 Big5_M_prob, fmt(0 0 %4.3f) labels("No. obs" "No. Occupations" "log L" "adj R2" )) nolabel varlabel(_cons Constant) est stats glm* *** Deskriptive Statistiken Big5 ohne z-Standardisierung sum BFI* if e(sample)==1 ** Ende