| |
|
| |
|
| | clear all
|
| | set more off
|
| | set maxvar 10000
|
| | set mem 500m
|
| |
|
| |
|
| |
|
| |
|
| |
|
| | local ourprocdata "./our_proc"
|
| | local output "./output"
|
| |
|
| | use taxsim2001.dta, clear
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| | rename X708 rent
|
| | rename X709 per_rent
|
| | replace rent=rent*12 if per_rent==4
|
| | replace rent=rent*12*4.34 if per_rent==2
|
| | replace rent=rent*12*2.17 if per_rent==3
|
| | replace rent=rent*4 if per_rent==5
|
| | replace rent=rent*2 if per_rent==11
|
| | replace rent=rent*6 if per_rent==12
|
| | replace rent=rent*12*2 if per_rent==31
|
| | replace rent=. if per_rent==-1
|
| | replace rent=. if per_rent==-7
|
| |
|
| | gen HELS=cond(X1005-X1004>0,0,max(X1005,0))
|
| |
|
| |
|
| | drop J*
|
| | drop X*
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| | replace houses=. if houses<0
|
| | replace oresre=. if oresre<0
|
| | gen house_val=houses
|
| |
|
| | gen ownership=housecl
|
| |
|
| |
|
| | gen l_assets=max(othfin,0)+max(checking,0)+max(saving,0)+max(mma,0)+max(cds,0)+max(nmmf,0)+max(savbnd,0)+max(stocks,0)+max(bond,0)+oresre+nnresre
|
| |
|
| |
|
| | gen m_debt=max(NH_MORT,0)-max(HELS,0)
|
| | drop m_debt
|
| | gen m_debt=max(NH_MORT,0)+max(heloc,0)
|
| |
|
| |
|
| | gen helocs=max(heloc,0)+max(HELS,0)
|
| |
|
| |
|
| | gen l_debt=max(ccbal,0)+max(resdbt,0)
|
| |
|
| |
|
| | gen wealth=house_val+l_assets-l_debt-m_debt
|
| | gen hnworth=house_val-m_debt
|
| |
|
| |
|
| | gen age_head=age
|
| |
|
| |
|
| | gen h1=house_val if house_val>=0
|
| |
|
| |
|
| | replace inc=inc/equiv
|
| | replace h1=h1/equiv
|
| |
|
| |
|
| |
|
| |
|
| |
|
| | pctile pct = wealth [w=wgt], nq(100) genp(percent)
|
| | gen pk1=pct if percent==80
|
| | egen mean_pk1=mean(pk1)
|
| | drop if wealth>mean_pk1
|
| |
|
| |
|
| | drop if age_head<25
|
| | drop if age_head>85
|
| |
|
| |
|
| |
|
| | gen t_debt_paym=max(tpay,0)/equiv
|
| | gen rev_debt_paym=max(revpay,0)/equiv
|
| | gen mort_debt_paym=max(mortpay,0)/equiv
|
| | gen cons_debt_paym=max(conspay,0)/equiv
|
| |
|
| |
|
| |
|
| |
|
| |
|
| | gen non_mort=cons_debt_paym+rev_debt_paym
|
| | correlate non_mort mort_debt_paym [weight=wgt]
|
| |
|
| |
|
| |
|
| |
|
| |
|
| | preserve
|
| | gen ratio1=mort_debt_paym*12/inc
|
| | collapse (p10) ratio1 [weight=wgt] if mort_debt_paym>0
|
| | gen res=ratio1*0.6
|
| | replace res=round(res, 0.01)
|
| | gen title="10 pct PTI ratio, borrowers"
|
| | save mpti1.dta, replace
|
| | restore
|
| |
|
| |
|
| | preserve
|
| | gen ratio1=mort_debt_paym*12/inc
|
| | collapse (p25) ratio1 [weight=wgt] if mort_debt_paym>0
|
| | gen res=round(ratio1, 0.01)*0.6
|
| | replace res=round(res, 0.01)
|
| | gen title="25 pct PTI ratio, borrowers"
|
| | save mpti2.dta, replace
|
| | restore
|
| |
|
| |
|
| | preserve
|
| | gen ratio1=mort_debt_paym*12/inc
|
| | collapse (median) ratio1 [weight=wgt] if mort_debt_paym>0
|
| | gen res=round(ratio1, 0.01)*0.6
|
| | replace res=round(res, 0.01)
|
| | gen title="Median PTI ratio, borrowers"
|
| | save mpti3.dta, replace
|
| | restore
|
| |
|
| |
|
| | preserve
|
| | gen ratio1=mort_debt_paym*12/inc
|
| | collapse (p75) ratio1 [weight=wgt] if mort_debt_paym>0
|
| | gen res=round(ratio1, 0.01)*0.6
|
| | replace res=round(res, 0.01)
|
| | gen title="75 pct PTI ratio, borrowers"
|
| | save mpti4.dta, replace
|
| | restore
|
| |
|
| |
|
| | preserve
|
| | gen ratio1=mort_debt_paym*12/inc
|
| | collapse (p90) ratio1 [weight=wgt] if mort_debt_paym>0
|
| | gen res=round(ratio1, 0.01)*0.6
|
| | replace res=round(res, 0.01)
|
| | gen title="90 pct PTI ratio, borrowers"
|
| | save mpti5.dta, replace
|
| | restore
|
| |
|
| |
|
| | forval x=1(1)5{
|
| | use mpti`x'.dta, clear
|
| | keep res title
|
| | duplicates drop
|
| | save mpti`x'.dta, replace
|
| | }
|
| |
|
| | use mpti1.dta, clear
|
| | forval x=2(1)5{
|
| | append using mpti`x'.dta
|
| | }
|
| |
|
| | order title res
|
| |
|
| |
|
| | cd ..
|
| |
|
| |
|
| | outsheet using "`output'/tab3_panelF.csv", replace c
|
| |
|
| |
|
| |
|
| |
|
| |
|