************************************ *****Aufbereitung BHP Daten********* *****2000 bis 2006****************** ************************************ *set mem 500m log using log\26_Aufbereitung_BHP_Daten.log, replace ************************************** ********* Welle 2000 ***************** ************************************** use orig\liab_LM2_2007_v1_bhp_7508_m06_bst_v1_2000.dta,clear *use bhp_7508_m06_bst_v1_2000_gast.dta, clear keep betnr w03_3 az_ges az_ges_vz az_15_19 az_20_24 az_25_29 az_30_34 az_35_39 az_40_44 az_45_49 az_50_54 az_55_59 az_60_64 az_ab65 az_az_pers te_p25 te_med te_p75 te_p25_gq te_med_gq te_p75_gq te_p25_mq te_med_mq te_p75_mq te_p25_hq te_med_hq te_p75_hq gen jahr=2000 compress save data\bhp_welle_2000.dta, replace clear ************************************** ********* Welle 2001 ***************** ************************************** use orig\liab_LM2_2007_v1_bhp_7508_m06_bst_v1_2001.dta,clear *use bhp_7508_m06_bst_v1_2001_gast.dta, clear keep betnr w03_3 az_ges az_ges_vz az_15_19 az_20_24 az_25_29 az_30_34 az_35_39 az_40_44 az_45_49 az_50_54 az_55_59 az_60_64 az_ab65 az_az_pers te_p25 te_med te_p75 te_p25_gq te_med_gq te_p75_gq te_p25_mq te_med_mq te_p75_mq te_p25_hq te_med_hq te_p75_hq gen jahr=2001 compress save data\bhp_welle_2001.dta, replace clear ************************************** ********* Welle 2002 ***************** ************************************** use orig\liab_LM2_2007_v1_bhp_7508_m06_bst_v1_2002.dta,clear *use bhp_7508_m06_bst_v1_2002_gast.dta, clear keep betnr w03_3 az_ges az_ges_vz az_15_19 az_20_24 az_25_29 az_30_34 az_35_39 az_40_44 az_45_49 az_50_54 az_55_59 az_60_64 az_ab65 az_az_pers te_p25 te_med te_p75 te_p25_gq te_med_gq te_p75_gq te_p25_mq te_med_mq te_p75_mq te_p25_hq te_med_hq te_p75_hq gen jahr=2002 compress save data\bhp_welle_2002.dta, replace clear ************************************** ********* Welle 2003 ***************** ************************************** use orig\liab_LM2_2007_v1_bhp_7508_m06_bst_v1_2003.dta,clear *use bhp_7508_m06_bst_v1_2003_gast.dta, clear keep betnr w03_3 az_ges az_ges_vz az_15_19 az_20_24 az_25_29 az_30_34 az_35_39 az_40_44 az_45_49 az_50_54 az_55_59 az_60_64 az_ab65 az_az_pers te_p25 te_med te_p75 te_p25_gq te_med_gq te_p75_gq te_p25_mq te_med_mq te_p75_mq te_p25_hq te_med_hq te_p75_hq gen jahr=2003 compress save data\bhp_welle_2003.dta, replace clear ************************************** ********* Welle 2004 ***************** ************************************** use orig\liab_LM2_2007_v1_bhp_7508_m06_bst_v1_2004.dta,clear *use bhp_7508_m06_bst_v1_2004_gast.dta, clear keep betnr w03_3 az_ges az_ges_vz az_15_19 az_20_24 az_25_29 az_30_34 az_35_39 az_40_44 az_45_49 az_50_54 az_55_59 az_60_64 az_ab65 az_az_pers te_p25 te_med te_p75 te_p25_gq te_med_gq te_p75_gq te_p25_mq te_med_mq te_p75_mq te_p25_hq te_med_hq te_p75_hq gen jahr=2004 compress save data\bhp_welle_2004.dta, replace clear ************************************** ********* Welle 2005 ***************** ************************************** use orig\liab_LM2_2007_v1_bhp_7508_m06_bst_v1_2005.dta,clear *use bhp_7508_m06_bst_v1_2005_gast.dta, clear keep betnr w03_3 az_ges az_ges_vz az_15_19 az_20_24 az_25_29 az_30_34 az_35_39 az_40_44 az_45_49 az_50_54 az_55_59 az_60_64 az_ab65 az_az_pers te_p25 te_med te_p75 te_p25_gq te_med_gq te_p75_gq te_p25_mq te_med_mq te_p75_mq te_p25_hq te_med_hq te_p75_hq gen jahr=2005 compress save data\bhp_welle_2005.dta, replace clear ************************************** ********* Welle 2006 ***************** ************************************** use orig\liab_LM2_2007_v1_bhp_7508_m06_bst_v1_2006.dta,clear *use bhp_7508_m06_bst_v1_2006_gast.dta, clear keep betnr w03_3 az_ges az_ges_vz az_15_19 az_20_24 az_25_29 az_30_34 az_35_39 az_40_44 az_45_49 az_50_54 az_55_59 az_60_64 az_ab65 az_az_pers te_p25 te_med te_p75 te_p25_gq te_med_gq te_p75_gq te_p25_mq te_med_mq te_p75_mq te_p25_hq te_med_hq te_p75_hq gen jahr=2006 compress save data\bhp_welle_2006.dta, replace clear *********************************** ***Zusammenspielen der BHP-Daten*** *********************************** use data\bhp_welle_2000.dta local y=2006 while `y'>2000 { append using data\bhp_welle_`y'.dta local y=`y'-1 } ******************************* ***Weitere Datenaufbereitung*** ******************************* *************************** ***Erzeuge West Variable*** *************************** *replace ao_bula=. if ao_bula==.n | ao_bul==.z *gen west_bhp=1 if ao_bula<11 *replace west_bhp=0 if ao_bula>=11 *drop ao_bula *sum west_bhp ************************************ ***Dummy für Ausbildungsbetrieb***** ************************************ gen ausb_bet=1 if az_az_pers>0 replace ausb_bet=0 if az_az_pers==0 label var ausb_bet "=1 wenn min. ein Azubi in Jahr" egen ausb_bet_neu = max(ausb_bet), by(betnr) label var ausb_bet_neu "=1 wenn min. einmal ein Azubi" *********************************** ***Verdichte w03_3 zu 17 Gruppen*** *********************************** replace w03_3 = . if w03_3==.n | w03_3==.z gen w03_17 = 1 if w03_3<=20 replace w03_17 = 2 if w03_3==50 replace w03_17 = 3 if w03_3 >= 100 & w03_3<=142 replace w03_17 = 4 if w03_3 >= 151 & w03_3<=372 replace w03_17 = 5 if w03_3 >= 401 & w03_3<=410 replace w03_17 = 6 if w03_3 >= 451 & w03_3<=455 replace w03_17 = 7 if w03_3 >= 501 & w03_3<=526 replace w03_17 = 8 if w03_3 >= 551 & w03_3<=552 replace w03_17 = 9 if w03_3 >= 601 & w03_3<=642 replace w03_17 = 10 if w03_3 >= 651 & w03_3<=672 replace w03_17 = 11 if w03_3 >= 701 & w03_3<=749 replace w03_17 = 12 if w03_3 >= 751 & w03_3<=753 replace w03_17 = 13 if w03_3 >= 801 & w03_3<=809 replace w03_17 = 14 if w03_3 >= 851 & w03_3<=853 replace w03_17 = 15 if w03_3 >= 900 & w03_3<=930 replace w03_17 = 16 if w03_3 == 950 replace w03_17 = 17 if w03_3 == 990 ************************************************ ***übertrage Beobachtungen in frühere Jahre***** ************************************************ sort betnr egen w03_17_n = max(w03_17), by(betnr) compare w03_17 w03_17_n drop w03_17 rename w03_17_n w03_17 label define w03_17_lb 1 "Land- und Forstwirtschaft" 2 "Fischerei" 3 "Bergbau" 4 "Verarbeitendes Gewerbe" 5 "Energie- u. Wasserversorgung" /// 6 "Baugewerbe" 7 "Handel" 8 "Gastgewerbe" 9 "Verkehr und Nachrichtenübermittlung" 10 "Kredit-/Versicherung" 11 "Vermietung" /// 12 "Öffentliche Verwaltung" 13 "Erziehung/Unterricht" 14 "Erziehung/Sozialwesen" 15 "Dienstleistungen" 16 "Private Haushalte" /// 17 "Exterr. Körperschaften" /// label value w03_17 w03_17_lb *********************************** ***Dummies für Wirtschaftszweig**** *********************************** tab w03_17, gen(w03_17_) ******************************************* ***Erzeuge Größenklassen für Unternehmen*** ******************************************* replace az_ges=. if az_ges==.n | az_ges==.z gen groesse_bhp = 1 if az_ges<250 replace groesse_bhp = 2 if az_ges>=250 & az_ges<1000 replace groesse_bhp = 3 if az_ges>=1000 tab groesse_bhp, gen(groesse_bhp_) sum sort betnr jahr save data\bhp_panel.dta, replace log close