************************** ** Datenaufbereitung ** ************************** log using log\4_Datenaufbereitung.log, replace use data\LIAB_LV1_p2.dta compress ************************** *** Eintagesspells löschen ************************** drop if begepi==endepi ************************* ************************** *** Erzeuge Jahresdummies ************************** forvalues x = 1995/2006 { gen y`x'=(jahr==`x') } tab y1* tab y2* ************************* *** Erzeuge Bildungsinfo *** Brauchen wir später nicht - wir betrachten nur Gym! ************************* *Bildung; Referenzgruppe sind Personen ohne Berufsbildung /*gen school=ausbild==1|ausbild==3 /* ohne Berufsausbildung */ label var school "Keine Berufsausbildung" gen vocat=ausbild==2 /* Haupt/Real mit Berufsausbildung */ label var vocat "Haupt/Real mit Berufsausbildung" gen alec_voc=ausbild==4 /* Abi mit Berufsausbildung */ label var alec_voc "Abi mit Berufsausbildung" gen uni=ausbild==5|ausbild==6 /* Uni-Abschluss */ label var uni "Uni-Abschluss"*/ ************************* *** Alter ************************* gen alter = jahr-gebjahr drop gebjahr *** Personen unter 16 und über 66 Jahren raus drop if alter<=15 | alter>=66 gen alter2 = alter^2 ************************* *** Lohn ************************* gen lohn = tag_entg label var lohn "Bruttotageslohn" drop tag_entg ***************************** *** Beitragsbemessungsgrenzen ***************************** replace lohn=. if lohn<9.75 & jahr==1995 & west==1 replace lohn=. if lohn<9.89 & jahr==1996 & west==1 replace lohn=. if lohn<10.25 & jahr==1997 & west==1 replace lohn=. if lohn<10.42 & jahr==1998 & west==1 replace lohn=. if lohn<10.59 & jahr==1999 & west==1 replace lohn=. if lohn<10.56 & jahr==2000 & west==1 replace lohn=. if lohn<10.59 & jahr==2001 & west==1 replace lohn=. if lohn<10.68 & jahr==2002 & west==1 replace lohn=. if lohn<13.15 & jahr==2003 & west==1 replace lohn=. if lohn<13.11 & jahr==2004 & west==1 replace lohn=. if lohn<13.15 & jahr==2005 & west==1 replace lohn=. if lohn<13.15 & jahr==2006 & west==1 replace lohn=. if lohn<7.90 & jahr==1995 & west==0 replace lohn=. if lohn<8.38 & jahr==1996 & west==0 replace lohn=. if lohn<8.74 & jahr==1997 & west==0 replace lohn=. if lohn<8.74 & jahr==1998 & west==0 replace lohn=. if lohn<10.59 & jahr==1999 & west==0 replace lohn=. if lohn<10.56 & jahr==2000 & west==0 replace lohn=. if lohn<10.59 & jahr==2001 & west==0 replace lohn=. if lohn<10.68 & jahr==2002 & west==0 replace lohn=. if lohn<13.15 & jahr==2003 & west==0 replace lohn=. if lohn<13.11 & jahr==2004 & west==0 replace lohn=. if lohn<13.15 & jahr==2005 & west==0 replace lohn=. if lohn<13.15 & jahr==2006 & west==0 replace lohn=. if lohn>131.12 & jahr==1995 & west==1 replace lohn=. if lohn>134.11 & jahr==1996 & west==1 replace lohn=. if lohn>137.84 & jahr==1997 & west==1 replace lohn=. if lohn>141.20 & jahr==1998 & west==1 replace lohn=. if lohn>142.88 & jahr==1999 & west==1 replace lohn=. if lohn>144.17 & jahr==2000 & west==1 replace lohn=. if lohn>146.24 & jahr==2001 & west==1 replace lohn=. if lohn>147.95 & jahr==2002 & west==1 replace lohn=. if lohn>167.67 & jahr==2003 & west==1 replace lohn=. if lohn>168.85 & jahr==2004 & west==1 replace lohn=. if lohn>170.96 & jahr==2005 & west==1 replace lohn=. if lohn>172.60 & jahr==2006 & west==1 replace lohn=. if lohn>172.60 & jahr==2007 & west==1 replace lohn=. if lohn>107.58 & jahr==1995 & west==0 replace lohn=. if lohn>113.99 & jahr==1996 & west==0 replace lohn=. if lohn>119.35 & jahr==1997 & west==0 replace lohn=. if lohn>117.67 & jahr==1998 & west==0 replace lohn=. if lohn>121.03 & jahr==1999 & west==0 replace lohn=. if lohn>119.02 & jahr==2000 & west==0 replace lohn=. if lohn>122.71 & jahr==2001 & west==0 replace lohn=. if lohn>123.29 & jahr==2002 & west==0 replace lohn=. if lohn>139.73 & jahr==2003 & west==0 replace lohn=. if lohn>142.62 & jahr==2004 & west==0 replace lohn=. if lohn>144.66 & jahr==2005 & west==0 replace lohn=. if lohn>144.66 & jahr==2006 & west==0 ********************* *** Arbeitslose raus* ********************* replace lohn=. if leistart==1 | leistart==2 ********************* *** Inflationsbereinigung mit Basisjahr 2005 (StaBu Verbraucherpreisindex) ******************** replace lohn = lohn/0.871 if jahr==1995 replace lohn = lohn/0.883 if jahr==1996 replace lohn = lohn/0.900 if jahr==1997 replace lohn = lohn/0.909 if jahr==1998 replace lohn = lohn/0.914 if jahr==1999 replace lohn = lohn/0.927 if jahr==2000 replace lohn = lohn/0.945 if jahr==2001 replace lohn = lohn/0.959 if jahr==2002 replace lohn = lohn/0.969 if jahr==2003 replace lohn = lohn/0.985 if jahr==2004 replace lohn = lohn/1.016 if jahr==2006 ********************* *** Dummies für Stellung im Beruf *** Diese Info brauchen wir später nicht - raus! ********************* *gen trainee=berstell==0 *gen unskil=berstell==1 *gen blue=berstell==2 *gen mastercraft=berstell==3 *gen white=berstell==4 gen homew=berstell==7 gen partt1=berstell==8 gen partt2=berstell==9 *Lohn von Teilzeitbeschäftigten und Heimarbeitern auf missing setzen replace lohn=. if homew==1 replace lohn=. if partt1==1 replace lohn=. if partt2==1 drop homew partt1 partt2 *********************** ***** Umkodierung Geschlecht *********************** replace geschl=0 if geschl==1 replace geschl=1 if geschl==2 label define geschl 0 "männlich" 1 "weiblich" label value geschl geschl ********************* ***Spelldauern berechnen - nicht in Testdaten ********************* gen spdauer = endepi-begepi+1 save data\LIAB_LV1_p2.dta, replace sum _all clear log close