******************************************************************************************** * ARE THERE LONG-TERM EARNINGS SCARS FROM YOUTH UNEMPLOYMENT IN GERMANY? * ******************************************************************************************** /* authors: Joachim Möller, Matthias Umkehrer - institute for employment research, Nuremberg, Germany first draft : 13.01.2014 this version: 29.07.2014 version : final remark : IEB data, sample of male German apprentices */ ************************************************************************** *header *-------------------------------------------------------------------------- clear all version 12.1 set more off capture log close *directories *-------------------------------------------------------------------------- local user = 1 if `user' == 1 { global main = "...\income_scarring" global data = "$main"+"\"+"data" global dataproc = "$main"+"\"+"data"+"\"+"processed" global log = "$main"+"\"+"logfiles" global do = "$main"+"\"+"dofiles" global graph = "$main"+"\"+"graphs" global adddata = "$main"+"\"+"data"+"\"+"additional" global ado = "$main"+"\"+"ado" } else if `user' == 2 { } *basics *-------------------------------------------------------------------------- cd "$main" global name = "Moeller_Umkehrer-estim" ** Log-file: global logname = "$log"+"\"+"$name" log using "$logname.log", replace ** prepared data: use "$dataproc\scardata3_reduced_inc" /* *------------------------------------------------------------------------------------------------------------------------* *------------------------------------------------------------------------------------------------------------------------* *------------------------------------------------------------------------------------------------------------------------* ** Data preparation use "...\scardata3_readyforestim.dta", clear /* Further details on data selection and construction of the control variables can be found in Appendix 8.1 of Schmillen and Umkehrer (2013). SCHMILLEN, ACHIM and UMKEHRER, MATTHIAS (2013). The Scars of Youth - Effects of Early-Career Unemployment on Future Unemployment Experience. IAB Discussion Paper 06/2013. */ *------------------------------------------------------------------------------------------------------------------------* *------------------------------------------------------------------------------------------------------------------------* *------------------------------------------------------------------------------------------------------------------------* *** duration of "main" apprenticeship training period cap drop traindur_main bysort persnr main_app: egen traindur_main = total(dauer) if main_app == 1 sort persnr begepi *** employer change between the first spell in prime age and the last spell in early career cap drop fp_bnr_last cap drop sp_bnr_first by persnr: gen sp_bnr_first = erwerbsjahr >= 9 & erwerbsjahr <. replace sp_bnr_first = bnr_ano*sp_bnr_first cap drop ind* gen ind1 = erwerbsjahr >= 9 & erwerbsjahr <. replace ind1 = begepi if ind1 == 1 replace ind1 = . if sp_bnr_first==. sort persnr ind1 gen ind2 = . replace ind2 = sp_bnr_first if sp_bnr_first > 0 & sp_bnr_first <. & sp_bnr_first[_n-1]==0 & persnr == persnr[_n-1] cap drop first_bnr_sp by persnr: egen first_bnr_sp = max(ind2) drop ind* sp_bnr_first by persnr: gen fp_bnr_last = erwerbsjahr > 0 & erwerbsjahr <9 replace fp_bnr_last = bnr_ano*fp_bnr_last cap drop ind* gen ind1 = erwerbsjahr > 0 & erwerbsjahr <9 replace ind1 = begepi if ind1 == 1 replace ind1 = . if fp_bnr_last==. sort persnr ind1 gen ind2 = . replace ind2 = fp_bnr_last if fp_bnr_last > 0 & fp_bnr_last <. & fp_bnr_last[_n+1]==. & persnr == persnr[_n+1] cap drop ind3 gen ind3 = . replace ind3 = fp_bnr_last if fp_bnr_last > 0 & fp_bnr_last <. & fp_bnr_last[_n-1]==0 & persnr == persnr[_n-1] cap drop last_bnr_fp by persnr: egen last_bnr_fp = max(ind2) cap drop first_bnr_fp by persnr: egen first_bnr_fp = max(ind3) drop ind* fp_bnr_last *** Earnings capture drop employed g byte employed = erwstat>=101 & erwstat<=109 capture drop fulltime gen fulltime=(stib!=8 & stib!=9) if stib!=. foreach var of varlist tentgelth_real { bys persnr erwerbsjahr: egen y`var'_all = sum(`var' * dauer * employed) bys persnr erwerbsjahr: egen y`var'_full = sum(`var' * dauer * employed * fulltime) replace y`var'_full = . if y`var'_full==0 g byte y`var'_nozero = . replace y`var'_nozero = y`var'_all if y`var'_all!=0 forvalues y = 1/24 { capture drop temp gen temp = 0 replace temp = y`var'_all if erwerbsjahr == `y' capture drop y`var'_`y' bysort persnr: egen y`var'_`y' = max(temp) } *** cap drop y`var'_sp gen y`var'_sp = y`var'_9 + y`var'_10 + y`var'_11 + y`var'_12 + y`var'_13 + y`var'_14 + y`var'_15 + y`var'_16 /* */ + y`var'_17 + y`var'_18 + y`var'_19 + y`var'_20 + y`var'_21 + y`var'_22 + y`var'_23 + y`var'_24 replace y`var'_sp=. if sp_mis==1 | fpsp_mis==1 count if y`var'_sp==. & end_app==1 } *** District UR, at end of early career gsort +persnr -quelle -begepi capture drop alq_end_fp gen alq_end_fp2=. replace alq_end_fp2=alq if fp==1 & fp[_n-1]==0 & persnr==persnr[_n-1] & quelle==1 & quelle[_n-1]==1 bysort persnr: egen alq_end_fp=min(alq_end_fp2) capture drop alq_end_fp2 *** one spell per person keep if end_app==1 *** BHP-Data destring bnr_ano, replace force merge m:1 bnr_ano using "...\a012434_tr_bnr_ano_betnr_old.dta" drop if _merge==2 drop _merge merge m:1 betnr cohort using "...\bhp_data_old.dta" drop if _merge==2 drop _merge *** Cohorts 1978, 1979, and 1980 keep if cohort>=1978 & cohort<=1980 *** Additional sample restriction keep if lebensalo!=. & aab!="" *** save save "$dataproc\scardata3_reduced_inc.dta", replace */ ***************************************************************************************************************************** * ONLY GERMAN MALES ENTERING THROUGH THE APPRENTICESHIP SYSTEM ARE IN THE DATA sort persnr begepi *** Generate control variables * Graduation cohort capture drop cohort_1979 capture drop cohort_1980 gen cohort_1979=(cohort==1979) if cohort!=. gen cohort_1980=(cohort==1980) if cohort!=. * Training firm's district xi, prefix(aa) i.aab global aab aaaab_2 forvalues i=3/167 { global aab $aab aaaab_`i' } xi, prefix(ao) i.ao_bula xi, prefix(ap) i.ao_kreis * Training sector (reduced) capture drop wzgr gen byte wzgr=. replace wzgr=1 if w73<40 & begjahr<=2002 replace wzgr=2 if w73>=40 & w73<90 & begjahr<=2002 replace wzgr=3 if w73>=90 & w73<590 & begjahr<=2002 replace wzgr=4 if w73>=590 & w73<620 & begjahr<=2002 replace wzgr=5 if w73>=620 & w73<630 & begjahr<=2002 replace wzgr=6 if w73>=630 & w73<690 & begjahr<=2002 replace wzgr=7 if w73>=690 & w73<700 & begjahr<=2002 replace wzgr=8 if w73>=700 & w73<870 & begjahr<=2002 replace wzgr=9 if w73>=870 & w73<910 & begjahr<=2002 replace wzgr=10 if w73>=910 & w73<. & begjahr<=2002 capture replace wzgr=int(w03/1000) if begjahr>=2003 capture drop wz73 capture drop wz03 xi, prefix(wz) i.wzgr * Training occupation (reduced) capture drop occ_1 gen byte occ_1=. replace occ_1=1 if beruf==11 | beruf==12 | beruf==21 | beruf==22 | beruf==42 | beruf==41 | beruf==43 | beruf==44 | beruf==51 | beruf==53 | beruf==61 | beruf==62 replace occ_1=2 if beruf==71 | beruf==72 | beruf==81 | beruf==82 | beruf==83 | beruf==91 | beruf==101 | beruf==102 | beruf==111 | beruf==121 | beruf==112 /* */ | beruf==131 | beruf==132 | beruf==133 | beruf==135 | beruf==141 | beruf==143 | beruf==151 | beruf==161 | beruf==162 | beruf==177 | beruf==164 /* */ | beruf==176 | beruf==181 | beruf==182 | beruf==183 | beruf==184 | beruf==191 | beruf==192 | beruf==193 | beruf==203 | beruf==211 | beruf==212 /* */ | beruf==213 | beruf==222 | beruf==223 | beruf==226 | beruf==224 | beruf==225 | beruf==231 | beruf==232 | beruf==233 | beruf==234 | beruf==235 /* */ | beruf==241 | beruf==242 | beruf==243 | beruf==244 | beruf==252 | beruf==263 | beruf==466 | beruf==301 | beruf==313 | beruf==321 | beruf==322 /* */ | beruf==323 | beruf==332 | beruf==341 | beruf==342 | beruf==343 | beruf==345 | beruf==346 | beruf==344 | beruf==352 | beruf==353 | beruf==354 /* */ | beruf==357 | beruf==355 | beruf==356 | beruf==361 | beruf==362 | beruf==371 | beruf==373 | beruf==375 | beruf==376 | beruf==377 | beruf==402 /* */ | beruf==403 | beruf==412 | beruf==431 | beruf==432 | beruf==423 | beruf==424 | beruf==433 | beruf==442 | beruf==452 | beruf==453 | beruf==461 /* */ | beruf==462 | beruf==463 | beruf==465 | beruf==470 | beruf==471 | beruf==472 | beruf==482 | beruf==486 | beruf==504 | beruf==512 | beruf==513 /* */ | beruf==514 | beruf==521 | beruf==522 | beruf==531 | beruf==543 | beruf==547 | beruf==548 | beruf==544 | beruf==545 | beruf==546 | beruf==549 replace occ_1=3 if beruf==134 | beruf==142 | beruf==144 | beruf==163 | beruf==171 | beruf==172 | beruf==173 | beruf==174 | beruf==175 | beruf==201 | beruf==202 /* */ | beruf==221 | beruf==291 | beruf==251 | beruf==271 | beruf==261 | beruf==272 | beruf==262 | beruf==464 | beruf==273 | beruf==274 | beruf==275 /* */ | beruf==281 | beruf==282 | beruf==283 | beruf==284 | beruf==285 | beruf==286 | beruf==302 | beruf==305 | beruf==306 | beruf==311 | beruf==312 /* */ | beruf==314 | beruf==315 | beruf==331 | beruf==351 | beruf==492 | beruf==372 | beruf==374 | beruf==378 | beruf==391 | beruf==392 | beruf==401 /* */ | beruf==411 | beruf==421 | beruf==422 | beruf==441 | beruf==451 | beruf==481 | beruf==483 | beruf==484 | beruf==485 | beruf==491 | beruf==501 /* */ | beruf==502 | beruf==503 | beruf==511 | beruf==541 | beruf==542 replace occ_1=4 if beruf==303 | beruf==304 | beruf==632 | beruf==625 | beruf==621 | beruf==622 | beruf==623 | beruf==624 | beruf==626 | beruf==627 | beruf==628 /* */ | beruf==629 | beruf==631 | beruf==633 | beruf==634 | beruf==635 | beruf==721 | beruf==722 | beruf==733 | beruf==857 | beruf==32 | beruf==52 /* */ | beruf==601 | beruf==602 | beruf==603 | beruf==604 | beruf==605 | beruf==606 | beruf==607 | beruf==611 | beruf==612 | beruf==726 | beruf==883 replace occ_1=5 if beruf==688 | beruf==685 | beruf==686 | beruf==706 | beruf==713 | beruf==714 | beruf==715 | beruf==716 | beruf==723 | beruf==724 | beruf==725 /* */ | beruf==741 | beruf==742 | beruf==743 | beruf==744 | beruf==791 | beruf==792 | beruf==793 | beruf==794 | beruf==805 | beruf==834 | beruf==838 /* */ | beruf==911 | beruf==912 | beruf==913 | beruf==923 | beruf==931 | beruf==932 | beruf==933 | beruf==934 | beruf==937 | beruf==935 | beruf==936 replace occ_1=6 if beruf==684 | beruf==704 | beruf==705 | beruf==711 | beruf==712 | beruf==812 | beruf==801 | beruf==802 | beruf==803 | beruf==804 | beruf==814 /* */ | beruf==831 | beruf==832 | beruf==833 | beruf==835 | beruf==836 | beruf==837 | beruf==851 | beruf==852 | beruf==854 | beruf==855 | beruf==856 /* */ | beruf==892 | beruf==893 | beruf==901 | beruf==902 | beruf==921 | beruf==922 replace occ_1=7 if beruf==821 | beruf==822 | beruf==823 | beruf==853 | beruf==861 | beruf==862 | beruf==864 | beruf==863 | beruf==873 | beruf==874 | beruf==875 /* */ | beruf==876 | beruf==877 | beruf==813 | beruf==841 | beruf==842 | beruf==843 | beruf==844 | beruf==871 | beruf==872 | beruf==881 | beruf==882 /* */ | beruf==891 replace occ_1=8 if beruf==682 | beruf==687 | beruf==731 | beruf==732 | beruf==734 | beruf==773 | beruf==782 | beruf==783 | beruf==784 replace occ_1=9 if beruf==31 | beruf==681 | beruf==683 | beruf==691 | beruf==692 | beruf==693 | beruf==694 | beruf==701 | beruf==702 | beruf==703 | beruf==771 /* */ | beruf==772 | beruf==774 | beruf==781 | beruf==751 | beruf==752 | beruf==753 | beruf==761 | beruf==762 | beruf==763 xi, prefix(oc) i.occ_1 capture drop occ_0 gen byte occ_0=. replace occ_0=0 if occ_1==2 | occ_1==5 | occ_1==8 replace occ_0=1 if occ_1==3 | occ_1==4 | occ_1==6 | occ_1==7 | occ_1==9 * Number graduates sort betnr capture drop az_grad capture drop az_grad2 by betnr: gen az_grad2=_n by betnr: egen az_grad=max(az_grad2) capture drop az_grad2 * Mean dur_leh_fp by aab capture drop mean_leh_fp bysort aab: egen mean_leh_fp=mean(dur_leh_fp) /* */ if dur_leh_sp!=. & cohort!=. & alter!=. & tentgelth!=. & wzgr!=. & az_ges!=. & te_med!=. & occ_1!=. & aab!="" & alq_end_fp!=. & alq!=. /* */ & schliessung!=. & betnr!=. sum mean_leh_fp, d replace mean_leh_fp=(az_ges+1)/az_ges*mean_leh_fp-1/az_ges*dur_leh_fp sum mean_leh_fp, d di _N * Estimations *------------------------------------------------------------------------------------------------------------------------* *------------------------------------------------------------------------------------------------------------------------* *------------------------------------------------------------------------------------------------------------------------* estimates clear *** dependent variable: cap drop learnh_r_sp gen learnh_r_sp = ln(ytentgelth_real_sp) /* revise: restrict to baseline estimation sample */ *Baseline regression: OLS, controls + fe(district at graduation) regress learnh_r_sp dur_leh_fp /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if end_app == 1, cluster(bnr_ano) di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' keep if e(sample) di _N ** TABLE III *(1) OLS, no controls regress learnh_r_sp dur_leh_fp if end_app == 1, cluster(bnr_ano) est store learn_nocon di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' *(2) OLS, controls + fe(district at graduation) regress learnh_r_sp dur_leh_fp /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if end_app == 1, cluster(bnr_ano) est store learn_con_gdfe di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' *(3) OLS, controls + fe(training firm) xtreg learnh_r_sp dur_leh_fp /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// alq_end_fp /// if end_app == 1, fe i(bnr_ano) cluster(bnr_ano) est store learn_con_tffe di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' *(4) OLS, controls + fe(training firm) | large training firm xtreg learnh_r_sp dur_leh_fp /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// alq_end_fp /// if end_app == 1 & az_ges>=50 & az_grad>=5, fe i(bnr_ano) cluster(bnr_ano) est store learn_con_tffe_lf di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' *(6) restrict to individuals with dur_leh_8 == 0 *OLS, controls + fe(training firm) xtreg learnh_r_sp dur_leh_fp /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// alq_end_fp /// if end_app == 1 & dur_leh_8 == 0, fe i(bnr_ano) cluster(bnr_ano) di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' *********************************************************************************************** ** repeat OLS for sample with zero prime-age unemplyoment *(5) OLS, controls + fe(training firm) xtreg learnh_r_sp dur_leh_fp /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// alq_end_fp /// if end_app == 1 & dur_leh_sp == 0, fe i(bnr_ano) cluster(bnr_ano) est store learn_con_tffe_puz di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' ** TABLE IV *********************************************************************************************** *** instrumentation with plant closure of training firm at graduation ** How many displaced? tab schliessung cap drop large_tf gen large_tf = az_ges >= 50 & az_grad >= 5 tab schliessung if large_tf == 1 tab schliessung if large_tf == 0 tab schliessung if az_ges < 50 & az_grad < 5 tab schliessung if large_tf == 1 & traindur_main_empcon >= 730 & traindur_main_empcon <. tab schliessung if large_tf == 0 & traindur_main_empcon >= 730 & traindur_main_empcon <. tab schliessung if az_ges < 50 & az_grad < 5 & traindur_main_empcon >= 730 & traindur_main_empcon <. *(1) IV no controls ivregress gmm learnh_r_sp (dur_leh_fp=schliessung) /// if end_app == 1, cluster(bnr_ano) first igmm est store learn_nocon_pc di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' estat firststage estat endogenous *reduced form regress learnh_r_sp schliessung /// if e(sample), cluster(bnr_ano) *(2) IV + controls + districtFE ivregress gmm learnh_r_sp (dur_leh_fp=schliessung) /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if end_app == 1, cluster(bnr_ano) first igmm est store learn_con_gdfe_pc di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' estat firststage estat endogenous *reduced form regress learnh_r_sp schliessung /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if e(sample), cluster(bnr_ano) *(3) IV + controls + districtFE | traindur_main_empcon>2y ivregress gmm learnh_r_sp (dur_leh_fp=schliessung) /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if end_app == 1 & traindur_main_empcon >= 730, cluster(bnr_ano) first igmm est store learn_con_gdfe_oe2y_pc di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' estat firststage estat endogenous *reduced form regress learnh_r_sp schliessung /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if e(sample), cluster(bnr_ano) *OLS version of second stage regress learnh_r_sp dur_leh_fp /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if end_app == 1 & traindur_main_empcon >= 730 & e(sample), cluster(bnr_ano) di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' *(4) IV controls + districtFE | traindur>2y | large training firm ivregress gmm learnh_r_sp (dur_leh_fp=schliessung) /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if end_app == 1 & traindur_main_empcon >= 730 & az_ges>=50 & az_grad>=5, cluster(bnr_ano) first igmm est store learn_con_gdfe_oe2y_lf_pc di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' estat firststage estat endogenous *reduced form regress learnh_r_sp schliessung /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if e(sample), cluster(bnr_ano) *OLS version of second stage regress learnh_r_sp dur_leh_fp /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if end_app == 1 & traindur_main_empcon >= 730 & az_ges>=50 & az_grad>=5 & e(sample), cluster(bnr_ano) di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' *(5) IV controls + districtFE | traindur>2y | small training firm ivregress gmm learnh_r_sp (dur_leh_fp=schliessung) /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if end_app == 1 & traindur_main_empcon >= 730 & az_ges<50 & az_grad<5, cluster(bnr_ano) first igmm est store learn_con_gdfe_oe2y_sf_pc di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' estat firststage estat endogenous *reduced form regress learnh_r_sp schliessung /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if e(sample), cluster(bnr_ano) *OLS version of second stage regress learnh_r_sp dur_leh_fp /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if end_app == 1 & traindur_main_empcon >= 730 & az_ges<50 & az_grad<5 & e(sample), cluster(bnr_ano) di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' ** instrumentation with plant closure of training firm | direct change of employer during early career su betw_dir_fp ,d su betw_dir_fp if schliessung == 1,d su betw_dir_fp if schliessung == 0,d su betw_indir_fp ,d su betw_indir_fp if schliessung == 1,d su betw_indir_fp if schliessung == 0,d cap drop betw_dir_fp_d gen betw_dir_fp_d = betw_dir_fp > 0 & betw_dir_fp <. su betw_dir_fp_d su betw_dir_fp_d if schliessung == 1 su betw_dir_fp_d if schliessung == 0 tab betw_dir_fp_d schliessung *(6) IV controls + districtFE | traindur_main_empcon>2y ivregress gmm learnh_r_sp (dur_leh_fp=schliessung) /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if end_app == 1 & traindur_main_empcon >= 730 & betw_dir_fp_d == 1, cluster(bnr_ano) first igmm est store learn_con_gdfe_oe2y_pc_dc di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' estat firststage estat endogenous *reduced form regress learnh_r_sp schliessung /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if e(sample), cluster(bnr_ano) *OLS version of second stage regress learnh_r_sp dur_leh_fp /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if e(sample), cluster(bnr_ano) di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' ** instrumentation with plant closure of training firm | unemployment between plant close and first job * additional descriptives concerning layoffs *time until re-employment *all firms centile disp_ini_U if end_app == 1 & schliessung == 1, c(1(1)100) su disp_ini_U if end_app == 1 & schliessung == 1, d centile disp_timetobeh if end_app == 1 & schliessung == 1, c(1(1)100) su disp_timetobeh if end_app == 1 & schliessung == 1, d *large firms centile disp_ini_U if end_app == 1 & schliessung == 1 & az_ges>=50 & az_grad>=5, c(1(1)100) su disp_ini_U if end_app == 1 & schliessung == 1 & az_ges>=50 & az_grad>=5, d centile disp_timetobeh if end_app == 1 & schliessung == 1 & az_ges>=50 & az_grad>=5, c(1(1)100) su disp_timetobeh if end_app == 1 & schliessung == 1 & az_ges>=50 & az_grad>=5, d *small firms centile disp_ini_U if end_app == 1 & schliessung == 1 & az_ges<50 & az_grad<5, c(1(1)100) su disp_ini_U if end_app == 1 & schliessung == 1 & az_ges<50 & az_grad<5, d centile disp_timetobeh if end_app == 1 & schliessung == 1 & az_ges<50 & az_grad<5, c(1(1)100) su disp_timetobeh if end_app == 1 & schliessung == 1 & az_ges<50 & az_grad<5, d cap drop temp_keep gen temp_keep = . replace temp_keep = 1 if schliessung == 0 replace temp_keep = 1 if schliessung == 1 & disp_ini_U > 0 & disp_ini_U <. *(7) IV controls + fe(district at graduation) | traindur_main_empcon>2y | initial unemployment ivregress gmm learnh_r_sp (dur_leh_fp=schliessung) /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if end_app == 1 & traindur_main_empcon >= 730 & temp_keep == 1, cluster(bnr_ano) first igmm est store learn_con_gdfe_oe2y_pc_dc di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' estat firststage estat endogenous *reduced form regress learnh_r_sp schliessung /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if e(sample), cluster(bnr_ano) *OLS version of second stage regress learnh_r_sp dur_leh_fp /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if e(sample), cluster(bnr_ano) di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' ** control absence of intial unemployment if displaced instead of exclusion (gives very similar result) cap drop disp_no_ini_U gen disp_no_ini_U = 0 replace disp_no_ini_U = 1 if schliessung == 1 & disp_ini_U == 0 ivregress gmm learnh_r_sp (dur_leh_fp=schliessung) /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// disp_no_ini_U /// if end_app == 1 & traindur_main_empcon >= 730, cluster(bnr_ano) first igmm di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' estat firststage estat endogenous *reduced form regress learnh_r_sp schliessung /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// disp_no_ini_U /// if e(sample), cluster(bnr_ano) *OLS version of second stage regress learnh_r_sp dur_leh_fp /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// disp_no_ini_U /// if e(sample), cluster(bnr_ano) di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' **OLS including prime-age unemployment *(2.2) OLS, controls + fe(training firm) + prime-age unemployment xtreg learnh_r_sp dur_leh_fp /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// alq_end_fp /// dur_leh_sp /// if end_app == 1, fe i(bnr_ano) cluster(bnr_ano) di "Marginal effect at one year of youth unemployment:" local me_oy = (exp(_b[dur_leh_fp]*365)-1)*100 di `me_oy' *** DESCRIPTIVES **early-career unemployment and prime-age income distributions centile dur_leh_fp if end_app == 1, c(0(5)100) centile ytentgelth_real_sp if end_app == 1, c(0(5)100) su dur_leh_fp if end_app == 1 su ytentgelth_real_sp if end_app == 1 ** FIGURE 2: empirical cumulative distribution function: ytentgelth_real_sp sort ytentgelth_real_sp cap drop yhr_sp_cumul cumul ytentgelth_real_sp if end_app == 1, g(yhr_sp_cumul) cap drop yhr_sp_mio gen yhr_sp_mio = ytentgelth_real_sp/1000000 local graphname = "$graph"+"\"+"$name"+"_ytentgelth_real_sp_cumul2" twoway (line yhr_sp_cumul yhr_sp_mio if end_app == 1, lc(black) lw(medthick)) /// , ytick(0(0.1)1) xtick(0(0.25)2.5) /// ylab(0(0.1)1, grid glc(gs10) glw(vvthin)) xlab(0(0.25)2.5, grid glc(gs10) glw(vvthin)) /// ytit(Cumulative Distribution) /// xtit(Prime-age Earnings (in Mio Euro)) /// legend(off) /// graphregion(c(white)) /// name("ytentgelth_real_sp_cumul", replace) /// saving("`graphname'.gph", replace) graph export "`graphname'.wmf", replace drop yhr_sp_mio yhr_sp_cumul ** FIGURE 1: empirical cumulative distribution function: dur_leh_fp sort dur_leh_fp cap drop leh_fp_cumul cumul dur_leh_fp if end_app == 1, g(leh_fp_cumul) local graphname = "$graph"+"\"+"$name"+"_dur_leh_fp_cumul2" twoway (line leh_fp_cumul dur_leh_fp if end_app == 1, lc(black) lw(medthick)) /// , ytick(0(0.1)1) xtick(#14) /// ylab(0(0.1)1, grid glc(gs10) glw(vvthin)) xlab(#14, grid glc(gs10) glw(vvthin) alternate) /// ytit(Cumulative Distribution) /// xtit(Early-career Unemployment (in Days)) /// legend(off) /// graphregion(c(white)) /// name("dur_leh_fp_cumul", replace) /// saving("`graphname'.gph", replace) graph export "`graphname'.wmf", replace drop leh_fp_cumul ** TABLE II: Prime-age earnings by early-career unemployment **define groups by early-career unemployment cap drop quant_leh_fp pctile quant_leh_fp = dur_leh_fp if end_app == 1, nquantiles(20) local ecu_p50 = quant_leh_fp[10] local ecu_p60 = quant_leh_fp[12] local ecu_p70 = quant_leh_fp[14] local ecu_p80 = quant_leh_fp[16] local ecu_p90 = quant_leh_fp[18] local ecu_p95 = quant_leh_fp[19] su dur_leh_fp if end_app == 1 local ecu_max = `r(max)' cap drop group_leh_fp gen group_leh_fp = 1 if dur_leh_fp >= 0 & dur_leh_fp <= `ecu_p50' replace group_leh_fp = 2 if dur_leh_fp > `ecu_p50' & dur_leh_fp <= `ecu_p60' replace group_leh_fp = 3 if dur_leh_fp > `ecu_p60' & dur_leh_fp <= `ecu_p70' replace group_leh_fp = 4 if dur_leh_fp > `ecu_p70' & dur_leh_fp <= `ecu_p80' replace group_leh_fp = 5 if dur_leh_fp > `ecu_p80' & dur_leh_fp <= `ecu_p90' replace group_leh_fp = 6 if dur_leh_fp > `ecu_p90' & dur_leh_fp <= `ecu_p95' replace group_leh_fp = 7 if dur_leh_fp > `ecu_p95' & dur_leh_fp <= `ecu_max' tab quant_leh_fp if end_app == 1 tab group_leh_fp if end_app == 1 drop quant_leh_fp cap label drop group_leh_fp label def group_leh_fp 1 "[0-`ecu_p50']" 2 "]`ecu_p50'-`ecu_p60']" 3 "]`ecu_p60'-`ecu_p70']" 4 "]`ecu_p70'-`ecu_p80']" 5 "]`ecu_p80'-`ecu_p90']" 6 "]`ecu_p90'-`ecu_p95']" 7 "]`ecu_p95'-`ecu_max']" label val group_leh_fp group_leh_fp su ytentgelth_real_sp if end_app == 1 table group_leh_fp if end_app == 1, c(freq mean ytentgelth_real_sp sd ytentgelth_real_sp) *** How many stayers (same firm at graduation as in the first employment spell in prime age) are there? di "numbers of stayers :" count if first_bnr_sp == bnr_ano di "proportion of stayers :" di r(N)/_N *** TABLE V: Effects across the uncondtional distribution of prime-age unemployment, also depending on the duration of early-career unemployment set seed 12345 **full sample, controls + dd mat rif_bs_condd_fsa = J(9,2,.) mat rownames rif_bs_condd_fsa = "q10" "q20" "q30" "q40" "q50" "q60" "q70" "q80" "q90" mat colnames rif_bs_condd_fsa = "coeff" "se" mat rif_ci_condd_fsa = J(9,2,.) mat rownames rif_ci_condd_fsa = "q10" "q20" "q30" "q40" "q50" "q60" "q70" "q80" "q90" mat colnames rif_ci_condd_fsa = "ci_l" "ci_u" adopath++ $ado which rifreg set matsize 10000 foreach q of numlist 10(10)90{ local row = `q'/10 rifreg learnh_r_sp dur_leh_fp /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if end_app == 1, q(`q') boo reps(500) mat rif_bs_condd_fsa[`row',1] = _b[dur_leh_fp] mat rif_bs_condd_fsa[`row',2] = _se[dur_leh_fp] mat rif_ci_condd_fsa[`row',1] = _b[dur_leh_fp]-_se[dur_leh_fp]*2.576 mat rif_ci_condd_fsa[`row',2] = _b[dur_leh_fp]+_se[dur_leh_fp]*2.576 } mat list rif_bs_condd_fsa mat list rif_ci_condd_fsa cap drop rif_bs_condd_fsa* cap drop rif_ci_condd_fsa* svmat rif_bs_condd_fsa svmat rif_ci_condd_fsa cap drop counter gen counter = _n*10 if rif_bs_condd_fsa1 <. local graphname = "$graph"+"\"+"$name"+"_rif_condd_fsa_bs500" twoway (connect rif_bs_condd_fsa1 counter, m(O) mc(black) mfc(midblue) lc(black) lw(thin) msize(medsmall)) /// (line rif_ci_condd_fsa1 counter, lp(shortdash) lc(black)) /// (line rif_ci_condd_fsa2 counter, lp(shortdash) lc(black)) /// , xtick(10(10)90) xlab(10(10)90) ylab(0(0.0005)-0.003) /// yline(0, lc(black)) /// ytit(Unconditional Quantile Partial Effect) /// xtit(Unconditional Prime-Age Earnings Quantile) /// legend(off) /// name("rif_condd_fsa_bs500", replace) /// saving("`graphname'.gph", replace) graph export "`graphname'.wmf", replace ** TABLE VIII: Effects across the condtional distribution of prime-age unemployment set seed 12345 version 13.1 **full sample, controls, no dd mat sqr_bs_condd_fsa = J(2,9,.) mat colnames sqr_bs_condd_fsa = "q10" "q20" "q30" "q40" "q50" "q60" "q70" "q80" "q90" mat rownames sqr_bs_condd_fsa = "coeff" "se" set matsize 10000 sqreg learnh_r_sp dur_leh_fp /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// alq_end_fp /// if end_app == 1, q(10 20 30 40 50 60 70 80 90) reps(500) foreach p of numlist 10(10)90{ local col = `p'/10 mat sqr_bs_condd_fsa[1,`col'] = _b[q`p': dur_leh_fp] mat sqr_bs_condd_fsa[2,`col'] = _se[q`p': dur_leh_fp] } mat list sqr_bs_condd_fsa *** Effects across the uncondtional distribution of prime-age unemployment, no prime-age U set seed 12345 **full sample, controls + dd mat rif_bs_condd_fsb = J(9,2,.) mat rownames rif_bs_condd_fsb = "q10" "q20" "q30" "q40" "q50" "q60" "q70" "q80" "q90" mat colnames rif_bs_condd_fsb = "coeff" "se" mat rif_ci_condd_fsb = J(9,2,.) mat rownames rif_ci_condd_fsb = "q10" "q20" "q30" "q40" "q50" "q60" "q70" "q80" "q90" mat colnames rif_ci_condd_fsb = "ci_l" "ci_u" adopath++ $ado which rifreg set matsize 10000 foreach q of numlist 10(10)90{ local row = `q'/10 rifreg learnh_r_sp dur_leh_fp /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if end_app == 1 & dur_leh_sp == 0, q(`q') boo reps(500) mat rif_bs_condd_fsb[`row',1] = _b[dur_leh_fp] mat rif_bs_condd_fsb[`row',2] = _se[dur_leh_fp] mat rif_ci_condd_fsb[`row',1] = _b[dur_leh_fp]-_se[dur_leh_fp]*2.576 mat rif_ci_condd_fsb[`row',2] = _b[dur_leh_fp]+_se[dur_leh_fp]*2.576 } mat list rif_bs_condd_fsb mat list rif_ci_condd_fsb cap drop rif_bs_condd_fsb* cap drop rif_ci_condd_fsb* svmat rif_bs_condd_fsb svmat rif_ci_condd_fsb cap drop counter gen counter = _n*10 if rif_bs_condd_fsb1 <. local graphname = "$graph"+"\"+"$name"+"_rif_condd_fsb_bs500" twoway (connect rif_bs_condd_fsb1 counter, m(O) mc(black) mfc(midblue) lc(black) lw(thin) msize(medsmall)) /// (line rif_ci_condd_fsb1 counter, lp(shortdash) lc(black)) /// (line rif_ci_condd_fsb2 counter, lp(shortdash) lc(black)) /// , xtick(10(10)90) xlab(10(10)90) ylab(0(0.0005)-0.003) /// yline(0, lc(black)) /// ytit(Unconditional Quantile Partial Effect) /// xtit(Unconditional Prime-Age Earnings Quantile) /// legend(off) /// name("rif_condd_fsb_bs500", replace) /// saving("`graphname'.gph", replace) graph export "`graphname'.wmf", replace ***FIGURE 3: add dur_leh_fp squared cap drop dur_leh_fp_sq gen dur_leh_fp_sq = dur_leh_fp*dur_leh_fp **full sample, controls + dd mat rif_bs_condd_fs = J(9,4,.) mat rownames rif_bs_condd_fs = "q10" "q20" "q30" "q40" "q50" "q60" "q70" "q80" "q90" mat colnames rif_bs_condd_fs = "coeff" "se" "coeff_sq" "se_sq" mat rif_ci_condd_fs = J(9,4,.) mat rownames rif_ci_condd_fs = "q10" "q20" "q30" "q40" "q50" "q60" "q70" "q80" "q90" mat colnames rif_ci_condd_fs = "ci_l" "ci_u" "ci_l_sq" "ci_u_sq" adopath++ $ado which rifreg set matsize 10000 foreach q of numlist 10(10)90{ local row = `q'/10 rifreg learnh_r_sp dur_leh_fp /// dur_leh_fp_sq /// cohort_1979 cohort_1980 /// alter /// tentgelth /// wzwzgr_* /// az_ges /// te_med /// ococc_1_* /// aaaab_* /// alq_end_fp /// if end_app == 1, q(`q') boo reps(500) mat rif_bs_condd_fs[`row',1] = _b[dur_leh_fp] mat rif_bs_condd_fs[`row',2] = _se[dur_leh_fp] mat rif_bs_condd_fs[`row',3] = _b[dur_leh_fp_sq] mat rif_bs_condd_fs[`row',4] = _se[dur_leh_fp_sq] mat rif_ci_condd_fs[`row',1] = _b[dur_leh_fp]-_se[dur_leh_fp]*2.576 mat rif_ci_condd_fs[`row',2] = _b[dur_leh_fp]+_se[dur_leh_fp]*2.576 mat rif_ci_condd_fs[`row',3] = _b[dur_leh_fp_sq]-_se[dur_leh_fp_sq]*2.576 mat rif_ci_condd_fs[`row',4] = _b[dur_leh_fp_sq]+_se[dur_leh_fp_sq]*2.576 } mat list rif_bs_condd_fs mat list rif_ci_condd_fs cap drop dur_leh_fp_run gen dur_leh_fp_run = _n if _n <=1500 cap drop dur_leh_fp_run_sq gen dur_leh_fp_run_sq = _n^2 if _n <=1500 cap drop scarfct_* foreach q of numlist 10(10)90{ local row = `q'/10 gen scarfct_q`q' = rif_bs_condd_fs[`row',1]*dur_leh_fp_run+rif_bs_condd_fs[`row',3]*dur_leh_fp_run_sq } cap drop scarfct_llp1_* foreach q of numlist 10(10)90{ local row = `q'/10 gen scarfct_llp1_q`q' = rif_ci_condd_fs[`row',1]*dur_leh_fp_run+rif_ci_condd_fs[`row',3]*dur_leh_fp_run_sq } cap drop scarfct_ulp1_* foreach q of numlist 10(10)90{ local row = `q'/10 gen scarfct_ulp1_q`q' = rif_ci_condd_fs[`row',2]*dur_leh_fp_run+rif_ci_condd_fs[`row',4]*dur_leh_fp_run_sq } local graphname = "$graph"+"\"+"$name"+"_rif_condd_sq_bs500_corr" twoway (rarea scarfct_ulp1_q10 scarfct_llp1_q10 dur_leh_fp_run, fcol(gs10) lw(none) pstyle(ci) cmissing(y) nodropbase) /// (rarea scarfct_ulp1_q20 scarfct_llp1_q20 dur_leh_fp_run, fcol(gs10) lw(none) pstyle(ci) cmissing(y) nodropbase) /// (rarea scarfct_ulp1_q30 scarfct_llp1_q30 dur_leh_fp_run, fcol(gs10) lw(none) pstyle(ci) cmissing(y) nodropbase) /// (rarea scarfct_ulp1_q50 scarfct_llp1_q50 dur_leh_fp_run, fcol(gs10) lw(none) pstyle(ci) cmissing(y) nodropbase) /// (rarea scarfct_ulp1_q90 scarfct_llp1_q90 dur_leh_fp_run, fcol(gs10) lw(none) pstyle(ci) cmissing(y) nodropbase) /// (line scarfct_q10 dur_leh_fp_run, lc(gs4) lw(medium) lp(dot)) /// (line scarfct_q20 dur_leh_fp_run, lc(gs4) lw(medium) lp(dash)) /// (line scarfct_q30 dur_leh_fp_run, lc(gs4) lw(medium) lp(shortdash_dot)) /// (line scarfct_q50 dur_leh_fp_run, lc(gs4) lw(medium) lp(longdash_dot)) /// (line scarfct_q90 dur_leh_fp_run, lc(gs4) lw(medium) lp(solid)), /// xtit("Early-career Unemployment") /// ytit("Prime-age Earnings") /// xtick(0(250)1500) xlabel(0(250)1500) /// scale(.8) /// graphregion(c(white)) /// legend(label(6 "First Decile") label(7 "Second Decile") label(8 "Third Decile") label(9 "Median") /// label(10 "Ninth Decile") order(6 7 8 9 10) row(2)) /// saving("`graphname'.gph", replace) graph export "`graphname'.png", replace cap drop rif_bs_condd_fs* cap drop rif_ci_condd_fs* svmat rif_bs_condd_fs svmat rif_ci_condd_fs cap drop counter gen counter = _n*10 if rif_bs_condd_fs1 <. local graphname = "$graph"+"\"+"$name"+"_rif_condd_fs_bs500" twoway (connect rif_bs_condd_fs1 counter, m(O) mc(black) mfc(midblue) lc(black) lw(thin) msize(medsmall)) /// (line rif_ci_condd_fs1 counter, lp(shortdash) lc(black)) /// (line rif_ci_condd_fs2 counter, lp(shortdash) lc(black)) /// , xtick(10(10)90) xlab(10(10)90) ylab(0(0.0005)-0.003) /// yline(0, lc(black)) /// ytit(Unconditional Quantile Partial Effect) /// xtit(Unconditional Prime-Age Earnings Quantile) /// legend(off) /// name("rif_condd_fs_bs500", replace) /// saving("`graphname'.gph", replace) graph export "`graphname'.wmf", replace log close clear all exit