*Housing property of immigrants: Housing quality *06.03.2017 use hmaster_mig_aufbereitet.dta, clear *merge info on equipment of dwelling merge 1:1 hhnrakt jahr using hh_equipment.dta drop if _merge==2 drop _merge *Generate housing quality measures: condition of dwelling, feeling overcrowded, objective crowding measure, year of construction, value of dwelling replace condition=. if condition==-1 replace opinionsize=. if opinionsize==-1 *Dummy variables gen condition_good=1 if condition==1 replace condition_good=0 if condition>1 & condition!=. gen overcrowded=1 if opinionsize==1 | opinionsize==2 replace overcrowded=0 if opinionsize>2 & opinionsize!=. *QM per persons (cologne scale) *Outliers? sum qm, d //-> min 6 and max 938 *drop 1 percent at lower and upper part of distribution replace qm=. if qm<26 | qm>240 sum qm *Crowding measure *Cologne scale: Space need: *1 persons -> 47,5 *each add. person: app. +13qm gen space_need=34.5 foreach num of numlist 1(1)14 { replace space_need=34.5+(13*`num') if numberpers==`num' } gen crowding=qm/space_need *Year of construction gen altbau=1 if baujahr==1 | baujahr==2 replace altbau=0 if baujahr>2 & baujahr!=. *Value of owner-occupied dwelling -> 2002, 2007 and 2012 sum prop, d sum prop if prop>0, d *Mortgage yes/no and value of mortgage gen mortgage=1 if downer==1 & zinsexp>0 replace mortgage=0 if downer==1 & zinsexp<=0 *Zinsexp is value of mortgage if mortgage yes -> negative values indicate no owner or owner but no mortagage gen mortgage_value=zinsexp if zinsexp>0 replace mortgage_value=0 if mortgage==0 *Equipment -> generate count data variable gen equip=hgeqpkit+ hgeqpshw+ hgeqpiwc+ hgeqphea+ hgeqpter+ hgeqpbas+ hgeqpgar *********************************************************************************************************************** *Trend over time for owners set more off cd "I:\wealth\Migranten und Wohnungseigentum\Data\STATA Logfiles" log using quality.log, replace foreach num in 0 1 { bysort jahr: sum condition_good if mig==`num' & downer==1 } foreach num in 0 1 { bysort jahr: sum overcrowded if mig==`num' & downer==1 } foreach num in 0 1 { bysort jahr: sum crowding if mig==`num' & downer==1 } foreach num in 0 1 { bysort jahr: sum prop if mig==`num' & downer==1, d } *Other characteristics of dwelling/ quality-neutral foreach num in 0 1 { bysort jahr: sum altbau if mig==`num' & downer==1 } foreach num in 0 1 { bysort jahr: sum qm if mig==`num' & downer==1 } foreach num in 0 1 { bysort jahr: sum mortgage if mig==`num' & downer==1 } foreach num in 0 1 { bysort jahr: sum mortgage_value if mig==`num' & downer==1 } foreach num in 0 1 { bysort jahr: sum equip if mig==`num' & downer==1 } log close ********************************************************************************************************************** *Interaction owner and migrant gen int_migown=mig*downer global xsd "alter31_60 alter60 educ2 educ3 empld married" global xhh "couple_female single_male single_female numberkids net2 net3 net4 net5" global xreg "west reg2 reg3 price" set more off cd "I:\wealth\Migranten und Wohnungseigentum\Data\STATA Logfiles" log using quality2.log, replace *Regression estimates* *Condition of dwelling *1996-2000;2001-2005;2007-2011 probit condition_good mig downer int_migown $xsd $xhh $xreg if year2005==0, vce(robust) margins, dydx(mig downer int_migown) probit condition_good mig downer int_migown $xsd $xhh $xreg if year2005==1, vce(robust) margins, dydx(mig downer int_migown) probit condition_good mig downer int_migown $xsd $xhh $xreg if year2012==1, vce(robust) margins, dydx(mig downer int_migown) *** *Subjective measure of feeling overcrowded *1996-2000;2001-2005;2006-2012 probit overcrowded mig downer int_migown $xsd $xhh $xreg if year2005==0, vce(robust) margins, dydx(mig downer int_migown) probit overcrowded mig downer int_migown $xsd $xhh $xreg if year2005==1, vce(robust) margins, dydx(mig downer int_migown) probit overcrowded mig downer int_migown $xsd $xhh $xreg if year2012==1, vce(robust) margins, dydx(mig downer int_migown) *** *Crowding index *Standardize egen crowding_std=std(crowding) *1996-2000;2001-2005;2006-2012 reg crowding_std mig downer int_migown $xsd $xhh $xreg if year2005==0, vce(robust) reg crowding_std mig downer int_migown $xsd $xhh $xreg if year2005==1, vce(robust) reg crowding_std mig downer int_migown $xsd $xhh $xreg if year2012==1, vce(robust) *** *Property value - only owners because otherwise zero gen lnprop=ln(prop) *1996-2000;2001-2005;2006-2012 reg lnprop mig $xsd $xhh $xreg if jahr==2007 & downer==1, vce(robust) log close /*year of construction xi: probit altbau mig downer int_migown netinc alter i.educ empld married mann i.reg_typ2 if year2005==0, vce(robust) margins, dydx(mig downer int_migown) xi: probit altbau mig downer int_migown netinc alter i.educ empld married mann i.reg_typ2 if year2005==1, vce(robust) margins, dydx(mig downer int_migown) xi: probit altbau mig downer int_migown netinc alter i.educ empld married mann i.reg_typ2 if year2012==1, vce(robust) margins, dydx(mig downer int_migown) *Equipment xi: poisson equip mig downer int_migown netinc alter i.educ empld married mann i.reg_typ2 if year2005==0, vce(robust) xi: poisson equip mig downer int_migown netinc alter i.educ empld married mann i.reg_typ2 if year2005==1, vce(robust) xi: poisson equip mig downer int_migown netinc alter i.educ empld married mann i.reg_typ2 if year2012==1, vce(robust) *Mortgage yes/no xi: probit mortgage mig downer int_migown netinc alter i.educ empld married mann i.reg_typ2 if year2005==0, vce(robust) margins, dydx(mig downer int_migown) xi: probit mortgage mig downer int_migown netinc alter i.educ empld married mann i.reg_typ2 if year2005==1, vce(robust) margins, dydx(mig downer int_migown) xi: probit mortgage mig downer int_migown netinc alter i.educ empld married mann i.reg_typ2 if year2012==1, vce(robust) margins, dydx(mig downer int_migown) *Mortgage value xi: reg mortgage_value mig downer int_migown netinc alter i.educ empld married mann i.reg_typ2 if year2005==0, vce(robust) xi: reg mortgage_value mig downer int_migown netinc alter i.educ empld married mann i.reg_typ2 if year2005==1, vce(robust) xi: reg mortgage_value mig downer int_migown netinc alter i.educ empld married mann i.reg_typ2 if year2012==1, vce(robust)