***data processing sort v3 v1 ***Dummy for unemployment by v3: gen AL = 1 if v54>0 by v3: replace AL = 0 if AL==. ***Dummy for sex (1=men , 0=women) replace v12=0 if v12==2 ***Dummy for highest education = low by v3: gen MAX_niedrig=1 if MAXBild==1 | MAXBild==2 by v3: replace MAX_niedrig=0 if MAX_niedrig==. ***dummy for highest education = high by v3: gen MAX_hoch=1 if MAXBild==5 | MAXBild==6 by v3: replace MAX_hoch=0 if MAX_niedrig==. ***East - West Dummy by v3: egen Ost=max(v21) by v3: replace Ost=0 if Ost==1 ***Controling for commuters. East = 1 means that the person only worked in Eastern Germany and vice versa for Western Germany by v3: gen Hilfe1=1 if v21==1 by v3: replace Hilfe1=0 if Hilfe1==. by v3: egen Hilfe2=max(Hilfe1) drop Hilfe1 by v3: replace Ost=1 if Ost>0 & Hilfe2==0 by v3: replace Ost=. if Ost>0 & Hilfe2==1 drop Hilfe2 ***Dummy for Part-time by v3: gen Teilzeit=1 if v10>=8 & v10~=.n by v3: replace Teilzeit=0 if v10>=0 & v10<8 by v3: replace Teilzeit=. if AL==1 ***Dummy for employment status by v3: gen Arbeiter=1 if v10==1 by v3: replace Arbeiter=0 if Arbeiter==. by v3: replace Arbeiter=. if AL==1 by v3: gen Facharbeiter=1 if v10==2 by v3: replace Facharbeiter=0 if Facharbeiter==. by v3: replace Facharbeiter=. if AL==1 by v3: gen Meister=1 if v10==3 by v3: replace Meister=0 if Meister==. by v3: replace Meister=. if AL==1 by v3: gen Azubi=1 if v10==0 by v3: replace Azubi=0 if Azubi==. by v3: replace Azubi=. if AL==1 ***Dummies for Industries following the WZ03 classification do "H:\Documents\Documents\Paper\Hartz IV Note\Revision\Publication_09.do" sort v3 v1 by v3: replace WZ=. if WZ==.n ***industry dummies following the VGR by v3: gen LandForstFisch = 1 if WZ<10 by v3: replace LandForstFisch = 0 if WZ>=10 & WZ~=. by v3: gen BergSteineErden =1 if WZ>=10 & WZ<=15 by v3: replace BergSteineErden = 0 if WZ<10 & WZ~=.| WZ>15 & WZ~=. by v3: gen Verarbeitendes =1 if WZ>15 & WZ<=37 by v3: replace Verarbeitendes = 0 if WZ<=15 & WZ~=. | WZ>37 & WZ~=. by v3: gen Energie =1 if WZ>=40 & WZ<=41 by v3: replace Energie = 0 if WZ<40 & WZ~=. | WZ>41 & WZ~=. by v3: gen Bau = 1 if WZ==45 by v3: replace Bau = 0 if WZ~=45 & WZ~=. by v3: gen Handel =1 if WZ>=50 & WZ<=55 by v3: replace Handel = 0 if WZ<50 & WZ~=. | WZ>55 & WZ~=. by v3: gen VerkehrNachrichten =1 if WZ>=60 & WZ<=64 by v3: replace VerkehrNachrichten = 0 if WZ<60 & WZ~=. | WZ>64 & WZ~=. by v3: gen KreditVersicherung =1 if WZ>=65 & WZ<=67 by v3: replace KreditVersicherung = 0 if WZ<65 & WZ~=. | WZ>67 & WZ~=. by v3: gen GrundVermietung =1 if WZ>=70 & WZ<=71 by v3: replace GrundVermietung = 0 if WZ<70 & WZ~=. | WZ>71 & WZ~=. by v3: gen UntDienstleister =1 if WZ>=72 & WZ<=74 by v3: replace UntDienstleister = 0 if WZ<72 & WZ~=. | WZ>74 & WZ~=. by v3: gen OeffVerwalt = 1 if WZ==75 by v3: replace OeffVerwalt = 0 if WZ~=75 & WZ~=. by v3: gen Unterricht = 1 if WZ==80 by v3: replace Unterricht = 0 if WZ~=80 & WZ~=. by v3: gen Soziales = 1 if WZ==85 by v3: replace Soziales = 0 if WZ~=85 & WZ~=. by v3: gen SonstOeffDienst =1 if WZ>=90 & WZ<=93 by v3: replace SonstOeffDienst = 0 if WZ<90 & WZ~=. | WZ>93 & WZ~=. ***Dummy for small firm by v3: gen KleinUnt=1 if v24<=4 by v3: replace KleinUnt=0 if v24>4 by v3: replace KleinUnt=. if AL==1 ***Dummy for big firm by v3: gen GrossUnt=1 if v24>=7 by v3: replace GrossUnt=0 if v24<7 by v3: replace GrossUnt=. if AL==1 ***share of under 20 by v3: gen U20=v26 ***share of over 55 by v3: gen Ue55=v34 + v35 + v36 compress