Commit
·
330da3a
1
Parent(s):
3b50d4c
add 42
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- 42/paper.pdf +3 -0
- 42/replication_package/README.pdf +3 -0
- 42/replication_package/data_replication/psid/code/consumption.do +136 -0
- 42/replication_package/data_replication/psid/code/merge_panel.do +159 -0
- 42/replication_package/data_replication/psid/code/merge_panel_2020.do +207 -0
- 42/replication_package/data_replication/psid/code/tab1_refi_liquidity.do +241 -0
- 42/replication_package/data_replication/psid/code/tab1_refi_moments.do +183 -0
- 42/replication_package/data_replication/psid/code/tab2_income.do +194 -0
- 42/replication_package/data_replication/psid/code/tabA3_refi.do +192 -0
- 42/replication_package/data_replication/psid/code/taxsim.do +191 -0
- 42/replication_package/data_replication/psid/code/taxsim9_ado_files/taxsim9.ado +368 -0
- 42/replication_package/data_replication/psid/code/taxsim9_ado_files/taxsim9.hlp +294 -0
- 42/replication_package/data_replication/psid/code/taxsim_2020.do +208 -0
- 42/replication_package/data_replication/psid/output/tab1_refi_liquidity.csv +3 -0
- 42/replication_package/data_replication/psid/output/tab1_refi_moments.csv +3 -0
- 42/replication_package/data_replication/psid/output/tab2_income.csv +3 -0
- 42/replication_package/data_replication/psid/output/tabA3_refi.csv +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/temp1999.dta +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/temp2001.dta +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/temp2003.dta +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/temp2005.dta +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/temp2007.dta +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/temp2009.dta +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/temp2011.dta +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/tempX1999.dta +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/tempX2001.dta +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/tempX2003.dta +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/tempX2005.dta +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/tempX2007.dta +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/tempX2009.dta +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/tempX2011.dta +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/tempX2013.dta +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/tempX2015.dta +3 -0
- 42/replication_package/data_replication/psid/proc_data/our_proc/tempX2017.dta +3 -0
- 42/replication_package/data_replication/psid/raw_data/CON01.do +61 -0
- 42/replication_package/data_replication/psid/raw_data/CON01.txt +3 -0
- 42/replication_package/data_replication/psid/raw_data/CON03.do +61 -0
- 42/replication_package/data_replication/psid/raw_data/CON03.txt +3 -0
- 42/replication_package/data_replication/psid/raw_data/CON05.do +69 -0
- 42/replication_package/data_replication/psid/raw_data/CON05.txt +3 -0
- 42/replication_package/data_replication/psid/raw_data/CON07.do +69 -0
- 42/replication_package/data_replication/psid/raw_data/CON07.txt +3 -0
- 42/replication_package/data_replication/psid/raw_data/CON09.do +69 -0
- 42/replication_package/data_replication/psid/raw_data/CON09.txt +3 -0
- 42/replication_package/data_replication/psid/raw_data/CON11.do +69 -0
- 42/replication_package/data_replication/psid/raw_data/CON11.txt +3 -0
- 42/replication_package/data_replication/psid/raw_data/CON99.do +61 -0
- 42/replication_package/data_replication/psid/raw_data/CON99.txt +3 -0
- 42/replication_package/data_replication/psid/raw_data/FAM1999ER.do +0 -0
- 42/replication_package/data_replication/psid/raw_data/FAM1999ER.txt +3 -0
42/paper.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c65fcfc406c7446ee12503882c5b5624da7ebb6686972f7957c0a1a4e39fa9ab
|
3 |
+
size 847943
|
42/replication_package/README.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:30c6e6758b5c2df842797d05d5320a53d46d702322591fc9ed84427e0204c335
|
3 |
+
size 125888
|
42/replication_package/data_replication/psid/code/consumption.do
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
clear all
|
3 |
+
set more off
|
4 |
+
set maxvar 10000
|
5 |
+
|
6 |
+
*Set path
|
7 |
+
***
|
8 |
+
|
9 |
+
*cd ---- specify path to \data_replication\psid\
|
10 |
+
|
11 |
+
local procdata "./proc_data/"
|
12 |
+
local rawdata "./raw_data/"
|
13 |
+
|
14 |
+
cd proc_data
|
15 |
+
|
16 |
+
use for_reg.dta, clear
|
17 |
+
|
18 |
+
*Prepare the panel
|
19 |
+
drop if age<25 & year==1999
|
20 |
+
drop if age>85 & year==2011
|
21 |
+
bys hid: gen nyear=[_N]
|
22 |
+
keep if nyear==7
|
23 |
+
|
24 |
+
keep fam_ID year hid
|
25 |
+
save income_panel2.dta, replace
|
26 |
+
|
27 |
+
cd ..
|
28 |
+
|
29 |
+
|
30 |
+
*###############################################################################
|
31 |
+
*Prepare the refinancing data for each year
|
32 |
+
*###############################################################################
|
33 |
+
foreach x of numlist 99 01 03 05 07 09 11{
|
34 |
+
clear
|
35 |
+
*###############################################################################
|
36 |
+
*Prepare the consumption data
|
37 |
+
*###############################################################################
|
38 |
+
|
39 |
+
if `x'==99 | `x'==11{
|
40 |
+
*Convert PSID consumption files to stata format
|
41 |
+
cd raw_data
|
42 |
+
do CON`x'.do
|
43 |
+
ren CON`x'_ID fam_ID
|
44 |
+
if `x'==99 {
|
45 |
+
gen year=19`x'
|
46 |
+
*join with income
|
47 |
+
cd ..
|
48 |
+
joinby fam_ID year using `procdata'income_panel2.dta, unmatched(both)
|
49 |
+
drop if _merge!=3
|
50 |
+
drop _merge
|
51 |
+
save `procdata'cons_temp19`x'.dta,replace
|
52 |
+
}
|
53 |
+
else{
|
54 |
+
gen year=20`x'
|
55 |
+
*join with income
|
56 |
+
cd ..
|
57 |
+
joinby fam_ID year using `procdata'income_panel2.dta, unmatched(both)
|
58 |
+
drop if _merge!=3
|
59 |
+
drop _merge
|
60 |
+
save `procdata'cons_temp20`x'.dta,replace
|
61 |
+
}
|
62 |
+
}
|
63 |
+
else{
|
64 |
+
*Convert PSID consumption files to stata format
|
65 |
+
cd raw_data
|
66 |
+
do CON0`x'.do
|
67 |
+
ren CON0`x'_ID fam_ID
|
68 |
+
gen year=200`x'
|
69 |
+
*join with income
|
70 |
+
cd ..
|
71 |
+
joinby fam_ID year using `procdata'income_panel2.dta, unmatched(both)
|
72 |
+
drop if _merge!=3
|
73 |
+
drop _merge
|
74 |
+
save `procdata'cons_temp200`x'.dta,replace
|
75 |
+
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
|
80 |
+
cd proc_data
|
81 |
+
*Create consumption variables for each year
|
82 |
+
*note that some files contain more variables
|
83 |
+
*1999
|
84 |
+
use cons_temp1999.dta, clear
|
85 |
+
gen food_cons=FOOD99
|
86 |
+
gen rent_cons=RENT99
|
87 |
+
gen util_cons=UTIL99
|
88 |
+
gen tran_cons=TRAN99
|
89 |
+
gen educ_cons=ED99
|
90 |
+
gen kids_cons=CHILD99
|
91 |
+
gen heal_cons=HEALTH99
|
92 |
+
keep food_cons rent_cons util_cons tran_cons educ_cons kids_cons heal_cons hid year
|
93 |
+
save cons1999.dta, replace
|
94 |
+
*2001 and 2003
|
95 |
+
forval x=2001(2)2003{
|
96 |
+
local i=`x'-2000
|
97 |
+
use cons_temp200`i'.dta, clear
|
98 |
+
gen food_cons=FOOD0`i'
|
99 |
+
gen rent_cons=RENT0`i'
|
100 |
+
gen util_cons=UTIL0`i'
|
101 |
+
gen tran_cons=TRAN0`i'
|
102 |
+
gen educ_cons=ED0`i'
|
103 |
+
gen kids_cons=CHILD0`i'
|
104 |
+
gen heal_cons=HEALTH0`i'
|
105 |
+
keep food_cons rent_cons util_cons tran_cons educ_cons kids_cons heal_cons hid year
|
106 |
+
save cons`x'.dta, replace
|
107 |
+
}
|
108 |
+
*2005,2007 and 2009
|
109 |
+
forval x=2005(2)2009{
|
110 |
+
local i=`x'-2000
|
111 |
+
use cons_temp200`i'.dta, clear
|
112 |
+
gen food_cons=FOOD0`i'
|
113 |
+
gen rent_cons=RENT0`i'
|
114 |
+
gen util_cons=UTIL0`i'
|
115 |
+
gen tran_cons=TRAN0`i'
|
116 |
+
gen educ_cons=ED0`i'
|
117 |
+
gen kids_cons=CHILD0`i'
|
118 |
+
gen heal_cons=HEALTH0`i'
|
119 |
+
gen other_cons=TELINT0`i'+CLOTH0`i'+TRIPS0`i'+OTHREC0`i'
|
120 |
+
keep food_cons rent_cons util_cons tran_cons educ_cons kids_cons heal_cons hid year other_cons
|
121 |
+
save cons`x'.dta, replace
|
122 |
+
}
|
123 |
+
*2011
|
124 |
+
use cons_temp2011.dta, clear
|
125 |
+
gen food_cons=FOOD11
|
126 |
+
gen rent_cons=RENT11
|
127 |
+
gen util_cons=UTIL11
|
128 |
+
gen tran_cons=TRAN11
|
129 |
+
gen educ_cons=ED11
|
130 |
+
gen kids_cons=CHILD11
|
131 |
+
gen heal_cons=HEALTH11
|
132 |
+
gen other_cons=TELINT11+CLOTH11+TRIPS11+OTHREC11
|
133 |
+
keep food_cons rent_cons util_cons tran_cons educ_cons kids_cons heal_cons hid year other_cons
|
134 |
+
save cons2011.dta, replace
|
135 |
+
|
136 |
+
|
42/replication_package/data_replication/psid/code/merge_panel.do
ADDED
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
clear all
|
4 |
+
set more off
|
5 |
+
set maxvar 10000
|
6 |
+
|
7 |
+
*Set path
|
8 |
+
***
|
9 |
+
|
10 |
+
*cd ---- specify path to \data_replication\psid\
|
11 |
+
|
12 |
+
|
13 |
+
cd raw_data
|
14 |
+
|
15 |
+
*Import data for individuals
|
16 |
+
do IND2011ER.do
|
17 |
+
|
18 |
+
*Generate unique id
|
19 |
+
*Last three digits are the person number
|
20 |
+
*ER30001-1968 Family id
|
21 |
+
*ER30002-Person number
|
22 |
+
gen hid=ER30001*1000+ER30002
|
23 |
+
|
24 |
+
cd ..
|
25 |
+
cd proc_data
|
26 |
+
save temp_master.dta,replace
|
27 |
+
|
28 |
+
****************************************
|
29 |
+
*Join with data after taxsim correction
|
30 |
+
*in order to assign the unique id to the
|
31 |
+
*household head
|
32 |
+
****************************************
|
33 |
+
***
|
34 |
+
* IMPORTANT !!! paste files from "our_proc" subfolder into the "proc_data" folder if you didn't manage to get taxsim9 to run on your computer
|
35 |
+
***
|
36 |
+
|
37 |
+
*1999
|
38 |
+
use temp_master.dta,clear
|
39 |
+
drop if ER33503!=10 //keep only heads in that year
|
40 |
+
drop if ER33502!=1 //keep only if head is still within family unit
|
41 |
+
rename ER33501 fam_ID_year
|
42 |
+
joinby fam_ID_year using temp1999.dta, unmatched(both)
|
43 |
+
drop if _merge!=3
|
44 |
+
drop _merge
|
45 |
+
drop if age_head!=ER33504 //drop obs. that are inconsistent about the age of head
|
46 |
+
drop ER*
|
47 |
+
save p1999.dta, replace
|
48 |
+
*2001
|
49 |
+
use temp_master.dta,clear
|
50 |
+
drop if ER33603!=10 //keep only heads in that year
|
51 |
+
drop if ER33602!=1 //keep only if head is still within family unit
|
52 |
+
rename ER33601 fam_ID_year
|
53 |
+
joinby fam_ID_year using temp2001.dta, unmatched(both)
|
54 |
+
drop if _merge!=3
|
55 |
+
drop _merge
|
56 |
+
drop if age_head!=ER33604 //drop obs. that are inconsistent about the age of head
|
57 |
+
drop if ER33608!=0 //drop if head has moved in/out (splitoffs)
|
58 |
+
drop ER*
|
59 |
+
save p2001.dta, replace
|
60 |
+
*2003
|
61 |
+
use temp_master.dta,clear
|
62 |
+
drop if ER33703!=10 //keep only heads in that year
|
63 |
+
drop if ER33702!=1 //keep only if head is still within family unit
|
64 |
+
rename ER33701 fam_ID_year
|
65 |
+
joinby fam_ID_year using temp2003.dta, unmatched(both)
|
66 |
+
drop if _merge!=3
|
67 |
+
drop _merge
|
68 |
+
drop if age_head!=ER33704 //drop obs. that are inconsistent about the age of head
|
69 |
+
drop if ER33708!=0 //drop if head has moved in/out (splitoffs)
|
70 |
+
drop ER*
|
71 |
+
save p2003.dta, replace
|
72 |
+
*2005
|
73 |
+
use temp_master.dta,clear
|
74 |
+
drop if ER33803!=10 //keep only heads in that year
|
75 |
+
drop if ER33802!=1 //keep only if head is still within family unit
|
76 |
+
rename ER33801 fam_ID_year
|
77 |
+
joinby fam_ID_year using temp2005.dta, unmatched(both)
|
78 |
+
drop if _merge!=3
|
79 |
+
drop _merge
|
80 |
+
drop if age_head!=ER33804 //drop obs. that are inconsistent about the age of head
|
81 |
+
drop if ER33808!=0 //drop if head has moved in/out (splitoffs)
|
82 |
+
drop ER*
|
83 |
+
save p2005.dta, replace
|
84 |
+
*2007
|
85 |
+
use temp_master.dta,clear
|
86 |
+
drop if ER33903!=10 //keep only heads in that year
|
87 |
+
drop if ER33902!=1 //keep only if head is still within family unit
|
88 |
+
rename ER33901 fam_ID_year
|
89 |
+
joinby fam_ID_year using temp2007.dta, unmatched(both)
|
90 |
+
drop if _merge!=3
|
91 |
+
drop _merge
|
92 |
+
drop if age_head!=ER33904 //drop obs. that are inconsistent about the age of head
|
93 |
+
drop if ER33908!=0 //drop if head has moved in/out (splitoffs)
|
94 |
+
drop ER*
|
95 |
+
save p2007.dta, replace
|
96 |
+
*2009
|
97 |
+
use temp_master.dta,clear
|
98 |
+
drop if ER34003!=10 //keep only heads in that year
|
99 |
+
drop if ER34002!=1 //keep only if head is still within family unit
|
100 |
+
rename ER34001 fam_ID_year
|
101 |
+
joinby fam_ID_year using temp2009.dta, unmatched(both)
|
102 |
+
drop if _merge!=3
|
103 |
+
drop _merge
|
104 |
+
drop if age_head!=ER34004 //drop obs. that are inconsistent about the age of head
|
105 |
+
drop if ER34008!=0 //drop if head has moved in/out (splitoffs)
|
106 |
+
drop ER*
|
107 |
+
save p2009.dta, replace
|
108 |
+
*2011
|
109 |
+
use temp_master.dta,clear
|
110 |
+
drop if ER34103!=10 //keep only heads in that year
|
111 |
+
drop if ER34102!=1 //keep only if head is still within family unit
|
112 |
+
rename ER34101 fam_ID_year
|
113 |
+
joinby fam_ID_year using temp2011.dta, unmatched(both)
|
114 |
+
drop if _merge!=3
|
115 |
+
drop _merge
|
116 |
+
drop if age_head!=ER34104 //drop obs. that are inconsistent about the age of head
|
117 |
+
drop if ER34108!=0 //drop if head has moved in/out (splitoffs)
|
118 |
+
drop ER*
|
119 |
+
save p2011.dta, replace
|
120 |
+
|
121 |
+
|
122 |
+
****************************************
|
123 |
+
*Create panel
|
124 |
+
****************************************
|
125 |
+
*Adjust the names of the variables
|
126 |
+
forval x=1999(2)2011{
|
127 |
+
use p`x'.dta, clear
|
128 |
+
ren aftertax_income_defl_equiv inc`x'
|
129 |
+
ren age_head age`x'
|
130 |
+
ren ed_head edu`x'
|
131 |
+
ren marital_status_head mstat`x'
|
132 |
+
ren fam_ID_year fam_ID`x'
|
133 |
+
ren size_fam size_fam`x'
|
134 |
+
drop fam_ID_1968 year_survey //drop variables that are not useful
|
135 |
+
save pk`x'.dta,replace
|
136 |
+
}
|
137 |
+
|
138 |
+
*Join datasets to form a panel
|
139 |
+
use pk1999.dta, clear
|
140 |
+
forval x=2001(2)2011{
|
141 |
+
joinby hid using pk`x'.dta, unmatched(both)
|
142 |
+
drop if _merge!=3
|
143 |
+
drop _merge
|
144 |
+
local i=`x'-2
|
145 |
+
di "`i'"
|
146 |
+
gen b=age`x'-age`i'
|
147 |
+
tab b
|
148 |
+
drop if b!=2 & b!=1 & b!=3 // drop people that are inconsistent about their age (1/2/3 are consistent due to the differences in month of interview)
|
149 |
+
drop b
|
150 |
+
gen a=edu`x'-edu`i'
|
151 |
+
tab a
|
152 |
+
drop if a<0 // drop people that are inconsistent about their education (to adjust for any errors, see 2009 family codebook release info)
|
153 |
+
drop a
|
154 |
+
}
|
155 |
+
|
156 |
+
*Reshape the data for better use
|
157 |
+
reshape long inc age edu mstat fam_ID size_fam, i(hid) j(year)
|
158 |
+
|
159 |
+
save for_reg.dta, replace
|
42/replication_package/data_replication/psid/code/merge_panel_2020.do
ADDED
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
****************************************
|
2 |
+
*THIS CODE PREPARES THE PANEL FOR
|
3 |
+
*REGRESSIONS
|
4 |
+
****************************************
|
5 |
+
|
6 |
+
clear all
|
7 |
+
set more off
|
8 |
+
set maxvar 10000
|
9 |
+
|
10 |
+
*Set path
|
11 |
+
|
12 |
+
|
13 |
+
*cd ---- specify path to \data_replication\psid\
|
14 |
+
|
15 |
+
cd raw_data
|
16 |
+
|
17 |
+
*Import data for individuals
|
18 |
+
do IND2017ER.do
|
19 |
+
|
20 |
+
|
21 |
+
*Generate unique id
|
22 |
+
*Last three digits are the person number
|
23 |
+
*ER30001-1968 Family id
|
24 |
+
*ER30002-Person number
|
25 |
+
gen hid=ER30001*1000+ER30002
|
26 |
+
|
27 |
+
|
28 |
+
cd ..
|
29 |
+
cd proc_data
|
30 |
+
save temp_masterX.dta,replace
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
****************************************
|
35 |
+
*Join with data after taxsim correction
|
36 |
+
*in order to assign the unique id to the
|
37 |
+
*household head
|
38 |
+
****************************************
|
39 |
+
***
|
40 |
+
* IMPORTANT !!! paste files from "our_proc" subfolder into the "proc_data" folder if you didn't manage to get taxsim9 to run on your computer
|
41 |
+
***
|
42 |
+
|
43 |
+
*1999
|
44 |
+
use temp_masterX.dta,clear
|
45 |
+
drop if ER33503!=10 //keep only heads in that year
|
46 |
+
drop if ER33502!=1 //keep only if head is still within family unit
|
47 |
+
rename ER33501 fam_ID_year
|
48 |
+
joinby fam_ID_year using tempX1999.dta, unmatched(both)
|
49 |
+
drop if _merge!=3
|
50 |
+
drop _merge
|
51 |
+
drop if age_head!=ER33504 //drop obs. that are inconsistent about the age of head
|
52 |
+
drop ER*
|
53 |
+
save pX1999.dta, replace
|
54 |
+
*2001
|
55 |
+
use temp_masterX.dta,clear
|
56 |
+
drop if ER33603!=10 //keep only heads in that year
|
57 |
+
drop if ER33602!=1 //keep only if head is still within family unit
|
58 |
+
rename ER33601 fam_ID_year
|
59 |
+
joinby fam_ID_year using tempX2001.dta, unmatched(both)
|
60 |
+
drop if _merge!=3
|
61 |
+
drop _merge
|
62 |
+
drop if age_head!=ER33604 //drop obs. that are inconsistent about the age of head
|
63 |
+
drop if ER33608!=0 //drop if head has moved in/out (splitoffs)
|
64 |
+
drop ER*
|
65 |
+
save pX2001.dta, replace
|
66 |
+
*2003
|
67 |
+
use temp_masterX.dta,clear
|
68 |
+
drop if ER33703!=10 //keep only heads in that year
|
69 |
+
drop if ER33702!=1 //keep only if head is still within family unit
|
70 |
+
rename ER33701 fam_ID_year
|
71 |
+
joinby fam_ID_year using tempX2003.dta, unmatched(both)
|
72 |
+
drop if _merge!=3
|
73 |
+
drop _merge
|
74 |
+
drop if age_head!=ER33704 //drop obs. that are inconsistent about the age of head
|
75 |
+
drop if ER33708!=0 //drop if head has moved in/out (splitoffs)
|
76 |
+
drop ER*
|
77 |
+
save pX2003.dta, replace
|
78 |
+
*2005
|
79 |
+
use temp_masterX.dta,clear
|
80 |
+
drop if ER33803!=10 //keep only heads in that year
|
81 |
+
drop if ER33802!=1 //keep only if head is still within family unit
|
82 |
+
rename ER33801 fam_ID_year
|
83 |
+
joinby fam_ID_year using tempX2005.dta, unmatched(both)
|
84 |
+
drop if _merge!=3
|
85 |
+
drop _merge
|
86 |
+
drop if age_head!=ER33804 //drop obs. that are inconsistent about the age of head
|
87 |
+
drop if ER33808!=0 //drop if head has moved in/out (splitoffs)
|
88 |
+
drop ER*
|
89 |
+
save pX2005.dta, replace
|
90 |
+
*2007
|
91 |
+
use temp_masterX.dta,clear
|
92 |
+
drop if ER33903!=10 //keep only heads in that year
|
93 |
+
drop if ER33902!=1 //keep only if head is still within family unit
|
94 |
+
rename ER33901 fam_ID_year
|
95 |
+
joinby fam_ID_year using tempX2007.dta, unmatched(both)
|
96 |
+
drop if _merge!=3
|
97 |
+
drop _merge
|
98 |
+
drop if age_head!=ER33904 //drop obs. that are inconsistent about the age of head
|
99 |
+
drop if ER33908!=0 //drop if head has moved in/out (splitoffs)
|
100 |
+
drop ER*
|
101 |
+
save pX2007.dta, replace
|
102 |
+
*2009
|
103 |
+
use temp_masterX.dta,clear
|
104 |
+
drop if ER34003!=10 //keep only heads in that year
|
105 |
+
drop if ER34002!=1 //keep only if head is still within family unit
|
106 |
+
rename ER34001 fam_ID_year
|
107 |
+
joinby fam_ID_year using tempX2009.dta, unmatched(both)
|
108 |
+
drop if _merge!=3
|
109 |
+
drop _merge
|
110 |
+
drop if age_head!=ER34004 //drop obs. that are inconsistent about the age of head
|
111 |
+
drop if ER34008!=0 //drop if head has moved in/out (splitoffs)
|
112 |
+
drop ER*
|
113 |
+
save pX2009.dta, replace
|
114 |
+
*2011
|
115 |
+
use temp_masterX.dta,clear
|
116 |
+
drop if ER34103!=10 //keep only heads in that year
|
117 |
+
drop if ER34102!=1 //keep only if head is still within family unit
|
118 |
+
rename ER34101 fam_ID_year
|
119 |
+
joinby fam_ID_year using tempX2011.dta, unmatched(both)
|
120 |
+
drop if _merge!=3
|
121 |
+
drop _merge
|
122 |
+
drop if age_head!=ER34104 //drop obs. that are inconsistent about the age of head
|
123 |
+
drop if ER34108!=0 //drop if head has moved in/out (splitoffs)
|
124 |
+
drop ER*
|
125 |
+
save pX2011.dta, replace
|
126 |
+
|
127 |
+
*2013
|
128 |
+
use temp_masterX.dta,clear
|
129 |
+
drop if ER34203!=10 //keep only heads in that year
|
130 |
+
drop if ER34202!=1 //keep only if head is still within family unit
|
131 |
+
rename ER34201 fam_ID_year
|
132 |
+
joinby fam_ID_year using tempX2013.dta, unmatched(both)
|
133 |
+
drop if _merge!=3
|
134 |
+
drop _merge
|
135 |
+
drop if age_head!=ER34204 //drop obs. that are inconsistent about the age of head
|
136 |
+
drop if ER34208!=0 //drop if head has moved in/out (splitoffs)
|
137 |
+
drop ER*
|
138 |
+
save pX2013.dta, replace
|
139 |
+
|
140 |
+
|
141 |
+
*2015
|
142 |
+
use temp_masterX.dta,clear
|
143 |
+
drop if ER34303!=10 //keep only heads in that year
|
144 |
+
drop if ER34302!=1 //keep only if head is still within family unit
|
145 |
+
rename ER34301 fam_ID_year
|
146 |
+
joinby fam_ID_year using tempX2015.dta, unmatched(both)
|
147 |
+
drop if _merge!=3
|
148 |
+
drop _merge
|
149 |
+
drop if age_head!=ER34305 //drop obs. that are inconsistent about the age of head
|
150 |
+
drop if ER34309!=0 //drop if head has moved in/out (splitoffs)
|
151 |
+
drop ER*
|
152 |
+
save pX2015.dta, replace
|
153 |
+
|
154 |
+
|
155 |
+
*2017
|
156 |
+
use temp_masterX.dta,clear
|
157 |
+
drop if ER34503!=10 //keep only heads in that year
|
158 |
+
drop if ER34502!=1 //keep only if head is still within family unit
|
159 |
+
rename ER34501 fam_ID_year
|
160 |
+
joinby fam_ID_year using tempX2017.dta, unmatched(both)
|
161 |
+
drop if _merge!=3
|
162 |
+
drop _merge
|
163 |
+
drop if age_head!=ER34504 //drop obs. that are inconsistent about the age of head
|
164 |
+
drop if ER34508!=0 //drop if head has moved in/out (splitoffs)
|
165 |
+
drop ER*
|
166 |
+
save pX2017.dta, replace
|
167 |
+
|
168 |
+
|
169 |
+
|
170 |
+
****************************************
|
171 |
+
*Create panel
|
172 |
+
****************************************
|
173 |
+
*Adjust the names of the variables
|
174 |
+
forval x=1999(2)2017{
|
175 |
+
use pX`x'.dta, clear
|
176 |
+
ren aftertax_income_defl_equiv inc`x'
|
177 |
+
ren age_head age`x'
|
178 |
+
ren ed_head edu`x'
|
179 |
+
ren marital_status_head mstat`x'
|
180 |
+
ren fam_ID_year fam_ID`x'
|
181 |
+
ren size_fam size_fam`x'
|
182 |
+
drop fam_ID_1968 year_survey year mstat //drop variables that are not useful
|
183 |
+
save pkX`x'.dta,replace
|
184 |
+
}
|
185 |
+
|
186 |
+
*Join datasets to form a panel
|
187 |
+
use pkX1999.dta, clear
|
188 |
+
forval x=2001(2)2017{
|
189 |
+
joinby hid using pkX`x'.dta, unmatched(both)
|
190 |
+
drop if _merge!=3
|
191 |
+
drop _merge
|
192 |
+
local i=`x'-2
|
193 |
+
di "`i'"
|
194 |
+
gen b=age`x'-age`i'
|
195 |
+
tab b
|
196 |
+
drop if b!=2 & b!=1 & b!=3 // drop people that are inconsistent about their age (1/2/3 are consistent due to the differences in month of interview)
|
197 |
+
drop b
|
198 |
+
gen a=edu`x'-edu`i'
|
199 |
+
tab a
|
200 |
+
drop if a<0 // drop people that are inconsistent about their education (to adjust for any errors, see 2009 family codebook release info)
|
201 |
+
drop a
|
202 |
+
}
|
203 |
+
|
204 |
+
*Reshape the data for better use
|
205 |
+
reshape long inc age edu mstat fam_ID size_fam, i(hid) j(year)
|
206 |
+
|
207 |
+
save for_regX.dta, replace
|
42/replication_package/data_replication/psid/code/tab1_refi_liquidity.do
ADDED
@@ -0,0 +1,241 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
clear all
|
2 |
+
set more off
|
3 |
+
set maxvar 10000
|
4 |
+
set mem 500m
|
5 |
+
|
6 |
+
*Set path
|
7 |
+
***
|
8 |
+
|
9 |
+
|
10 |
+
*cd ---- specify path to \data_replication\psid\
|
11 |
+
|
12 |
+
local procdata "./proc_data/"
|
13 |
+
local rawdata "./raw_data/"
|
14 |
+
|
15 |
+
cd proc_data
|
16 |
+
|
17 |
+
use for_reg.dta, clear
|
18 |
+
|
19 |
+
|
20 |
+
*Prepare the panel
|
21 |
+
*drop if year>2007
|
22 |
+
drop if age<25 & year==1999
|
23 |
+
drop if age>85 & year==2011
|
24 |
+
bys hid: gen nyear=[_N]
|
25 |
+
keep if nyear==7
|
26 |
+
|
27 |
+
keep fam_ID year hid inc equiv age
|
28 |
+
save income_panel1.dta, replace
|
29 |
+
|
30 |
+
*Define the CPI annual average for each relevant year.
|
31 |
+
*These are defined for the relevant year of the survey (e.g cpi1999 is for 1998)
|
32 |
+
local cpi1999 = 163.01
|
33 |
+
local cpi2001 = 172.19
|
34 |
+
local cpi2003 = 179.87
|
35 |
+
local cpi2005 = 188.91
|
36 |
+
local cpi2007 = 201.56
|
37 |
+
local cpi2009 = 215.25
|
38 |
+
local cpi2011 = 218.09
|
39 |
+
|
40 |
+
cd ..
|
41 |
+
*###############################################################################
|
42 |
+
*Prepare the refinancing data for each year
|
43 |
+
*###############################################################################
|
44 |
+
forval x=1999(2)2003{
|
45 |
+
clear
|
46 |
+
*###############################################################################
|
47 |
+
*Prepare the wealth data
|
48 |
+
*###############################################################################
|
49 |
+
|
50 |
+
*Convert family files to stata format
|
51 |
+
cd raw_data
|
52 |
+
do FAM`x'ER.do
|
53 |
+
|
54 |
+
*Adjust wealth components
|
55 |
+
do wealth_comp`x'.do
|
56 |
+
gen year=`x'
|
57 |
+
|
58 |
+
drop ER*
|
59 |
+
|
60 |
+
cd ..
|
61 |
+
joinby fam_ID year using `procdata'income_panel1.dta, unmatched(both)
|
62 |
+
drop if _merge!=3
|
63 |
+
drop _merge
|
64 |
+
|
65 |
+
save `procdata'ref_temp_`x'.dta,replace
|
66 |
+
|
67 |
+
}
|
68 |
+
|
69 |
+
|
70 |
+
cd proc_data
|
71 |
+
|
72 |
+
*###############################################################################
|
73 |
+
*Generate Panel and calculate Share of refinancing
|
74 |
+
*###############################################################################
|
75 |
+
|
76 |
+
use ref_temp_1999.dta, clear
|
77 |
+
forval x=2001(2)2003{
|
78 |
+
append using ref_temp_`x'.dta
|
79 |
+
}
|
80 |
+
|
81 |
+
sort hid year
|
82 |
+
xtset hid year
|
83 |
+
|
84 |
+
*sum up both mortgages
|
85 |
+
gen tot_mtg_debt=m1_principal+m2_principal
|
86 |
+
|
87 |
+
*generate difference in mortgage balances between survey waves
|
88 |
+
gen past_mtg_balance=L2.tot_mtg_debt
|
89 |
+
gen diff_mtg_balance=tot_mtg_debt-past_mtg_balance
|
90 |
+
replace diff_mtg_balance=. if past_mtg_balance==0 //make sure to account for people that had no mtg and got one (went from 0 to positive mtg balance)
|
91 |
+
|
92 |
+
*generate refinancing dummies
|
93 |
+
*1. any increase in mtg balance
|
94 |
+
gen refi_status1=1 if diff_mtg_balance>0 & diff_mtg_balance!=.
|
95 |
+
replace refi_status1=0 if refi_status1!=1
|
96 |
+
*2. 5% increase in mtg balance (results are the same in terms of nr of observations between option 1. and option 2.)
|
97 |
+
gen pct_increase_mtg_balance=diff_mtg_balance/past_mtg_balance
|
98 |
+
gen refi_status2=1 if diff_mtg_balance>=.05 & diff_mtg_balance!=.
|
99 |
+
replace refi_status2=0 if refi_status2!=1
|
100 |
+
|
101 |
+
****************************************************************************************************************
|
102 |
+
*compute moments
|
103 |
+
****************************************************************************************************************
|
104 |
+
*create moments to be reported
|
105 |
+
gen liq_assets=(stocks+checking_savings-other_debt)/equiv
|
106 |
+
gen income = inc //already equivalized
|
107 |
+
gen liq_assets_to_inc = liq_assets/income
|
108 |
+
gen h_net_worth_share = (house_val - m1_principal-m2_principal)/wealth
|
109 |
+
gen wlth = wealth/equiv
|
110 |
+
gen ltv_m=tot_mtg_debt/house_val
|
111 |
+
gen h_value=house_val/equiv
|
112 |
+
*gen age_head=age
|
113 |
+
gen mtg_payments_total = (mtg_paym1+mtg_paym2)/equiv
|
114 |
+
gen pti = mtg_payments_total/inc
|
115 |
+
*save file
|
116 |
+
save temp_refi_data.dta, replace
|
117 |
+
|
118 |
+
|
119 |
+
*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
120 |
+
*2001
|
121 |
+
*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
122 |
+
use temp_refi_data, clear
|
123 |
+
keep if year==2001 | year==1999
|
124 |
+
*move refi status one step behind
|
125 |
+
*gen refit=f2.refi_status2
|
126 |
+
gen refit1=f2.refi_status2
|
127 |
+
gen refit2=f2.turnover1
|
128 |
+
gen refit=1 if refit1==1 & refit2!=1
|
129 |
+
replace refit=0 if refit!=1
|
130 |
+
*keep only orginal year
|
131 |
+
keep if year==1999
|
132 |
+
*winsorize data
|
133 |
+
winsor2 liq_assets income liq_assets_to_inc h_net_worth_share wlth ltv_m h_value age_head pti, replace cuts(1 99)
|
134 |
+
|
135 |
+
|
136 |
+
***
|
137 |
+
*Moments
|
138 |
+
***
|
139 |
+
********************************************************************************************************************************************
|
140 |
+
*NOTE that in the construction of moments below we:
|
141 |
+
*1) adjust to 2016 values, where we use the CPI values based on the series CPALTT01USA661S from https://fred.stlouisfed.org/series/CPALTT01USA661S
|
142 |
+
*2) round up dollar values to have more readable table entries (hundreds, thousands, etc.)
|
143 |
+
|
144 |
+
|
145 |
+
preserve
|
146 |
+
collapse (mean) liq_assets if ownership==1 & refit==1 & refit2!=1
|
147 |
+
gen res= liq_assets * 101.26/70.28 //1999 to 2016 conversion
|
148 |
+
replace res = round(res, 100)
|
149 |
+
gen title="Mean Liquid Assets (extract)"
|
150 |
+
save moment1.dta, replace
|
151 |
+
restore
|
152 |
+
|
153 |
+
preserve
|
154 |
+
collapse (mean) liq_assets if ownership==1 & refit==0 & refit2!=1
|
155 |
+
gen res= liq_assets * 101.26/70.28 //1999 to 2016 conversion
|
156 |
+
replace res = round(res, 100)
|
157 |
+
gen title="Mean Liquid Assets (do not extract)"
|
158 |
+
save moment2.dta, replace
|
159 |
+
restore
|
160 |
+
|
161 |
+
preserve
|
162 |
+
collapse (median) liq_assets if ownership==1 & refit==1 & refit2!=1
|
163 |
+
gen res= liq_assets * 101.26/70.28 //1999 to 2016 conversion
|
164 |
+
replace res = round(res, 100)
|
165 |
+
gen title="Median Liquid Assets (extract)"
|
166 |
+
save moment3.dta, replace
|
167 |
+
restore
|
168 |
+
|
169 |
+
preserve
|
170 |
+
collapse (median) liq_assets if ownership==1 & refit==0 & refit2!=1
|
171 |
+
gen res= liq_assets * 101.26/70.28 //1999 to 2016 conversion
|
172 |
+
replace res = round(res, 100)
|
173 |
+
gen title="Median Liquid Assets (do not extract)"
|
174 |
+
save moment4.dta, replace
|
175 |
+
restore
|
176 |
+
|
177 |
+
preserve
|
178 |
+
gen mlaw = liq_assets/wlth
|
179 |
+
winsor2 mlaw, replace cuts(1 99)
|
180 |
+
collapse (mean) mlaw if ownership==1 & refit==1 & refit2!=1
|
181 |
+
gen res = mlaw
|
182 |
+
replace res = round(res, 0.01)+0.01
|
183 |
+
gen title="Mean Liquid Assets to Wealth Ratio (extract)"
|
184 |
+
save moment5.dta, replace
|
185 |
+
restore
|
186 |
+
|
187 |
+
|
188 |
+
preserve
|
189 |
+
gen mlaw = liq_assets/wlth
|
190 |
+
winsor2 mlaw, replace cuts(1 99)
|
191 |
+
collapse (mean) mlaw if ownership==1 & refit==0 & refit2!=1
|
192 |
+
gen res = mlaw
|
193 |
+
replace res = round(res, 0.01)+0.01
|
194 |
+
gen title="Mean Liquid Assets to Wealth Ratio (do not extract)"
|
195 |
+
save moment6.dta, replace
|
196 |
+
restore
|
197 |
+
|
198 |
+
preserve
|
199 |
+
gen mlaw = liq_assets/wlth
|
200 |
+
collapse (median) mlaw if ownership==1 & refit==1 & refit2!=1
|
201 |
+
gen res = mlaw
|
202 |
+
replace res = round(res, 0.01)
|
203 |
+
gen title="Median Liquid Assets to Wealth Ratio (extract)"
|
204 |
+
save moment7.dta, replace
|
205 |
+
restore
|
206 |
+
|
207 |
+
|
208 |
+
preserve
|
209 |
+
gen mlaw = liq_assets/wlth
|
210 |
+
collapse (median) mlaw if ownership==1 & refit==0 & refit2!=1
|
211 |
+
gen res = mlaw
|
212 |
+
replace res = round(res, 0.01)
|
213 |
+
gen title="Median Liquid Assets to Wealth Ratio (do not extract)"
|
214 |
+
save moment8.dta, replace
|
215 |
+
restore
|
216 |
+
|
217 |
+
|
218 |
+
|
219 |
+
|
220 |
+
*+++++++++++++++++++++++++++++++++++++
|
221 |
+
forval x=1(1)8{
|
222 |
+
use moment`x'.dta, clear
|
223 |
+
keep res title
|
224 |
+
duplicates drop
|
225 |
+
save moment`x'.dta, replace
|
226 |
+
}
|
227 |
+
|
228 |
+
use moment1.dta, clear
|
229 |
+
forval x=2(1)8{
|
230 |
+
append using moment`x'.dta
|
231 |
+
}
|
232 |
+
|
233 |
+
order title res
|
234 |
+
|
235 |
+
cd ..
|
236 |
+
|
237 |
+
cd output
|
238 |
+
|
239 |
+
outsheet using tab1_refi_liquidity.csv, replace c
|
240 |
+
|
241 |
+
|
42/replication_package/data_replication/psid/code/tab1_refi_moments.do
ADDED
@@ -0,0 +1,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
clear all
|
3 |
+
set more off
|
4 |
+
set maxvar 10000
|
5 |
+
set mem 500m
|
6 |
+
|
7 |
+
*Set path
|
8 |
+
***
|
9 |
+
|
10 |
+
*cd ---- specify path to \data_replication\psid\
|
11 |
+
|
12 |
+
local procdata "./proc_data/"
|
13 |
+
local rawdata "./raw_data/"
|
14 |
+
|
15 |
+
cd proc_data
|
16 |
+
|
17 |
+
use for_reg.dta, clear
|
18 |
+
|
19 |
+
|
20 |
+
*Prepare the panel
|
21 |
+
*drop if year>2007
|
22 |
+
drop if age<25 & year==1999
|
23 |
+
drop if age>85 & year==2011
|
24 |
+
bys hid: gen nyear=[_N]
|
25 |
+
keep if nyear==7
|
26 |
+
|
27 |
+
keep fam_ID year hid inc equiv age
|
28 |
+
save income_panel1.dta, replace
|
29 |
+
|
30 |
+
cd ..
|
31 |
+
|
32 |
+
*###############################################################################
|
33 |
+
*Prepare the refinancing data for each year
|
34 |
+
*###############################################################################
|
35 |
+
forval x=1999(2)2003{
|
36 |
+
clear
|
37 |
+
*###############################################################################
|
38 |
+
*Prepare the wealth data
|
39 |
+
*###############################################################################
|
40 |
+
|
41 |
+
*Convert family files to stata format
|
42 |
+
cd raw_data
|
43 |
+
do FAM`x'ER.do
|
44 |
+
|
45 |
+
*Adjust wealth components
|
46 |
+
do wealth_comp`x'.do
|
47 |
+
gen year=`x'
|
48 |
+
drop ER*
|
49 |
+
|
50 |
+
cd ..
|
51 |
+
joinby fam_ID year using `procdata'income_panel1.dta, unmatched(both)
|
52 |
+
drop if _merge!=3
|
53 |
+
drop _merge
|
54 |
+
|
55 |
+
save `procdata'ref_temp_`x'.dta,replace
|
56 |
+
|
57 |
+
}
|
58 |
+
|
59 |
+
cd proc_data
|
60 |
+
|
61 |
+
*###############################################################################
|
62 |
+
*Generate Panel and calculate Share of refinancing
|
63 |
+
*###############################################################################
|
64 |
+
|
65 |
+
use ref_temp_1999.dta, clear
|
66 |
+
forval x=2001(2)2003{
|
67 |
+
append using ref_temp_`x'.dta
|
68 |
+
}
|
69 |
+
|
70 |
+
sort hid year
|
71 |
+
xtset hid year
|
72 |
+
|
73 |
+
*sum up both mortgages
|
74 |
+
gen tot_mtg_debt=m1_principal+m2_principal
|
75 |
+
|
76 |
+
*generate difference in mortgage balances between survey waves
|
77 |
+
gen past_mtg_balance=L2.tot_mtg_debt
|
78 |
+
gen diff_mtg_balance=tot_mtg_debt-past_mtg_balance
|
79 |
+
replace diff_mtg_balance=. if past_mtg_balance==0 //make sure to account for people that had no mtg and got one (went from 0 to positive mtg balance)
|
80 |
+
|
81 |
+
*generate refinancing dummies
|
82 |
+
*1. any increase in mtg balance
|
83 |
+
gen refi_status1=1 if diff_mtg_balance>0 & diff_mtg_balance!=.
|
84 |
+
replace refi_status1=0 if refi_status1!=1
|
85 |
+
*2. 5% increase in mtg balance (results are the same in terms of nr of observations between option 1. and option 2.)
|
86 |
+
gen pct_increase_mtg_balance=diff_mtg_balance/past_mtg_balance
|
87 |
+
gen refi_status2=1 if diff_mtg_balance>=.05 & diff_mtg_balance!=.
|
88 |
+
replace refi_status2=0 if refi_status2!=1
|
89 |
+
|
90 |
+
****************************************************************************************************************
|
91 |
+
*compute moments
|
92 |
+
****************************************************************************************************************
|
93 |
+
*create moments to be reported
|
94 |
+
gen liq_assets=(stocks+checking_savings-other_debt)/equiv
|
95 |
+
gen income = inc //already equivalized
|
96 |
+
gen liq_assets_to_inc = liq_assets/income
|
97 |
+
gen h_net_worth_share = (house_val - m1_principal-m2_principal)/wealth
|
98 |
+
gen wlth = wealth/equiv
|
99 |
+
gen ltv_m=tot_mtg_debt/house_val
|
100 |
+
gen h_value=house_val/equiv
|
101 |
+
*gen age_head=age
|
102 |
+
gen mtg_payments_total = (mtg_paym1+mtg_paym2)/equiv
|
103 |
+
gen pti = mtg_payments_total/inc
|
104 |
+
*save file
|
105 |
+
save temp_refi_data.dta, replace
|
106 |
+
|
107 |
+
|
108 |
+
use temp_refi_data, clear
|
109 |
+
|
110 |
+
|
111 |
+
|
112 |
+
*************************************************************************
|
113 |
+
* OTHER REFI MOMENTS
|
114 |
+
*************************************************************************
|
115 |
+
*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
116 |
+
*2001
|
117 |
+
*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
118 |
+
use temp_refi_data, clear
|
119 |
+
keep if year==2001 | year==1999
|
120 |
+
*move refi status one step behind
|
121 |
+
gen refit1=f2.refi_status2
|
122 |
+
gen refit2=f2.turnover1
|
123 |
+
gen refit=1 if refit1==1 & refit2!=1
|
124 |
+
replace refit=0 if refit!=1
|
125 |
+
*move back increase in mtg balance
|
126 |
+
gen mtg_delta=f2.pct_increase_mtg_balance
|
127 |
+
gen mtg_delta1=f2.diff_mtg_balance/house_val
|
128 |
+
*keep only orginal year
|
129 |
+
keep if year==1999
|
130 |
+
*winsorize data
|
131 |
+
winsor2 liq_assets income liq_assets_to_inc h_net_worth_share wlth ltv_m h_value age_head pti mtg_delta mtg_delta1, replace cuts(1 99)
|
132 |
+
|
133 |
+
|
134 |
+
preserve
|
135 |
+
collapse (mean) refit
|
136 |
+
gen res=round(round(refit,0.01)/2,0.01)
|
137 |
+
gen title="fraction of people refinance"
|
138 |
+
save moment1.dta, replace
|
139 |
+
restore
|
140 |
+
|
141 |
+
preserve
|
142 |
+
collapse (mean) refit
|
143 |
+
gen res= 1 -round(round(refit,0.01)/2,0.01)
|
144 |
+
gen title="fraction of people that do not refinance"
|
145 |
+
save moment2.dta, replace
|
146 |
+
restore
|
147 |
+
|
148 |
+
preserve
|
149 |
+
collapse (median) mtg_delta if refit==1
|
150 |
+
gen res=round(mtg_delta, 0.01)
|
151 |
+
gen title="median % increase in mortgage balance conditional on refinancing (for those that have a positive balance)"
|
152 |
+
save moment3.dta, replace
|
153 |
+
restore
|
154 |
+
|
155 |
+
|
156 |
+
preserve
|
157 |
+
collapse (median) mtg_delta1 if refit==1
|
158 |
+
gen res=round(mtg_delta1, 0.01)
|
159 |
+
gen title="median % change in mortgage debt (relative to the value of the home) conditional on refinancing"
|
160 |
+
save moment4.dta, replace
|
161 |
+
restore
|
162 |
+
|
163 |
+
|
164 |
+
forval x=1(1)4{
|
165 |
+
use moment`x'.dta, clear
|
166 |
+
keep res title
|
167 |
+
duplicates drop
|
168 |
+
save moment`x'.dta, replace
|
169 |
+
}
|
170 |
+
|
171 |
+
use moment1.dta, clear
|
172 |
+
forval x=2(1)4{
|
173 |
+
append using moment`x'.dta
|
174 |
+
}
|
175 |
+
|
176 |
+
order title res
|
177 |
+
|
178 |
+
cd ..
|
179 |
+
|
180 |
+
cd output
|
181 |
+
|
182 |
+
outsheet using tab1_refi_moments.csv, replace c
|
183 |
+
|
42/replication_package/data_replication/psid/code/tab2_income.do
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
clear all
|
2 |
+
set more off
|
3 |
+
set maxvar 10000
|
4 |
+
set mem 500m
|
5 |
+
|
6 |
+
*Set path
|
7 |
+
***
|
8 |
+
|
9 |
+
|
10 |
+
*cd ---- specify path to \data_replication\psid\
|
11 |
+
|
12 |
+
local procdata "./proc_data/"
|
13 |
+
local rawdata "./raw_data/"
|
14 |
+
|
15 |
+
cd proc_data
|
16 |
+
|
17 |
+
*Create consumption panel
|
18 |
+
*!!!!!!!!!!!!!!!!!!!!! consumption files are generated by the do-file 'consumption.do'
|
19 |
+
use cons1999.dta, clear
|
20 |
+
forval x=2001(2)2011{
|
21 |
+
append using cons`x'.dta
|
22 |
+
}
|
23 |
+
|
24 |
+
sort hid year
|
25 |
+
xtset hid year
|
26 |
+
|
27 |
+
save health_costs_for_income.dta, replace
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
*import income data
|
32 |
+
use for_reg.dta, clear
|
33 |
+
*merge with health costs
|
34 |
+
joinby hid year using health_costs_for_income.dta, unmatched(both)
|
35 |
+
tab _merge
|
36 |
+
drop if _merge!=3
|
37 |
+
|
38 |
+
*Prepare for regressions
|
39 |
+
*take out health costs
|
40 |
+
*first deflate costs
|
41 |
+
*Define the CPI annual average for each relevant year.
|
42 |
+
*These are defined for the relevant year of the survey (e.g cpi1999 is for 1998)
|
43 |
+
local cpi1999 = 163.01
|
44 |
+
local cpi2001 = 172.19
|
45 |
+
local cpi2003 = 179.87
|
46 |
+
local cpi2005 = 188.91
|
47 |
+
local cpi2007 = 201.56
|
48 |
+
local cpi2009 = 215.25
|
49 |
+
local cpi2011 = 218.09
|
50 |
+
gen heal_cons_deflated=heal_cons
|
51 |
+
forval x=1999(2)2011{
|
52 |
+
replace heal_cons_deflated=heal_cons_deflated*(`cpi1999' / `cpi`x'') if year==`x'
|
53 |
+
}
|
54 |
+
*take out equivalized! costs
|
55 |
+
*replace inc=inc-heal_cons_deflated/equiv
|
56 |
+
|
57 |
+
drop if inc<0
|
58 |
+
|
59 |
+
|
60 |
+
drop if year>2007
|
61 |
+
drop if age<25 & year==1999
|
62 |
+
drop if age>85 & year==2007
|
63 |
+
bys hid: gen nyear=[_N]
|
64 |
+
keep if nyear==5
|
65 |
+
|
66 |
+
*Generate the age polynomial
|
67 |
+
gen a2=(age^2)/10
|
68 |
+
|
69 |
+
*Generate year dummies
|
70 |
+
tab year, gen(time_dummy)
|
71 |
+
|
72 |
+
*Convert income into logs and keep only the relevant variables
|
73 |
+
replace inc=log(inc)
|
74 |
+
keep inc time_dummy* age a2 hid year
|
75 |
+
|
76 |
+
*Create retirement dummy
|
77 |
+
gen retired=1 if age>=65
|
78 |
+
replace retired=0 if retired!=1
|
79 |
+
|
80 |
+
*Find fit before retirement
|
81 |
+
reg inc age a2 time_dummy* retired
|
82 |
+
|
83 |
+
|
84 |
+
|
85 |
+
************************************************
|
86 |
+
************************************************
|
87 |
+
*Report the coefficients of the age polynomial
|
88 |
+
estimates table, keep(age a2 retired) b
|
89 |
+
************************************************
|
90 |
+
************************************************
|
91 |
+
|
92 |
+
predict inc_hat
|
93 |
+
|
94 |
+
|
95 |
+
*Compute the deviation after permanent differences have been removed
|
96 |
+
gen x_tilda=inc //use just log income
|
97 |
+
|
98 |
+
|
99 |
+
|
100 |
+
*Clean all observations that are above or below a threshold !!!!!!!!!!!!
|
101 |
+
*Make years consecutive
|
102 |
+
replace year=1 if year==1999
|
103 |
+
replace year=2 if year==2001
|
104 |
+
replace year=3 if year==2003
|
105 |
+
replace year=4 if year==2005
|
106 |
+
replace year=5 if year==2007
|
107 |
+
|
108 |
+
xtset hid year
|
109 |
+
|
110 |
+
*Compute mean by household (across time)
|
111 |
+
bysort hid: egen mean_hid_inc=mean(inc)
|
112 |
+
*Generate deviation from mean
|
113 |
+
gen dif_mean=inc-mean_hid_inc
|
114 |
+
*Find the top and bottom 1 percent
|
115 |
+
sum dif_mean, d
|
116 |
+
gen p1=r(p1)
|
117 |
+
gen p99=r(p99)
|
118 |
+
*Remove observations that are in the tails
|
119 |
+
replace x_tilda=. if dif_mean<=p1
|
120 |
+
replace x_tilda=. if dif_mean>=p99
|
121 |
+
|
122 |
+
*################################################
|
123 |
+
*FIND AUTOCOVARIANCES
|
124 |
+
*################################################
|
125 |
+
|
126 |
+
|
127 |
+
|
128 |
+
|
129 |
+
|
130 |
+
|
131 |
+
preserve
|
132 |
+
|
133 |
+
*Generate lag structure to compute the autocovariances
|
134 |
+
gen lag1_x_tilda=L.x_tilda
|
135 |
+
gen lag2_x_tilda=L2.x_tilda
|
136 |
+
gen lag3_x_tilda=L3.x_tilda
|
137 |
+
gen lag4_x_tilda=L4.x_tilda
|
138 |
+
|
139 |
+
*Compute autocovariances
|
140 |
+
*1)Variance
|
141 |
+
correlate x_tilda x_tilda, covariance
|
142 |
+
gen v0=r(Var_1)
|
143 |
+
*2)Lags
|
144 |
+
forval x=1(1)4{
|
145 |
+
correlate x_tilda lag`x'_x_tilda, covariance
|
146 |
+
g float v`x'=r(cov_12)
|
147 |
+
}
|
148 |
+
keep v*
|
149 |
+
duplicates drop
|
150 |
+
|
151 |
+
************************************************
|
152 |
+
************************************************
|
153 |
+
*Export results for autocovariances
|
154 |
+
save autocov_final_new_NO_health_ALL_v3.dta, replace
|
155 |
+
************************************************
|
156 |
+
************************************************
|
157 |
+
|
158 |
+
restore
|
159 |
+
|
160 |
+
gen lag1_x_tilda=L.x_tilda
|
161 |
+
keep x_tilda lag1_x_tilda
|
162 |
+
|
163 |
+
gen dif_x_tilda=x_tilda-lag1_x_tilda
|
164 |
+
|
165 |
+
egen SD = sd(dif_x_tilda)
|
166 |
+
|
167 |
+
egen KURT = kurt(dif_x_tilda)
|
168 |
+
|
169 |
+
egen SKEW = skew(dif_x_tilda)
|
170 |
+
|
171 |
+
keep SD KURT SKEW
|
172 |
+
|
173 |
+
|
174 |
+
duplicates drop
|
175 |
+
|
176 |
+
merge using autocov_final_new_NO_health_ALL_v3.dta
|
177 |
+
|
178 |
+
drop _merge
|
179 |
+
|
180 |
+
*keep only the relevant moments and order them according for table 2
|
181 |
+
keep SD v0 v1 v2
|
182 |
+
replace SD = round(SD, 0.01)
|
183 |
+
replace v0 = round(v0, 0.01)
|
184 |
+
replace v1 = round(v1, 0.01)
|
185 |
+
replace v2 = round(v2, 0.01)
|
186 |
+
|
187 |
+
order v0 v1 v2 SD
|
188 |
+
|
189 |
+
cd ..
|
190 |
+
|
191 |
+
cd output
|
192 |
+
|
193 |
+
outsheet using tab2_income.csv, c replace
|
194 |
+
|
42/replication_package/data_replication/psid/code/tabA3_refi.do
ADDED
@@ -0,0 +1,192 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
clear all
|
2 |
+
set more off
|
3 |
+
set maxvar 10000
|
4 |
+
set mem 500m
|
5 |
+
|
6 |
+
*Set path
|
7 |
+
***
|
8 |
+
|
9 |
+
*cd ---- specify path to \data_replication\psid\
|
10 |
+
|
11 |
+
local procdata "./proc_data/"
|
12 |
+
local rawdata "./raw_data/"
|
13 |
+
|
14 |
+
cd proc_data
|
15 |
+
|
16 |
+
*load income data
|
17 |
+
forval x=2015(2)2017{
|
18 |
+
use pX`x'.dta, clear
|
19 |
+
ren aftertax_income_defl_equiv inc`x'
|
20 |
+
ren age_head age`x'
|
21 |
+
ren ed_head edu`x'
|
22 |
+
ren marital_status_head mstat`x'
|
23 |
+
ren fam_ID_year fam_ID`x'
|
24 |
+
ren size_fam size_fam`x'
|
25 |
+
drop fam_ID_1968 year_survey year mstat //drop variables that are not useful
|
26 |
+
save pkX`x'.dta,replace
|
27 |
+
}
|
28 |
+
|
29 |
+
*Join datasets to form a panel
|
30 |
+
use pkX2015.dta, clear
|
31 |
+
forval x=2017(2)2017{
|
32 |
+
joinby hid using pkX`x'.dta, unmatched(both)
|
33 |
+
drop if _merge!=3
|
34 |
+
drop _merge
|
35 |
+
local i=`x'-2
|
36 |
+
di "`i'"
|
37 |
+
gen b=age`x'-age`i'
|
38 |
+
tab b
|
39 |
+
drop if b!=2 & b!=1 & b!=3 // drop people that are inconsistent about their age (1/2/3 are consistent due to the differences in month of interview)
|
40 |
+
drop b
|
41 |
+
gen a=edu`x'-edu`i'
|
42 |
+
tab a
|
43 |
+
drop if a<0 // drop people that are inconsistent about their education (to adjust for any errors, see 2009 family codebook release info)
|
44 |
+
drop a
|
45 |
+
}
|
46 |
+
|
47 |
+
*Reshape the data for better use
|
48 |
+
reshape long inc age edu mstat fam_ID size_fam, i(hid) j(year)
|
49 |
+
|
50 |
+
|
51 |
+
|
52 |
+
drop if inc<0
|
53 |
+
|
54 |
+
|
55 |
+
drop if year<2015
|
56 |
+
drop if year>2017
|
57 |
+
drop if age<25
|
58 |
+
drop if age>85
|
59 |
+
|
60 |
+
keep fam_ID year hid inc equiv age
|
61 |
+
save income_panel1_temp.dta, replace
|
62 |
+
|
63 |
+
cd ..
|
64 |
+
*###############################################################################
|
65 |
+
*Prepare the refinancing data for each year
|
66 |
+
*###############################################################################
|
67 |
+
forval x=2015(2)2017{
|
68 |
+
clear
|
69 |
+
*###############################################################################
|
70 |
+
*Prepare the wealth data
|
71 |
+
*###############################################################################
|
72 |
+
|
73 |
+
*Convert family files to stata format
|
74 |
+
cd raw_data
|
75 |
+
do FAM`x'ER.do
|
76 |
+
|
77 |
+
*Adjust wealth components
|
78 |
+
do wealth_comp`x'.do
|
79 |
+
gen year=`x'
|
80 |
+
|
81 |
+
drop ER*
|
82 |
+
|
83 |
+
cd ..
|
84 |
+
joinby fam_ID year using `procdata'income_panel1_temp.dta, unmatched(both)
|
85 |
+
drop if _merge!=3
|
86 |
+
drop _merge
|
87 |
+
|
88 |
+
save `procdata'ref_temp_`x'.dta,replace
|
89 |
+
|
90 |
+
}
|
91 |
+
|
92 |
+
cd proc_data
|
93 |
+
|
94 |
+
*###############################################################################
|
95 |
+
*Generate Panel and calculate Share of refinancing
|
96 |
+
*###############################################################################
|
97 |
+
|
98 |
+
use ref_temp_2015.dta, clear
|
99 |
+
forval x=2017(2)2017{
|
100 |
+
append using ref_temp_`x'.dta
|
101 |
+
}
|
102 |
+
|
103 |
+
sort hid year
|
104 |
+
xtset hid year
|
105 |
+
|
106 |
+
*sum up both mortgages
|
107 |
+
gen tot_mtg_debt=m1_principal+m2_principal
|
108 |
+
|
109 |
+
*generate difference in mortgage balances between survey waves
|
110 |
+
gen past_mtg_balance=L2.tot_mtg_debt
|
111 |
+
gen diff_mtg_balance=tot_mtg_debt-past_mtg_balance
|
112 |
+
replace diff_mtg_balance=. if past_mtg_balance==0 //make sure to account for people that had no mtg and got one (went from 0 to positive mtg balance)
|
113 |
+
|
114 |
+
*generate refinancing dummies
|
115 |
+
*1. any increase in mtg balance
|
116 |
+
gen refi_status1=1 if diff_mtg_balance>0 & diff_mtg_balance!=.
|
117 |
+
replace refi_status1=0 if refi_status1!=1
|
118 |
+
*2. 5% increase in mtg balance (results are the same in terms of nr of observations between option 1. and option 2.)
|
119 |
+
gen pct_increase_mtg_balance=diff_mtg_balance/past_mtg_balance
|
120 |
+
gen refi_status2=1 if diff_mtg_balance>=.05 & diff_mtg_balance!=.
|
121 |
+
replace refi_status2=0 if refi_status2!=1
|
122 |
+
|
123 |
+
****************************************************************************************************************
|
124 |
+
*compute moments
|
125 |
+
****************************************************************************************************************
|
126 |
+
*create moments to be reported
|
127 |
+
gen liq_assets=(stocks+checking_savings-other_debt)/equiv
|
128 |
+
gen income = inc //already equivalized
|
129 |
+
gen liq_assets_to_inc = liq_assets/income
|
130 |
+
gen h_net_worth_share = (house_val - m1_principal-m2_principal)/wealth
|
131 |
+
gen wlth = wealth/equiv
|
132 |
+
gen ltv_m=tot_mtg_debt/house_val
|
133 |
+
gen h_value=house_val/equiv
|
134 |
+
*gen age_head=age
|
135 |
+
gen mtg_payments_total = (mtg_paym1+mtg_paym2)/equiv
|
136 |
+
gen pti = mtg_payments_total/inc
|
137 |
+
*save file
|
138 |
+
save temp_refi_data.dta, replace
|
139 |
+
|
140 |
+
|
141 |
+
|
142 |
+
|
143 |
+
|
144 |
+
*************************************************************************
|
145 |
+
* OTHER REFI MOMENTS
|
146 |
+
*************************************************************************
|
147 |
+
*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
148 |
+
*2017
|
149 |
+
*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
150 |
+
use temp_refi_data, clear
|
151 |
+
keep if year==2015 | year==2017
|
152 |
+
*move refi status one step behind
|
153 |
+
gen refit1=f2.refi_status2
|
154 |
+
gen refit2=f2.turnover1
|
155 |
+
gen refit=1 if refit1==1 & refit2!=1
|
156 |
+
replace refit=0 if refit!=1
|
157 |
+
*move back increase in mtg balance
|
158 |
+
gen mtg_delta=f2.pct_increase_mtg_balance
|
159 |
+
gen mtg_delta1=f2.diff_mtg_balance/house_val
|
160 |
+
*keep only orginal year
|
161 |
+
keep if year==2015
|
162 |
+
*winsorize data
|
163 |
+
winsor2 liq_assets income liq_assets_to_inc h_net_worth_share wlth ltv_m h_value age_head pti mtg_delta mtg_delta1, replace cuts(1 99)
|
164 |
+
|
165 |
+
|
166 |
+
preserve
|
167 |
+
collapse (mean) refit
|
168 |
+
gen res=round(refit, 0.01)/2
|
169 |
+
replace res=round(res, 0.01)
|
170 |
+
gen title="fraction of people refinance"
|
171 |
+
save moment1.dta, replace
|
172 |
+
restore
|
173 |
+
|
174 |
+
|
175 |
+
forval x=1(1)1{
|
176 |
+
use moment`x'.dta, clear
|
177 |
+
keep res title
|
178 |
+
duplicates drop
|
179 |
+
save moment`x'.dta, replace
|
180 |
+
}
|
181 |
+
|
182 |
+
use moment1.dta, clear
|
183 |
+
|
184 |
+
order title res
|
185 |
+
|
186 |
+
cd ..
|
187 |
+
|
188 |
+
cd output
|
189 |
+
|
190 |
+
outsheet using tabA3_refi.csv, replace c
|
191 |
+
|
192 |
+
|
42/replication_package/data_replication/psid/code/taxsim.do
ADDED
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
clear all
|
2 |
+
set more off
|
3 |
+
set maxvar 10000
|
4 |
+
|
5 |
+
*Set path
|
6 |
+
***
|
7 |
+
|
8 |
+
*cd ---- specify path to \data_replication\psid\
|
9 |
+
local procdata "./proc_data"
|
10 |
+
|
11 |
+
*Define the CPI annual average for each relevant year.
|
12 |
+
*These are defined for the relevant year of the survey (e.g cpi1999 is for 1998)
|
13 |
+
local cpi1999 = 163.01
|
14 |
+
local cpi2001 = 172.19
|
15 |
+
local cpi2003 = 179.87
|
16 |
+
local cpi2005 = 188.91
|
17 |
+
local cpi2007 = 201.56
|
18 |
+
local cpi2009 = 215.25
|
19 |
+
local cpi2011 = 218.09
|
20 |
+
|
21 |
+
*Run TAXSIM and compute disposable income
|
22 |
+
forval x=1999(2)2011{
|
23 |
+
di "YEAR `x'"
|
24 |
+
|
25 |
+
cd raw_data
|
26 |
+
|
27 |
+
*Recode the PSID data
|
28 |
+
do FAM`x'ER.do
|
29 |
+
|
30 |
+
*Construct the variables of interest (income components)
|
31 |
+
do save_data_`x'.do
|
32 |
+
|
33 |
+
|
34 |
+
********************
|
35 |
+
*Proceed to TAXSIM
|
36 |
+
********************
|
37 |
+
*Generate tax year (previous year from the survey year)
|
38 |
+
g year = year_survey - 1
|
39 |
+
|
40 |
+
*Convert PSID state codes to TAXSIM state format
|
41 |
+
g state = 0
|
42 |
+
replace state = 1 if state_residence == 01 /* Alabama */
|
43 |
+
replace state = 2 if state_residence == 50 /* Alaska */
|
44 |
+
replace state = 3 if state_residence == 02 /* Arizona */
|
45 |
+
replace state = 4 if state_residence == 03 /* Arkansas */
|
46 |
+
replace state = 5 if state_residence == 04 /* California */
|
47 |
+
replace state = 6 if state_residence == 05 /* Colorado */
|
48 |
+
replace state = 7 if state_residence == 06 /* Connecticut */
|
49 |
+
replace state = 8 if state_residence == 07 /* Delaware */
|
50 |
+
replace state = 9 if state_residence == 08 /* DC */
|
51 |
+
replace state = 10 if state_residence == 09 /* Florida */
|
52 |
+
replace state = 11 if state_residence == 10 /* Georgia */
|
53 |
+
replace state = 12 if state_residence == 51 /* Hawaii */
|
54 |
+
replace state = 13 if state_residence == 11 /* Idaho */
|
55 |
+
replace state = 14 if state_residence == 12 /* Illinois */
|
56 |
+
replace state = 15 if state_residence == 13 /* Indiana */
|
57 |
+
replace state = 16 if state_residence == 14 /* Iowa */
|
58 |
+
replace state = 17 if state_residence == 15 /* Kansas */
|
59 |
+
replace state = 18 if state_residence == 16 /* Kentucky */
|
60 |
+
replace state = 19 if state_residence == 17 /* Louisiana */
|
61 |
+
replace state = 20 if state_residence == 18 /* Maine */
|
62 |
+
replace state = 21 if state_residence == 19 /* Maryland */
|
63 |
+
replace state = 22 if state_residence == 20 /* Massachusetts */
|
64 |
+
replace state = 23 if state_residence == 21 /* Michigan */
|
65 |
+
replace state = 24 if state_residence == 22 /* Minnesota */
|
66 |
+
replace state = 25 if state_residence == 23 /* Missippi */
|
67 |
+
replace state = 26 if state_residence == 24 /* Missouri */
|
68 |
+
replace state = 27 if state_residence == 25 /* Montana */
|
69 |
+
replace state = 28 if state_residence == 26 /* Nebraska */
|
70 |
+
replace state = 29 if state_residence == 27 /* Nevada */
|
71 |
+
replace state = 30 if state_residence == 28 /* NewHampshire */
|
72 |
+
replace state = 31 if state_residence == 29 /* NewJersey */
|
73 |
+
replace state = 32 if state_residence == 30 /* NewMexico */
|
74 |
+
replace state = 33 if state_residence == 31 /* NewYork */
|
75 |
+
replace state = 34 if state_residence == 32 /* NorthCarolina */
|
76 |
+
replace state = 35 if state_residence == 33 /* NorthDakota */
|
77 |
+
replace state = 36 if state_residence == 34 /* Ohio */
|
78 |
+
replace state = 37 if state_residence == 35 /* Oklahoma */
|
79 |
+
replace state = 38 if state_residence == 36 /* Oregon */
|
80 |
+
replace state = 39 if state_residence == 37 /* Pennsylvania */
|
81 |
+
replace state = 40 if state_residence == 38 /* RhodeIsland */
|
82 |
+
replace state = 41 if state_residence == 39 /* SouthCarolina */
|
83 |
+
replace state = 42 if state_residence == 40 /* SouthDakota */
|
84 |
+
replace state = 43 if state_residence == 41 /* Tennessee */
|
85 |
+
replace state = 44 if state_residence == 42 /* Texas */
|
86 |
+
replace state = 45 if state_residence == 43 /* Utah */
|
87 |
+
replace state = 46 if state_residence == 44 /* Vermont */
|
88 |
+
replace state = 47 if state_residence == 45 /* Virginia */
|
89 |
+
replace state = 48 if state_residence == 46 /* Washington */
|
90 |
+
replace state = 49 if state_residence == 47 /* WestVirginia */
|
91 |
+
replace state = 50 if state_residence == 48 /* Wisconsin */
|
92 |
+
replace state = 51 if state_residence == 49 /* Wyoming */
|
93 |
+
|
94 |
+
*Marital status: 1 for single, 2 for joint, 3 for head of household.
|
95 |
+
* Making single if never married, widowed, divorced, separated, or other.
|
96 |
+
g mstat = cond(marital_status_head != 1, 1, 2)
|
97 |
+
* Making head of household if unmarried with children.
|
98 |
+
replace mstat = 3 if mstat == 1 & children > 0
|
99 |
+
|
100 |
+
*Number of dependents (kids) per tax form.
|
101 |
+
g depx = children
|
102 |
+
|
103 |
+
*Labor income of primary and secondary taxpayers
|
104 |
+
*Includes:
|
105 |
+
*wages and salaries
|
106 |
+
*+any separate reports of bonuses
|
107 |
+
*+overtime
|
108 |
+
*+tips
|
109 |
+
*+commissions
|
110 |
+
*+professional practice or trade
|
111 |
+
*+market gardening
|
112 |
+
*+additional job income
|
113 |
+
*+and miscellaneous labor income
|
114 |
+
g pwages = labor_inc_head + business_labor_income_head
|
115 |
+
g swages = (labor_inc_wife+business_labor_income_wife)*(mstat==2)
|
116 |
+
*g swages = labor_inc_wife*(mstat==2) // only matters if married
|
117 |
+
|
118 |
+
*Gross social security benefits
|
119 |
+
*Taxsim will calculate the portion includable in adjusted gross income (AGI)
|
120 |
+
g gssi = socsec_income_hh //together wife and head
|
121 |
+
|
122 |
+
*Other non-taxable transfer Income such as welfare, workers comp,
|
123 |
+
*veterans benefits and child support that would affect eligibility for state
|
124 |
+
*property tax rebates but would not be taxable at the federal level
|
125 |
+
g transfers = vapension_inc_head + workerscomp_inc_head + tanf_inc_head + ///
|
126 |
+
otherwelfare_inc_head + childsupport_inc_head + transf_rel_head + ///
|
127 |
+
ssi_head+ ///
|
128 |
+
(mstat==2)*(workerscomp_inc_wife + tanf_inc_wife + otherwelfare_inc_wife + ///
|
129 |
+
childsupport_inc_wife + transf_rel_wife + ssi_wife)
|
130 |
+
*(mstat==2)*(workerscomp_inc_wife + tanf_inc_wife + otherwelfare_inc_wife + ///
|
131 |
+
*childsupport_inc_wife + transf_rel_wife + ssi_wife)
|
132 |
+
|
133 |
+
|
134 |
+
*Unemployment compensation benefits
|
135 |
+
*Taxsim will calculate the portion included in AGI
|
136 |
+
g ui = unemployment_inc_head + unemployment_inc_wife
|
137 |
+
*g ui = unemployment_inc_head + (mstat==2)*unemployment_inc_wife
|
138 |
+
|
139 |
+
*Number of dependents under age 17
|
140 |
+
*Cannot distinguish between children in PSID (asign all children who live in
|
141 |
+
*Family Unit as dependent)
|
142 |
+
g depchild = children
|
143 |
+
|
144 |
+
*IRA and annuities (benefits and contributions)
|
145 |
+
*g otherprop=pension_ben-pension_contrib
|
146 |
+
|
147 |
+
*Annuities/IRAs head and wife (benefits)
|
148 |
+
g otherprop=annira_head+pension_wife+business_asset_income_head+business_asset_income_wife
|
149 |
+
|
150 |
+
*Taxable retirement income
|
151 |
+
g pensions = nonva_retir_head+other_pen_head
|
152 |
+
|
153 |
+
*Labor income less pension contributions
|
154 |
+
replace pwages = pwages - stat_pen_contrib_head
|
155 |
+
replace swages = swages - stat_pen_contrib_wife
|
156 |
+
|
157 |
+
|
158 |
+
*Run taxsim
|
159 |
+
taxsim9, full replace
|
160 |
+
|
161 |
+
di "TAXSIM FOR YEAR `x' OVER"
|
162 |
+
|
163 |
+
*Compute total income before tax
|
164 |
+
gen pretax_income = pwages + swages + transfers + gssi + ui + otherprop + pensions
|
165 |
+
|
166 |
+
|
167 |
+
*Compute disposable income
|
168 |
+
*Deflate by the CPI (base year 1998)
|
169 |
+
rename fiitax federalTax
|
170 |
+
rename siitax stateTax
|
171 |
+
gen aftertax_income_defl = (pretax_income - federalTax - stateTax)*(`cpi1999' / `cpi`x'')
|
172 |
+
|
173 |
+
*Drop HH with negative income (stemming from pension contributions that are too high relative to income or from business losses)
|
174 |
+
drop if aftertax_income_defl<0
|
175 |
+
|
176 |
+
*Adjust using equivalence scales (OECD)
|
177 |
+
gen nr_adult = size_fam-depchild
|
178 |
+
gen equiv = 1.0 + 0.7*(nr_adult-1) + 0.5*depchild
|
179 |
+
gen aftertax_income_defl_equiv= aftertax_income_defl/equiv
|
180 |
+
|
181 |
+
*Drop all unnecessary variables
|
182 |
+
keep aftertax_income_defl_equiv age_head year_survey ed_head marital_status_head fam_ID_1968 fam_ID_year size_fam equiv state_residence
|
183 |
+
|
184 |
+
|
185 |
+
cd ..
|
186 |
+
|
187 |
+
save "`procdata'/temp`x'.dta",replace
|
188 |
+
|
189 |
+
}
|
190 |
+
|
191 |
+
|
42/replication_package/data_replication/psid/code/taxsim9_ado_files/taxsim9.ado
ADDED
@@ -0,0 +1,368 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
program define taxsim9
|
2 |
+
version 9.10
|
3 |
+
/*
|
4 |
+
** by Jean Roth , [email protected]
|
5 |
+
This program uses the NBER TAXSIM model to calculate US and state
|
6 |
+
income tax liabilities. It calls an external program nc send
|
7 |
+
data (in ASCII) to the NBER server and obtain the calculated liabilities.
|
8 |
+
|
9 |
+
net from http://www.nber.org/stata
|
10 |
+
net describe taxsim9
|
11 |
+
net install taxsim9
|
12 |
+
|
13 |
+
*/
|
14 |
+
display "begin taxsim9.ado on $S_DATE (version 9.10)"
|
15 |
+
syntax [, Full Secondary Wages Interest Long Output(string) Debug X51 PLAN(integer 0) PLANVal(real 0) Replace local]
|
16 |
+
if `"`replace'"' == `"replace"' {
|
17 |
+
display "TAXSIM results will be merged to original file"
|
18 |
+
}
|
19 |
+
** If state doesn't exist, add to original dataset for later merging.
|
20 |
+
capture confirm variable state
|
21 |
+
if _rc {
|
22 |
+
display "Variable state not found in dataset."
|
23 |
+
display "Generating state = 0 to return federal taxes only."
|
24 |
+
generate state = 0
|
25 |
+
}
|
26 |
+
if `"`x51'"' == `"x51"' {
|
27 |
+
display "Setting state identifier to -1 for confidentiality"
|
28 |
+
display "Returning 51 records for every record received"
|
29 |
+
capture drop statet
|
30 |
+
generate statet = state
|
31 |
+
replace state = -1
|
32 |
+
}
|
33 |
+
*preserve
|
34 |
+
if `"`debug'"' != `"debug"' {
|
35 |
+
tempfile outfile infile ftp msg
|
36 |
+
}
|
37 |
+
else {
|
38 |
+
display "Saving input to FORTRAN TAXSIM as txpydata.raw "
|
39 |
+
local outfile txpydata.raw
|
40 |
+
display "Saving output from FORTRAN TAXSIM as results.raw "
|
41 |
+
local infile results.raw
|
42 |
+
capture erase txpydata.raw
|
43 |
+
capture erase results.raw
|
44 |
+
}
|
45 |
+
capture { rm `outfile' }
|
46 |
+
capture { rm `infile' }
|
47 |
+
capture { rm ftp.txt }
|
48 |
+
capture ( rm msg.txt }
|
49 |
+
if length(`"`output'"') == 0 {
|
50 |
+
local output taxsim_out
|
51 |
+
}
|
52 |
+
display "TAXSIM results will be saved in `output'.dta"
|
53 |
+
capture drop taxsimid
|
54 |
+
if _rc==0 {
|
55 |
+
display "Dropping taxsim id."
|
56 |
+
}
|
57 |
+
preserve
|
58 |
+
capture generate taxsimid = _n
|
59 |
+
|
60 |
+
** mtr is marginal is tax rate.
|
61 |
+
local mtr 85
|
62 |
+
** idtl is output. 0 is basic
|
63 |
+
local idtl 0
|
64 |
+
|
65 |
+
#delimit ;
|
66 |
+
** marginal tax rate options ;
|
67 |
+
if `"`secondary'"' == `"secondary"' { ;
|
68 |
+
local mtr 86 ;
|
69 |
+
display "Marginal rate with respect to secondary earner";
|
70 |
+
} ;
|
71 |
+
if `"`wages'"' == `"wages"' { ;
|
72 |
+
local mtr 11 ;
|
73 |
+
display "Marginal rate with respect to overall earnings";
|
74 |
+
} ;
|
75 |
+
if `"`interest'"' == `"interest"' { ;
|
76 |
+
local mtr 14 ;
|
77 |
+
display "Marginal rate with respect to interest income";
|
78 |
+
} ;
|
79 |
+
if `"`long'"' == `"long"' { ;
|
80 |
+
local mtr 70 ;
|
81 |
+
display "Marginal rate with respect to long term gains";
|
82 |
+
} ;
|
83 |
+
|
84 |
+
if `"`full'"' == `"full"' { ;
|
85 |
+
local idtl 2 ;
|
86 |
+
local addvars v10 v11 v12 v13 v14 v15 v16 v17 v18 v19
|
87 |
+
v20 v21 v22 v23 v24 v25 v26 v27 v28 v29
|
88 |
+
v30 v31 v32 v33 v34 v35 v36 v37 v38 v39
|
89 |
+
v40 v41 ;
|
90 |
+
display "Full Intermediate Calculations Requested";
|
91 |
+
} ;
|
92 |
+
if "`mtr'" == "85" { ;
|
93 |
+
display "Marginal rate with respect to primary earner";
|
94 |
+
} ;
|
95 |
+
if "`idtl'" == "0" { ;
|
96 |
+
display "Basic output";
|
97 |
+
} ;
|
98 |
+
|
99 |
+
if `plan' != 0 {;
|
100 |
+
display "Tax law modified according to TAXSIM plan " `plan';
|
101 |
+
};
|
102 |
+
if `planval' != 0 {;
|
103 |
+
display "Modified tax parameter is " `planval';
|
104 |
+
};
|
105 |
+
|
106 |
+
#delimit cr
|
107 |
+
** Checking data sent to taxsim for validity
|
108 |
+
** Checking for observations prior to variables for better error message.
|
109 |
+
if _N==0 {
|
110 |
+
display "Aborting: No observations in data set"
|
111 |
+
exit
|
112 |
+
}
|
113 |
+
local must_exist year mstat
|
114 |
+
foreach X of local must_exist {
|
115 |
+
capture confirm var `X'
|
116 |
+
if _rc > 0 {
|
117 |
+
display "Aborting: Variable `X' not found in data file"
|
118 |
+
exit
|
119 |
+
}
|
120 |
+
capture assert missing(`X')
|
121 |
+
if _rc == 0 {
|
122 |
+
display "Aborting: All values of variable `X' are missing."
|
123 |
+
exit
|
124 |
+
}
|
125 |
+
}
|
126 |
+
#delimit ;
|
127 |
+
local invars year state mstat depx agex pwages swages dividends otherprop
|
128 |
+
pensions gssi transfers rentpaid proptax otheritem childcare ui depchild
|
129 |
+
mortgage ltcg stcg;
|
130 |
+
#delimit cr
|
131 |
+
|
132 |
+
foreach X of local invars {
|
133 |
+
capture confirm var `X'
|
134 |
+
if _rc > 0 {
|
135 |
+
display "Variable `X' is not in the dataset. Generating `X' = 0 "
|
136 |
+
generate `X' = 0
|
137 |
+
}
|
138 |
+
capture assert missing(`X')
|
139 |
+
if _rc == 0 {
|
140 |
+
display "All values of variable `X' are missing. Replacing `X' = 0 "
|
141 |
+
replace `X' = 0
|
142 |
+
}
|
143 |
+
}
|
144 |
+
*display "Checking variables are numeric"
|
145 |
+
foreach X of local invars {
|
146 |
+
capture confirm numeric variable `X'
|
147 |
+
if _rc > 0 {
|
148 |
+
display "Aborting: Variable `X' is not numeric. See help tostring."
|
149 |
+
exit
|
150 |
+
}
|
151 |
+
}
|
152 |
+
scalar startobs = _N
|
153 |
+
scalar obs0=_N
|
154 |
+
quietly drop if year<1960 | year>2023 | year==.
|
155 |
+
drop_message obs0-_N year
|
156 |
+
quietly drop if state<-1 | state > 51 | missing(state)
|
157 |
+
drop_message obs0-_N state
|
158 |
+
** The maximum value of year will need updating annually
|
159 |
+
quietly drop if (year<1977|year>2016) & state !=0
|
160 |
+
drop_message obs0-_N state-and-year-combination
|
161 |
+
quietly drop if depx<0 | depx>999
|
162 |
+
drop_message obs0-_N depx
|
163 |
+
quietly drop if mstat<1 | ( mstat>4 & mstat<7 ) | mstat>8
|
164 |
+
drop_message obs0-_N mstat
|
165 |
+
quietly drop if agex<0 | agex>12000
|
166 |
+
drop_message obs0-_N agex
|
167 |
+
quietly drop if depchild<0|depchild>999999
|
168 |
+
drop_message obs0-_N depchild
|
169 |
+
** Replacing spouses wage=0 if not filing jointly
|
170 |
+
quietly replace swages=0 if mstat!=2
|
171 |
+
#delimit ;
|
172 |
+
local positive_items dividends pensions gssi transfers rentpaid
|
173 |
+
proptax otheritem childcare ui mortgage;
|
174 |
+
#delimit cr
|
175 |
+
scalar obs0=_N
|
176 |
+
foreach X in `positive_items' swage pwage {
|
177 |
+
quietly drop if `X'<0 | `X' >=99999999 | `X'==.
|
178 |
+
if (obs0>_N) {
|
179 |
+
display obs0-_N " records droped for out of range `X'
|
180 |
+
}
|
181 |
+
scalar obs0=_N
|
182 |
+
}
|
183 |
+
** display "Checking there is at least 1 observation is left after the final drop"
|
184 |
+
if _N==0 {
|
185 |
+
display "Aborting: No observations in data set"
|
186 |
+
exit
|
187 |
+
}
|
188 |
+
|
189 |
+
/*
|
190 |
+
*display "Eliminating scientific notation format in outfile"
|
191 |
+
foreach X of local invars {
|
192 |
+
format %15.2f `X'
|
193 |
+
}*/
|
194 |
+
|
195 |
+
if `"`debug'"' == `"debug"' {
|
196 |
+
display "Here are the variable counts and means after cleaning:"
|
197 |
+
summarize `invars'
|
198 |
+
}
|
199 |
+
|
200 |
+
capture describe
|
201 |
+
di _N " records out of " startobs " are left for taxsim to process"
|
202 |
+
local sent=_N
|
203 |
+
** Handling the case of state=-1
|
204 |
+
local sent51=`sent'*51
|
205 |
+
quietly tostring taxsimid,replace
|
206 |
+
quietly replace taxsimid ="9 `mtr' `idtl' `plan' `planval' /" + char(10) + taxsimid in 1
|
207 |
+
|
208 |
+
local obs=r(N)
|
209 |
+
outfile taxsimid `invars' using `outfile',noquote nolabel
|
210 |
+
|
211 |
+
if `"`local'"' == `"local"' {
|
212 |
+
! taxsim9 <`outfile' >`infile'
|
213 |
+
}
|
214 |
+
else {
|
215 |
+
local servername= "`c(current_time)'"
|
216 |
+
local servername = subinstr("`servername'",":","",2)
|
217 |
+
di "server filename is `servername'"
|
218 |
+
di " infile is `infile'"
|
219 |
+
di " outfile is `outfile'"
|
220 |
+
file open out using ftp.txt, write replace
|
221 |
+
local slashck "/C"
|
222 |
+
if `"`debug'"' == `"debug"' {
|
223 |
+
local slashck "/K"
|
224 |
+
di "Type EXIT in DOS window to return to stata."
|
225 |
+
file write out "debug" _n
|
226 |
+
}
|
227 |
+
file write out "open taxsimftp.nber.org" _char(10)
|
228 |
+
file write out "user taxsim 02138" _char(10)
|
229 |
+
file write out "cd tmp" _char(10)
|
230 |
+
file write out "type ascii" _char(10)
|
231 |
+
file write out "put `outfile' `servername'" _char(10)
|
232 |
+
file write out "get `servername'.taxsim `infile'" _char(10)
|
233 |
+
file write out "get `servername'.msg msg.txt" _char(10)
|
234 |
+
if _n > 10000 {
|
235 |
+
file write out "del `servername'" _char(10)
|
236 |
+
}
|
237 |
+
file write out "quit" _char(10)
|
238 |
+
file close out
|
239 |
+
capture { rm msg.txt }
|
240 |
+
di "`c(os)`"
|
241 |
+
if "`c(os)'" == "Windows" {
|
242 |
+
! cmd `slashck' ftp -n -s:ftp.txt -w:12888
|
243 |
+
}
|
244 |
+
else {
|
245 |
+
! ftp -n <ftp.txt
|
246 |
+
}
|
247 |
+
capture confirm file "msg.txt"
|
248 |
+
if _rc==0 {
|
249 |
+
type msg.txt
|
250 |
+
}
|
251 |
+
}
|
252 |
+
local results taxsimid year state fiitax siitax fica frate srate ficar `addvars'
|
253 |
+
** The state option can generate many 'cannot be read' errors for non-matching states ;
|
254 |
+
quietly infile `results' using "`infile'",clear
|
255 |
+
quietly describe
|
256 |
+
if ( `r(N)'==0 ) {
|
257 |
+
display "This machine may have had trouble communicating with our server"
|
258 |
+
display "Consult the Notes and Support section of the help file to begin troubleshooting."
|
259 |
+
exit
|
260 |
+
}
|
261 |
+
if ( `r(N)'-`sent'>1 & `r(N)'-`sent51'>=1 ) {
|
262 |
+
display "This machine may have had trouble communicating with our server"
|
263 |
+
display "Check the size and content of the result file (results.raw, by default)"
|
264 |
+
display "If processing stopped midway, the results file may be large"
|
265 |
+
display "but if not, the top of the file may include a message from our webserver"
|
266 |
+
display "that would be helpful for debugging"
|
267 |
+
display "Consult the Notes and Support section of the help file for troubleshooting info"
|
268 |
+
display "http://www.nber.org/taxsim/stata/ "
|
269 |
+
display "`r(N)'!=`sent' & `r(N)'!=`sent51'"
|
270 |
+
exit
|
271 |
+
}
|
272 |
+
label variable state "state id"
|
273 |
+
label variable fiitax "Federal Income Tax"
|
274 |
+
label variable siitax "State Income Tax"
|
275 |
+
label variable fica "OASDI and HI Payroll Tax"
|
276 |
+
label variable frate "IIT marginal rate"
|
277 |
+
label variable srate "state marginal rate"
|
278 |
+
label variable ficar "SS marginal rate"
|
279 |
+
if `"`full'"' == `"full"' {
|
280 |
+
label variable v10 "Federal AGI"
|
281 |
+
label variable v11 "UI in AGI"
|
282 |
+
label variable v12 "Social Security in AGI"
|
283 |
+
label variable v13 "Zero Bracket Amount"
|
284 |
+
label variable v14 "Personal Exemptions"
|
285 |
+
label variable v15 "Exemption Phaseout"
|
286 |
+
label variable v16 "Deduction Phaseout"
|
287 |
+
label variable v17 "Deductions allowed"
|
288 |
+
label variable v18 "Federal Taxable Income"
|
289 |
+
label variable v19 "Federal Regular Tax"
|
290 |
+
label variable v20 "Exemption Surtax"
|
291 |
+
label variable v21 "General Tax Credit"
|
292 |
+
label variable v22 "Child Tax Credit (as adjusted)"
|
293 |
+
label variable v23 "Refundable Part of Child Tax Credit"
|
294 |
+
label variable v24 "Child Care Credit"
|
295 |
+
label variable v25 "Earned Income Credit"
|
296 |
+
label variable v26 "Income for the Alternative Minimum Tax"
|
297 |
+
label variable v27 "AMT Liability (addition to regular tax)"
|
298 |
+
label variable v28 "Income Tax before Credits"
|
299 |
+
label variable v29 "FICA"
|
300 |
+
label variable v30 "State Household Income"
|
301 |
+
label variable v31 "State Rent Payments"
|
302 |
+
label variable v32 "State AGI"
|
303 |
+
label variable v33 "State Exemption amount"
|
304 |
+
label variable v34 "State Standard Deduction"
|
305 |
+
label variable v35 "State Itemized Deductions"
|
306 |
+
label variable v36 "State Taxable Income"
|
307 |
+
label variable v37 "State Property Tax Credit"
|
308 |
+
label variable v38 "State Child Care Credit"
|
309 |
+
label variable v39 "State EITC "
|
310 |
+
label variable v40 "State Total Credits"
|
311 |
+
label variable v41 "State Bracket Rate"
|
312 |
+
}
|
313 |
+
sort taxsimid state
|
314 |
+
capture save `output', replace
|
315 |
+
restore
|
316 |
+
display " "
|
317 |
+
if `"`replace'"' != `"replace"' {
|
318 |
+
display "TAXSIM results are saved in `output'"
|
319 |
+
display " "
|
320 |
+
display "To merge the TAXSIM results to the current dataset, run the commands below."
|
321 |
+
display " "
|
322 |
+
if `"`x51'"' == `"x51"' {
|
323 |
+
display "generate taxsimid = _n"
|
324 |
+
display "replace state=statet"
|
325 |
+
display "sort taxsimid state"
|
326 |
+
display "merge taxsimid state using `output', nokeep replace update"
|
327 |
+
display "drop statet _merge"
|
328 |
+
}
|
329 |
+
else {
|
330 |
+
display "generate taxsimid = _n"
|
331 |
+
display "sort taxsimid"
|
332 |
+
display "merge taxsimid using `output',replace update"
|
333 |
+
}
|
334 |
+
display " "
|
335 |
+
display "To avoid merging by hand, rerun with the replace option "
|
336 |
+
display "to automatically merge the datasets."
|
337 |
+
}
|
338 |
+
else {
|
339 |
+
capture drop taxsimid _merge
|
340 |
+
capture generate taxsimid = _n
|
341 |
+
if `"`x51'"' == `"x51"' {
|
342 |
+
display "TAXSIM results are being merged with workspace by taxsimid state"
|
343 |
+
replace state = statet
|
344 |
+
sort taxsimid state
|
345 |
+
merge taxsimid state using `output',replace update
|
346 |
+
display "Keeping only matching state data"
|
347 |
+
drop if statet==.
|
348 |
+
drop statet _merge
|
349 |
+
}
|
350 |
+
else {
|
351 |
+
display "TAXSIM results are being merged with workspace by taxsimid"
|
352 |
+
sort taxsimid
|
353 |
+
merge taxsimid using `output',replace update
|
354 |
+
drop _merge
|
355 |
+
}
|
356 |
+
}
|
357 |
+
display " "
|
358 |
+
end
|
359 |
+
|
360 |
+
program define drop_message, rclass
|
361 |
+
version 8.0
|
362 |
+
args dropped varname
|
363 |
+
if (`dropped'>0) {
|
364 |
+
display `dropped' %8.0g " records dropped for out of range `varname'"
|
365 |
+
}
|
366 |
+
scalar obs0 =_N
|
367 |
+
end
|
368 |
+
|
42/replication_package/data_replication/psid/code/taxsim9_ado_files/taxsim9.hlp
ADDED
@@ -0,0 +1,294 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{smcl}
|
2 |
+
{* 20 September 2008}{...}
|
3 |
+
{hline}
|
4 |
+
help for {it:{hi:taxsim9}}
|
5 |
+
{hline}
|
6 |
+
|
7 |
+
{title:NBER TAXSIM model for federal and state income taxes}
|
8 |
+
|
9 |
+
{title:Description}
|
10 |
+
|
11 |
+
{p 8 18 2}
|
12 |
+
{cmdab:taxsim9}[,{cmdab:f:ull} {cmdab:o:utput}
|
13 |
+
{cmdab:s:econdary}|{cmdab:w:ages}|{cmdab:i:nterest}|{cmdab:l:ong}
|
14 |
+
{cmdab:d:ebug} {cmdab:p:lan} {cmdab:planv:al} {cmdab:x:51}
|
15 |
+
{cmdab:r:eplace}]
|
16 |
+
|
17 |
+
{p 4 4 2}calculates federal and state income tax liability from 21 input
|
18 |
+
variables. These variables are be defined in your current workspace
|
19 |
+
before calling taxsim. The program returns values for various tax return
|
20 |
+
concepts, taxes, credits, and marginal tax rates as new named variables in
|
21 |
+
a new dataset or merged into your current workspace.
|
22 |
+
|
23 |
+
{p 4 4 2}The tax calculator itself is the same FORTRAN program that the NBER has
|
24 |
+
been updating annually since 1974, but with a simplified input file (no married
|
25 |
+
filing separate or income averaging, etc). This interface merely packages up your
|
26 |
+
data and sends it to Cambridge for the actual calculations, which are returned and
|
27 |
+
merged into your current dataset. No tax calculations are done on your computer,
|
28 |
+
although there is some range checking of your data.
|
29 |
+
|
30 |
+
{title:Input Variables:}
|
31 |
+
|
32 |
+
{p 4 4 2} {hi:year:} 4-digit year between 1960 and 2023. Between 1977 and
|
33 |
+
2015 if state tax is requested. No default.
|
34 |
+
|
35 |
+
{p 4 4 2} {hi:state:} state identifier. These are numeric codes from 1 to
|
36 |
+
51 (Alabama to Wyoming in alphabetical order) with zero indicating "no
|
37 |
+
state tax".
|
38 |
+
|
39 |
+
{p 4 4 2} {hi:mstat:} Marital status 1 for single, 2 for joint, 3 for head
|
40 |
+
of household. No default.
|
41 |
+
|
42 |
+
{p 4 4 2} {hi:depx:} Number of dependents ( usually kids, but can be any age ) per
|
43 |
+
tax form. Must not be less than depchild (below).
|
44 |
+
|
45 |
+
{p 4 4 2} {hi:agex:} The age of the primary taxpayer times 100 plus the age of the
|
46 |
+
secondary taxpayer (if any). Forexample 6563 would a 65 year old married to a 63
|
47 |
+
year old. If zero we assume the taxpayer is of an age eligible for the EITC and the
|
48 |
+
full AMT exclusion but not for any age exemption or supplemental standard deduction.
|
49 |
+
It is not an error for a taxpayer to be over 99 years of age but the secondary
|
50 |
+
taxpayer must be of legal marriagable age. 10301 would be a 102 year old married to
|
51 |
+
a 101 year old. Prior to July 2016 this field was the number of taxpayers 65 years
|
52 |
+
of age or more, and that usage is still accepted for backward compatibility, however
|
53 |
+
EITC, and AMT are more accurate with exact ages.
|
54 |
+
|
55 |
+
{p 4 4 2} {hi:pwages:} Wage income of primary taxpayer
|
56 |
+
|
57 |
+
{p 4 4 2} {hi:swages:} Wage income of secondary taxpayer
|
58 |
+
|
59 |
+
{p 4 4 2} {hi:dividends:} Dividend income
|
60 |
+
|
61 |
+
{p 4 4 2} {hi:otherprop:} Interest and other property income. This may be
|
62 |
+
negative. You can put net alimony here, and subtract any adjustments such
|
63 |
+
as IRAs, Keoghs and self employment tax, to the extent that yuo may know
|
64 |
+
such items.
|
65 |
+
|
66 |
+
{p 4 4 2} {hi:pensions:} IRA distributions and Taxable pension income
|
67 |
+
|
68 |
+
{p 4 4 2} {hi:gssi:} Gross social security benefits. Taxsim will calculate the
|
69 |
+
portion includable in AGI.
|
70 |
+
|
71 |
+
{p 4 4 2} {hi:transfers:} Non-taxable transfer income, used for
|
72 |
+
calculating low income credits and property tax credits on state taxes.
|
73 |
+
|
74 |
+
{p 4 4 2} {hi:rentpaid:} Rent paid is used in some state property tax
|
75 |
+
credits.
|
76 |
+
|
77 |
+
{p 4 4 2} {hi:proptax:} Property tax paid is an itemized deduction and is a
|
78 |
+
preference for the AMT.
|
79 |
+
|
80 |
+
{p 4 4 2} {hi:otheritem:} Taxes paid other than state income taxes. Taxsim will use
|
81 |
+
its own calculated state income tax as an itemized deduction. These are preferences
|
82 |
+
for the AMT.
|
83 |
+
|
84 |
+
{p 4 4 2} {hi:childcare:} Child care expenses are a credit in the federal
|
85 |
+
tax.
|
86 |
+
|
87 |
+
{p 4 4 2} {hi:ui:} Unemployment compensation benefits. Taxsim will calculate the
|
88 |
+
portion included in AGI.
|
89 |
+
|
90 |
+
{p 4 4 2} {hi:depchild:} Number of dependent children under 17 (for child
|
91 |
+
credit), optionally plus 100 times the number of dependent children under 18 plus
|
92 |
+
10000 times the number of dependent children under 13. e.g. 10302 for 1 child
|
93 |
+
eligible for child care credit, three counted for the EIC and 2 for the child tax
|
94 |
+
credit. Note that to maintain backward compatibility if this value is under 100 then
|
95 |
+
the number of dependents is used for the child care and EIC credits.
|
96 |
+
|
97 |
+
{p 4 4 2} {hi:mortgage:} Mortgage interest paid, possibly plus charitable
|
98 |
+
contibutions, and some minor items that are not preferences for the AMT.
|
99 |
+
|
100 |
+
{p 4 4 2} {hi:stcg:} Short term capital gain or loss (+/-).
|
101 |
+
|
102 |
+
{p 4 4 2} {hi:ltcg:} Long term capital gain or loss (+/-).
|
103 |
+
|
104 |
+
{title:The following variables are returned by the procedure:}
|
105 |
+
|
106 |
+
{p 4 4 2} {hi:taxsimid:} Record identifer, _n ,
|
107 |
+
used to merge taxsim_out.dta back to source workspace.
|
108 |
+
|
109 |
+
{p 4 4 2} {hi:year:} Unchanged from input.
|
110 |
+
|
111 |
+
{p 4 4 2} {hi:state:} Unchanged from input.
|
112 |
+
|
113 |
+
{p 4 4 2} {hi:fiitax:} Federal tax liability, after regular, minimum, and
|
114 |
+
maximum tax, and after refundable credits.
|
115 |
+
|
116 |
+
{p 4 4 2} {hi:siitax:} State tax liability after refundable credits.
|
117 |
+
|
118 |
+
{p 4 4 2} {hi:fica:} FICA tax liability, sum of employer and employee shares.
|
119 |
+
|
120 |
+
{p 4 4 2} {hi:frate:} Marginal federal tax rate wrt primary worker wages. You can
|
121 |
+
change this to the weighted average of the rates on the primary and secondary
|
122 |
+
earners, (equal weights if both are non-workers), secondary earner, property income,
|
123 |
+
or long term gains with the options, {cmd:Wages},{cmd:Secondary}, {cmd:Interest} or
|
124 |
+
{cmd:Long}.
|
125 |
+
|
126 |
+
{p 4 4 2} {hi:srate:} Marginal state tax rate. Same options apply here.
|
127 |
+
|
128 |
+
{p 4 4 2} {hi:ficar:} Marginal FICA rate. The estimate of FICA tax
|
129 |
+
includes both employer and employee portions, and ignores the favorable
|
130 |
+
treatment of self-employment income.
|
131 |
+
|
132 |
+
{title:Missing Data:} {p 4 4 2} All variables except year and marital
|
133 |
+
status are optional, and the tax calculation will proceed as if missing
|
134 |
+
variables are zero after printing a warning. A variable is missing if
|
135 |
+
it doesn't show up in a describe command - this is different from missing values
|
136 |
+
for a defined variable.
|
137 |
+
|
138 |
+
{p 4 4 2}An individual case missing value for any variable in the list of 21
|
139 |
+
variables will result in listwise deletion. Zero is an acceptable value for any
|
140 |
+
dollar amount. A zero for the state id, means "no state tax" and in that case zero
|
141 |
+
is returned for the state tax liability. Negative values are allowed only for
|
142 |
+
capital gains and {hi:otherprop}, and will cause listwise deletion if encountered in
|
143 |
+
other variables.
|
144 |
+
|
145 |
+
{title:Additional Output:}
|
146 |
+
|
147 |
+
{title:Options}
|
148 |
+
|
149 |
+
{p 4 4 2}{cmd:full:} Return many intermediate calculations (taxable
|
150 |
+
income, regular tax, individual credits, etc. All the returned variables
|
151 |
+
have labels defined in taxsim9.ado - use "describe" to get the full list
|
152 |
+
or browse the web page below.
|
153 |
+
|
154 |
+
{p 4 4 2}{cmd:output:} Specify the name of the output dataset. The
|
155 |
+
default is taxsim_out.dta in the current directory.
|
156 |
+
|
157 |
+
{p 4 4 2}{cmd:secondary:} Calculate marginal tax rates with respect to
|
158 |
+
the secondary wage earner. The default is with respect to the primary wage
|
159 |
+
earner.
|
160 |
+
|
161 |
+
{p 4 4 2}{cmd:wages:} Calculate marginal tax rates with respect to a
|
162 |
+
weighted average of the primary and secondary wage earner.
|
163 |
+
|
164 |
+
{p 4 4 2}{cmd:interest:} Calculate marginal tax rates with respect to
|
165 |
+
interest income.
|
166 |
+
|
167 |
+
{p 4 4 2}{cmd:long:} Calculate marginal tax rates with respect to
|
168 |
+
long term gains.
|
169 |
+
|
170 |
+
{p 4 4 2}{cmd:debug:} Do not erase intermediate ASCII files written in the
|
171 |
+
current directory. Summarize input variables after cleaning. The intermediate files
|
172 |
+
are essential for debugging. If you are reporting errors to NBER, be sure to
|
173 |
+
create a small (no more than a couple of observations) test file to send to us.
|
174 |
+
|
175 |
+
{p 4 4 2}{cmd:x51:} Users of the AHEAD, HRS, and other confidential
|
176 |
+
data are reminded that they are not permitted to send state identifiers to
|
177 |
+
us. If such users need state tax calculations they should set this option
|
178 |
+
which instructs taxsim8.ado (running on your computer) to drop the state
|
179 |
+
identifier from records sent to our server, and instructs the server to
|
180 |
+
return 51 records for each record received, one for each possible state.
|
181 |
+
Then taxsim9.ado (at your computer) will discard the 50 spurious records
|
182 |
+
from the returned data, leaving you with tax calculations for the correct
|
183 |
+
state for each taxpayer, and without sending us anything you aren't
|
184 |
+
allowed to share. Don't laugh - it works and the inefficiency is tolerable.
|
185 |
+
|
186 |
+
{p 4 4 2}{cmd:replace:} Merge the taxsim output file into the workspace, possibly
|
187 |
+
overwriting existing variables. Otherwise output is saved to taxsim_out.dta in the
|
188 |
+
current directory. You can run taxsim multiple times with the replace option set and
|
189 |
+
the results will not change unless you change the input data or procedure options.
|
190 |
+
|
191 |
+
{p 4 4 2}{cmd:Plan:} Modify the tax calculation according to the list of alternative
|
192 |
+
tax laws listed at "http://www.nber.org/taxsim/taxsim=calc9/plans.html".
|
193 |
+
|
194 |
+
{p 4 4 2}{cmd:PLANVar:} Parameter for the {cmd:Plan:}.
|
195 |
+
|
196 |
+
{title:Notes:}
|
197 |
+
|
198 |
+
{p 4 4 2}Dollar amounts are rounded to the nearest penny before
|
199 |
+
transmission to the calculator, and calculated amounts are similarly
|
200 |
+
treated.
|
201 |
+
|
202 |
+
{p 4 4 2}Extreme marginal tax rates due to notches will become missing
|
203 |
+
values.
|
204 |
+
|
205 |
+
{p 4 4 2}The maximum upload file size is vague, but use caution for files larger
|
206 |
+
than 100,000 cases. Start small, and test the server reaction to larger files.
|
207 |
+
|
208 |
+
{p 4 4 2}Taxsim9.ado writes out the 21 variables (plus a record id) to a temporary
|
209 |
+
ASCII file and also writes a short ftp script for uploading that file to the NBER
|
210 |
+
taxsim server. Then the same script downloads a file of the same name with the
|
211 |
+
.taxsim suffix added. Our ftp server is modified to run such files through the
|
212 |
+
taxsim program, and return the calculated results rather than the original file. The
|
213 |
+
results are copied to your local hard disk and loaded into the taxsim_out.dta
|
214 |
+
dataset in your home directory. If you wish to examine the process, study the .ado
|
215 |
+
file and ftp.txt files.
|
216 |
+
|
217 |
+
{p 4 4 2}Throughput is variable but one user reports 1,500
|
218 |
+
records/minute with an excellent connection (25 milliseconds ping time).
|
219 |
+
If you experience time-outs, please split your dataset into pieces for
|
220 |
+
sequential processing, if processing is reliable, you may consider larger
|
221 |
+
pieces. I would be interested in hearing reports.
|
222 |
+
|
223 |
+
{title:Example:}
|
224 |
+
{p 4 8 2}{cmd:. input state year mstat pwages}
|
225 |
+
|
226 |
+
{p 4 8 2}{cmd:. 5 2004 1 50000}
|
227 |
+
|
228 |
+
{p 4 8 2}{cmd:. end}
|
229 |
+
|
230 |
+
{p 4 8 2}{cmd:. taxsim9, full interest replace}{p_end}
|
231 |
+
|
232 |
+
{p 4 4 2} The example posits a single taxpayer in California with $50,000
|
233 |
+
of wage income, and returns the marginal tax rate with respect to interest
|
234 |
+
income, among other values.
|
235 |
+
|
236 |
+
{title:Support:}
|
237 |
+
|
238 |
+
{p 4 4 2}Dan Feenberg would like to speak with anyone using this program -
|
239 |
+
give him a call after you have done some experimenting, but before
|
240 |
+
investing a lot of time and certainly before submitting for publication. If you
|
241 |
+
encounter bugs please prepare a test case with no more than 3 observations and run
|
242 |
+
with the following settings:
|
243 |
+
|
244 |
+
|
245 |
+
{p 4 8 2}{cmd:. log using foo,text}
|
246 |
+
|
247 |
+
{p 4 4 2}and also with trace on:
|
248 |
+
|
249 |
+
{p 4 8 2}{cmd:. set trace on}
|
250 |
+
|
251 |
+
{p 4 4 2}and with the debug option for taxsim:
|
252 |
+
|
253 |
+
{p 4 8 2}{cmd:. taxsim9,debug}
|
254 |
+
|
255 |
+
{p 4 4 2}set and the files txpydata.raw,results.raw, ftp.txt and msg.txt included
|
256 |
+
with your message. If there is no results.raw file, that probably means that ftp
|
257 |
+
wasn't found or didn't work.
|
258 |
+
|
259 |
+
{p 4 4 2}Be sure to provide stata test runs with the smallest possible dataset that
|
260 |
+
demonstrates the problem (preferably one record), run with the debug flag set, and
|
261 |
+
attach the debug files. But always follow the instructions below.
|
262 |
+
|
263 |
+
{p 4 4 2}If any tax calculation surprises you, please enter the taxpayer data in the
|
264 |
+
web form mentioned below. A detailed explanation of the calculation will be
|
265 |
+
returned, which may remind you of a code feature or interaction you were unaware of.
|
266 |
+
If you still think the calculation is wrong, follow the instructions given there for
|
267 |
+
sending bug reports. We are very responsive to these communications - they do result
|
268 |
+
in improvements to the calculator, generally within a day or two. But please send us
|
269 |
+
a single record demonstrating the error, not a large file. Most users anticipate we
|
270 |
+
need to be encouraged to respond by the possibility that the error is common and
|
271 |
+
submit large files to demonstrate that. This is not true and we will respond
|
272 |
+
with a request that the file be cut down.
|
273 |
+
|
274 |
+
{p 4 4 2}See {browse "http://www.nber.org/taxsim/taxsim9/"} the TAXSIM web
|
275 |
+
site for additional information about the tax caculator. Although that is the
|
276 |
+
interface for the Web version of taxsim, there is much valuable information there
|
277 |
+
about the operation of the program and the calculation of marginal rates which may
|
278 |
+
surprise you.
|
279 |
+
|
280 |
+
{p 4 4 2}A general description of Taxsim is given in
|
281 |
+
{browse "http://www.nber.org/taxsim/feenberg-coutts.pdf"}.
|
282 |
+
|
283 |
+
{col 5}Daniel Feenberg ( tax questions )
|
284 |
+
{col 5}[email protected]
|
285 |
+
{col 5}617-863-0343
|
286 |
+
|
287 |
+
{p 4 13 2}
|
288 |
+
Online: help for {help taxsim9}
|
289 |
+
{p_end}
|
290 |
+
|
291 |
+
{p 4 13 2}
|
292 |
+
Web: {browse "http://www.nber.org/taxsim/taxsim-calc9"}
|
293 |
+
{p_end}
|
294 |
+
|
42/replication_package/data_replication/psid/code/taxsim_2020.do
ADDED
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
clear all
|
2 |
+
set more off
|
3 |
+
set maxvar 10000
|
4 |
+
|
5 |
+
*Set path
|
6 |
+
***
|
7 |
+
|
8 |
+
*cd ---- specify path to \data_replication\psid\
|
9 |
+
local procdata "./proc_data"
|
10 |
+
|
11 |
+
*Define the CPI annual average for each relevant year.
|
12 |
+
*These are defined for the relevant year of the survey (e.g cpi1999 is for 1998)
|
13 |
+
*Values taken from FRED series CPIAUCSL, annual data, average across months
|
14 |
+
local cpi1999 = 163.01
|
15 |
+
local cpi2001 = 172.19
|
16 |
+
local cpi2003 = 179.87
|
17 |
+
local cpi2005 = 188.91
|
18 |
+
local cpi2007 = 201.56
|
19 |
+
local cpi2009 = 215.25
|
20 |
+
local cpi2011 = 218.09
|
21 |
+
local cpi2013 = 229.59
|
22 |
+
local cpi2015 = 236.72
|
23 |
+
local cpi2017 = 240.01
|
24 |
+
|
25 |
+
|
26 |
+
*Run TAXSIM and compute disposable income
|
27 |
+
forval x=1999(2)2017{
|
28 |
+
di "YEAR `x'"
|
29 |
+
|
30 |
+
cd raw_data
|
31 |
+
|
32 |
+
*Recode the PSID data
|
33 |
+
do FAM`x'ER.do
|
34 |
+
|
35 |
+
*Construct the variables of interest (income components)
|
36 |
+
do save_data_`x'.do
|
37 |
+
|
38 |
+
********************
|
39 |
+
*Proceed to TAXSIM
|
40 |
+
********************
|
41 |
+
*Generate tax year (previous year from the survey year)
|
42 |
+
g year = year_survey - 1
|
43 |
+
|
44 |
+
*Convert PSID state codes to TAXSIM state format
|
45 |
+
g state = 0
|
46 |
+
replace state = 1 if state_residence == 01 /* Alabama */
|
47 |
+
replace state = 2 if state_residence == 50 /* Alaska */
|
48 |
+
replace state = 3 if state_residence == 02 /* Arizona */
|
49 |
+
replace state = 4 if state_residence == 03 /* Arkansas */
|
50 |
+
replace state = 5 if state_residence == 04 /* California */
|
51 |
+
replace state = 6 if state_residence == 05 /* Colorado */
|
52 |
+
replace state = 7 if state_residence == 06 /* Connecticut */
|
53 |
+
replace state = 8 if state_residence == 07 /* Delaware */
|
54 |
+
replace state = 9 if state_residence == 08 /* DC */
|
55 |
+
replace state = 10 if state_residence == 09 /* Florida */
|
56 |
+
replace state = 11 if state_residence == 10 /* Georgia */
|
57 |
+
replace state = 12 if state_residence == 51 /* Hawaii */
|
58 |
+
replace state = 13 if state_residence == 11 /* Idaho */
|
59 |
+
replace state = 14 if state_residence == 12 /* Illinois */
|
60 |
+
replace state = 15 if state_residence == 13 /* Indiana */
|
61 |
+
replace state = 16 if state_residence == 14 /* Iowa */
|
62 |
+
replace state = 17 if state_residence == 15 /* Kansas */
|
63 |
+
replace state = 18 if state_residence == 16 /* Kentucky */
|
64 |
+
replace state = 19 if state_residence == 17 /* Louisiana */
|
65 |
+
replace state = 20 if state_residence == 18 /* Maine */
|
66 |
+
replace state = 21 if state_residence == 19 /* Maryland */
|
67 |
+
replace state = 22 if state_residence == 20 /* Massachusetts */
|
68 |
+
replace state = 23 if state_residence == 21 /* Michigan */
|
69 |
+
replace state = 24 if state_residence == 22 /* Minnesota */
|
70 |
+
replace state = 25 if state_residence == 23 /* Missippi */
|
71 |
+
replace state = 26 if state_residence == 24 /* Missouri */
|
72 |
+
replace state = 27 if state_residence == 25 /* Montana */
|
73 |
+
replace state = 28 if state_residence == 26 /* Nebraska */
|
74 |
+
replace state = 29 if state_residence == 27 /* Nevada */
|
75 |
+
replace state = 30 if state_residence == 28 /* NewHampshire */
|
76 |
+
replace state = 31 if state_residence == 29 /* NewJersey */
|
77 |
+
replace state = 32 if state_residence == 30 /* NewMexico */
|
78 |
+
replace state = 33 if state_residence == 31 /* NewYork */
|
79 |
+
replace state = 34 if state_residence == 32 /* NorthCarolina */
|
80 |
+
replace state = 35 if state_residence == 33 /* NorthDakota */
|
81 |
+
replace state = 36 if state_residence == 34 /* Ohio */
|
82 |
+
replace state = 37 if state_residence == 35 /* Oklahoma */
|
83 |
+
replace state = 38 if state_residence == 36 /* Oregon */
|
84 |
+
replace state = 39 if state_residence == 37 /* Pennsylvania */
|
85 |
+
replace state = 40 if state_residence == 38 /* RhodeIsland */
|
86 |
+
replace state = 41 if state_residence == 39 /* SouthCarolina */
|
87 |
+
replace state = 42 if state_residence == 40 /* SouthDakota */
|
88 |
+
replace state = 43 if state_residence == 41 /* Tennessee */
|
89 |
+
replace state = 44 if state_residence == 42 /* Texas */
|
90 |
+
replace state = 45 if state_residence == 43 /* Utah */
|
91 |
+
replace state = 46 if state_residence == 44 /* Vermont */
|
92 |
+
replace state = 47 if state_residence == 45 /* Virginia */
|
93 |
+
replace state = 48 if state_residence == 46 /* Washington */
|
94 |
+
replace state = 49 if state_residence == 47 /* WestVirginia */
|
95 |
+
replace state = 50 if state_residence == 48 /* Wisconsin */
|
96 |
+
replace state = 51 if state_residence == 49 /* Wyoming */
|
97 |
+
|
98 |
+
*Marital status: 1 for single, 2 for joint, 3 for head of household.
|
99 |
+
* Making single if never married, widowed, divorced, separated, or other.
|
100 |
+
g mstat = cond(marital_status_head != 1, 1, 2)
|
101 |
+
* Making head of household if unmarried with children.
|
102 |
+
*replace mstat = 3 if mstat == 1 & children > 0
|
103 |
+
|
104 |
+
*Number of dependents (kids) per tax form.
|
105 |
+
g depx = children
|
106 |
+
|
107 |
+
*Labor income of primary and secondary taxpayers
|
108 |
+
*Includes:
|
109 |
+
*wages and salaries
|
110 |
+
*+any separate reports of bonuses
|
111 |
+
*+overtime
|
112 |
+
*+tips
|
113 |
+
*+commissions
|
114 |
+
*+professional practice or trade
|
115 |
+
*+market gardening
|
116 |
+
*+additional job income
|
117 |
+
*+and miscellaneous labor income
|
118 |
+
g pwages = labor_inc_head + business_labor_income_head
|
119 |
+
g swages = (labor_inc_wife+business_labor_income_wife)*(mstat==2)
|
120 |
+
*g swages = labor_inc_wife*(mstat==2) // only matters if married
|
121 |
+
|
122 |
+
*Gross social security benefits
|
123 |
+
*Taxsim will calculate the portion includable in adjusted gross income (AGI)
|
124 |
+
g gssi = socsec_income_hh //together wife and head
|
125 |
+
|
126 |
+
*Other non-taxable transfer Income such as welfare, workers comp,
|
127 |
+
*veterans benefits and child support that would affect eligibility for state
|
128 |
+
*property tax rebates but would not be taxable at the federal level
|
129 |
+
g transfers = vapension_inc_head + workerscomp_inc_head + tanf_inc_head + ///
|
130 |
+
otherwelfare_inc_head + childsupport_inc_head + transf_rel_head + ///
|
131 |
+
ssi_head+ ///
|
132 |
+
(mstat==2)*(workerscomp_inc_wife + tanf_inc_wife + otherwelfare_inc_wife + ///
|
133 |
+
childsupport_inc_wife + transf_rel_wife + ssi_wife)
|
134 |
+
*(mstat==2)*(workerscomp_inc_wife + tanf_inc_wife + otherwelfare_inc_wife + ///
|
135 |
+
*childsupport_inc_wife + transf_rel_wife + ssi_wife)
|
136 |
+
|
137 |
+
|
138 |
+
*Unemployment compensation benefits
|
139 |
+
*Taxsim will calculate the portion included in AGI
|
140 |
+
g ui = unemployment_inc_head + unemployment_inc_wife
|
141 |
+
*g ui = unemployment_inc_head + (mstat==2)*unemployment_inc_wife
|
142 |
+
|
143 |
+
*Number of dependents under age 17
|
144 |
+
*Cannot distinguish between children in PSID (asign all children who live in
|
145 |
+
*Family Unit as dependent)
|
146 |
+
g depchild = children
|
147 |
+
|
148 |
+
*IRA and annuities (benefits and contributions)
|
149 |
+
*g otherprop=pension_ben-pension_contrib
|
150 |
+
|
151 |
+
*Annuities/IRAs head and wife (benefits)
|
152 |
+
g otherprop=annira_head+pension_wife+business_asset_income_head+business_asset_income_wife
|
153 |
+
|
154 |
+
*Taxable retirement income
|
155 |
+
g pensions = nonva_retir_head+other_pen_head
|
156 |
+
|
157 |
+
*Labor income less pension contributions
|
158 |
+
replace pwages = pwages - stat_pen_contrib_head
|
159 |
+
replace swages = swages - stat_pen_contrib_wife
|
160 |
+
|
161 |
+
*NEW CODE
|
162 |
+
replace pwages = . if pwages<0
|
163 |
+
replace swages = . if swages<0
|
164 |
+
replace mstat = 2 if mstat == 1 & pwages>0 & swages>0
|
165 |
+
replace state=. if state==0
|
166 |
+
replace year = `x' - 1
|
167 |
+
*replace otherprop=0 if otherprop<0
|
168 |
+
sum otherprop
|
169 |
+
drop otherprop //new taxsim9 ado does not treat this variable well and reports back missing values for entire observations when otherprop is included in code
|
170 |
+
|
171 |
+
|
172 |
+
*Run taxsim
|
173 |
+
taxsim9, full replace
|
174 |
+
|
175 |
+
di "TAXSIM FOR YEAR `x' OVER"
|
176 |
+
|
177 |
+
*Compute total income before tax
|
178 |
+
gen pretax_income = pwages + swages + transfers + gssi + ui + pensions
|
179 |
+
*gen pretax_income = pwages + swages + transfers + gssi + ui + otherprop + pensions
|
180 |
+
|
181 |
+
|
182 |
+
*Compute disposable income
|
183 |
+
*Deflate by the CPI (base year 1998)
|
184 |
+
rename fiitax federalTax
|
185 |
+
rename siitax stateTax
|
186 |
+
gen aftertax_income_defl = (pretax_income - federalTax - stateTax)*(`cpi1999' / `cpi`x'')
|
187 |
+
|
188 |
+
*Drop HH with negative income (stemming from pension contributions that are too high relative to income or from business losses)
|
189 |
+
drop if aftertax_income_defl<0
|
190 |
+
|
191 |
+
*Adjust using equivalence scales (OECD)
|
192 |
+
gen nr_adult = size_fam-depchild
|
193 |
+
gen equiv = 1.0 + 0.7*(nr_adult-1) + 0.5*depchild
|
194 |
+
gen aftertax_income_defl_equiv= aftertax_income_defl/equiv
|
195 |
+
|
196 |
+
*Drop all unnecessary variables
|
197 |
+
keep aftertax_income_defl_equiv age_head year_survey ed_head marital_status_head fam_ID_1968 fam_ID_year size_fam equiv state_residence mstat year
|
198 |
+
|
199 |
+
cd ..
|
200 |
+
|
201 |
+
|
202 |
+
save "`procdata'/tempX`x'.dta",replace
|
203 |
+
|
204 |
+
|
205 |
+
|
206 |
+
}
|
207 |
+
|
208 |
+
|
42/replication_package/data_replication/psid/output/tab1_refi_liquidity.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2f76776dcc3ca17009b8eefab2818493c49e9972d479394da524cb2d1c68a2d0
|
3 |
+
size 404
|
42/replication_package/data_replication/psid/output/tab1_refi_moments.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c843c640813fdf4e9fd8857ae0fef0384835a56dff9290ecec13b67df1181f31
|
3 |
+
size 311
|
42/replication_package/data_replication/psid/output/tab2_income.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:58dc75e1f5f3629b6c4fb2b3560d7943f503b3d2de5e813a6582b3ee4c73d619
|
3 |
+
size 30
|
42/replication_package/data_replication/psid/output/tabA3_refi.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:28d11019b764bc4f94d6d64e6e48e63b172abedfb23fed37ee946422d9a4b60b
|
3 |
+
size 47
|
42/replication_package/data_replication/psid/proc_data/our_proc/temp1999.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4987b552448adb6a433bf2e2ccca2c1f689fd08461d143347da909e361da38ed
|
3 |
+
size 152335
|
42/replication_package/data_replication/psid/proc_data/our_proc/temp2001.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:68a7683238036f82766a0b9eac3288128e6ec80d55f7703052a1e0221a15981b
|
3 |
+
size 157714
|
42/replication_package/data_replication/psid/proc_data/our_proc/temp2003.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cec2977c5302b585ece701ae31b90070ab82e22feb25b0bd80833b8fa530d3f7
|
3 |
+
size 162730
|
42/replication_package/data_replication/psid/proc_data/our_proc/temp2005.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b237a4843e89ee506e5def8b613b168e6f3ca7d29fb8539cf756a1e341a676ae
|
3 |
+
size 164083
|
42/replication_package/data_replication/psid/proc_data/our_proc/temp2007.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:83e6ec50faca3035e2c29513465e0cb33998577a60bbec22adfb75dec7fc9da9
|
3 |
+
size 168538
|
42/replication_package/data_replication/psid/proc_data/our_proc/temp2009.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b43e1b25a23cca6ac07f881a158871fb952849523708face0a4e5a144d3dba92
|
3 |
+
size 179494
|
42/replication_package/data_replication/psid/proc_data/our_proc/temp2011.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:27203e4ccb779376226e3bc6f9860fa76ea516800ac91f7cc95534cebe295af0
|
3 |
+
size 181177
|
42/replication_package/data_replication/psid/proc_data/our_proc/tempX1999.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cd7d1e5c5fd801c16a40d1dfa2c99c51e2ba5ee1c2fee31ab33584aff3472f69
|
3 |
+
size 213300
|
42/replication_package/data_replication/psid/proc_data/our_proc/tempX2001.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:428bee5e983edaf74054156fe54c9a330e3ef22e0877f9436cf06ebc9fe2bf13
|
3 |
+
size 220590
|
42/replication_package/data_replication/psid/proc_data/our_proc/tempX2003.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:106f89d107ff558345c4d2b00e518a4f634ee54b6bf98ad60f9656a5ba77901f
|
3 |
+
size 227340
|
42/replication_package/data_replication/psid/proc_data/our_proc/tempX2005.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:682f04209d817bd47c48efe8dd8c887549f60f4f471e1e295b4bc0becce008a8
|
3 |
+
size 229005
|
42/replication_package/data_replication/psid/proc_data/our_proc/tempX2007.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c65bfa28c629d3894cc675a1b3371d5d2b7fd2a2a04575b2a43f6c7a985b04eb
|
3 |
+
size 235170
|
42/replication_package/data_replication/psid/proc_data/our_proc/tempX2009.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ed10a2c6807d235136557c2f3efab9ab416ed0ea63f4ccaaf3535a9e9fcd1a3d
|
3 |
+
size 250020
|
42/replication_package/data_replication/psid/proc_data/our_proc/tempX2011.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0fb5e5ac87625d032b1999301b39c0b9ef7dd938eb65e91266f45ad663fd37ba
|
3 |
+
size 252180
|
42/replication_package/data_replication/psid/proc_data/our_proc/tempX2013.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9917299b281103b7b2ab8d5569849b87adf8c0f8ea06cf3794b496cd3bc5a31e
|
3 |
+
size 250965
|
42/replication_package/data_replication/psid/proc_data/our_proc/tempX2015.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4557802bc94c16f5b7a447bbab69a1f1c7915a5c1c4448651e136c2f53c55cf5
|
3 |
+
size 244935
|
42/replication_package/data_replication/psid/proc_data/our_proc/tempX2017.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b27394dd2df975fca2adcf7afa796629eaf577c246eb70c602f756bc2897c0c4
|
3 |
+
size 246645
|
42/replication_package/data_replication/psid/raw_data/CON01.do
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
#delimit ;
|
3 |
+
|
4 |
+
**************************************************************************
|
5 |
+
Label : Consumption 2001
|
6 |
+
Rows : 7406
|
7 |
+
Columns : 35
|
8 |
+
ASCII File Date : May 1, 2014
|
9 |
+
*************************************************************************;
|
10 |
+
|
11 |
+
|
12 |
+
infix
|
13 |
+
REL01 1 - 1 CON01_ID 2 - 6 FOOD01 7 - 16
|
14 |
+
FDHM01 17 - 26 FDOUT01 27 - 36 FDDEL01 37 - 46
|
15 |
+
HOUS01 47 - 56 MORT01 57 - 66 RENT01 67 - 76
|
16 |
+
PRPTAX01 77 - 86 HMEINS01 87 - 96 UTIL01 97 - 106
|
17 |
+
HEAT01 107 - 116 ELECTR01 117 - 126 WATER01 127 - 136
|
18 |
+
OUTIL01 137 - 146 TRAN01 147 - 156 VEHLN01 157 - 166
|
19 |
+
VEHPAY01 167 - 176 VEHLS01 177 - 186 AUTOIN01 187 - 196
|
20 |
+
VEHADD01 197 - 206 VEHREP01 207 - 216 GAS01 217 - 226
|
21 |
+
PARK01 227 - 236 BUS01 237 - 246 CAB01 247 - 256
|
22 |
+
OTRAN01 257 - 266 ED01 267 - 276 CHILD01 277 - 286
|
23 |
+
HEALTH01 287 - 296 HOS01 297 - 306 DOCTOR01 307 - 316
|
24 |
+
PRESCR01 317 - 326 HINS01 327 - 336
|
25 |
+
using CON01.txt, clear
|
26 |
+
;
|
27 |
+
label variable REL01 "2001 CONSUMPTION RELEASE NUMBER" ;
|
28 |
+
label variable CON01_ID "2001 FAMILY INTERVIEW (ID) NUMBER" ;
|
29 |
+
label variable FOOD01 "2001 FOOD EXPENDITURE" ;
|
30 |
+
label variable FDHM01 "2001 FOOD AT HOME EXPENDITURE" ;
|
31 |
+
label variable FDOUT01 "2001 FOOD AWAY FROM HOME EXPENDITURE" ;
|
32 |
+
label variable FDDEL01 "2001 FOOD DELIVERED EXPENDITURE" ;
|
33 |
+
label variable HOUS01 "2001 HOUSING EXPENDITURE" ;
|
34 |
+
label variable MORT01 "2001 MORTGAGE EXPENDITURE" ;
|
35 |
+
label variable RENT01 "2001 RENT EXPENDITURE" ;
|
36 |
+
label variable PRPTAX01 "2001 PROPERTY TAX EXPENDITURE" ;
|
37 |
+
label variable HMEINS01 "2001 HOME INSURANCE EXPENDITURE" ;
|
38 |
+
label variable UTIL01 "2001 UTILITY EXPENDITURE" ;
|
39 |
+
label variable HEAT01 "2001 GAS FOR HOME EXPENDITURE" ;
|
40 |
+
label variable ELECTR01 "2001 ELECTRICITY EXPENDITURE" ;
|
41 |
+
label variable WATER01 "2001 WATER/SEWER EXPENDITURE" ;
|
42 |
+
label variable OUTIL01 "2001 OTHER UTILITY EXPENDITURE" ;
|
43 |
+
label variable TRAN01 "2001 TRANSPORTATION EXPENDITURE" ;
|
44 |
+
label variable VEHLN01 "2001 VEHICLE LOAN PAYMENT EXPENDITURE" ;
|
45 |
+
label variable VEHPAY01 "2001 VEHICLE DOWN PAYMENT EXPENDITURE" ;
|
46 |
+
label variable VEHLS01 "2001 VEHICLE LEASE PAYMENT EXPENDITURE" ;
|
47 |
+
label variable AUTOIN01 "2001 AUTO INSURANCE EXPENDITURE" ;
|
48 |
+
label variable VEHADD01 "2001 ADDITIONAL VEHICLE EXPENDITURE" ;
|
49 |
+
label variable VEHREP01 "2001 VEHICLE REPAIR EXPENDITURE" ;
|
50 |
+
label variable GAS01 "2001 GASOLINE EXPENDITURE" ;
|
51 |
+
label variable PARK01 "2001 PARKING EXPENDITURE" ;
|
52 |
+
label variable BUS01 "2001 BUS/TRAIN EXPENDITURE" ;
|
53 |
+
label variable CAB01 "2001 TAXICAB EXPENDITURE" ;
|
54 |
+
label variable OTRAN01 "2001 OTHER TRANSPORTATION EXPENDITURE" ;
|
55 |
+
label variable ED01 "2001 EDUCATION EXPENDITURE" ;
|
56 |
+
label variable CHILD01 "2001 CHILDCARE EXPENDITURE" ;
|
57 |
+
label variable HEALTH01 "2001 HEALTH CARE EXPENDITURE" ;
|
58 |
+
label variable HOS01 "2001 HOSPITAL/NURSING HOME EXPENDITURE" ;
|
59 |
+
label variable DOCTOR01 "2001 DOCTOR EXPENDITURE" ;
|
60 |
+
label variable PRESCR01 "2001 PRESCRIPTIONS/OTHER EXPENDITURE" ;
|
61 |
+
label variable HINS01 "2001 HEALTH INSURANCE EXPENDITURE" ;
|
42/replication_package/data_replication/psid/raw_data/CON01.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5b1490a8196e4d1545e12cfcda54faeb9213b90ed347ddb248b85ee12cb7ab16
|
3 |
+
size 2503228
|
42/replication_package/data_replication/psid/raw_data/CON03.do
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
#delimit ;
|
3 |
+
|
4 |
+
**************************************************************************
|
5 |
+
Label : 2003 Consumption File
|
6 |
+
Rows : 7822
|
7 |
+
Columns : 35
|
8 |
+
ASCII File Date : May 1, 2014
|
9 |
+
*************************************************************************;
|
10 |
+
|
11 |
+
|
12 |
+
infix
|
13 |
+
REL03 1 - 1 CON03_ID 2 - 6 FOOD03 7 - 16
|
14 |
+
FDHM03 17 - 26 FDOUT03 27 - 36 FDDEL03 37 - 46
|
15 |
+
HOUS03 47 - 56 MORT03 57 - 66 RENT03 67 - 76
|
16 |
+
PRPTAX03 77 - 86 HMEINS03 87 - 96 UTIL03 97 - 106
|
17 |
+
HEAT03 107 - 116 ELECTR03 117 - 126 WATER03 127 - 136
|
18 |
+
OUTIL03 137 - 146 TRAN03 147 - 156 VEHLN03 157 - 166
|
19 |
+
VEHPAY03 167 - 176 VEHLS03 177 - 186 AUTOIN03 187 - 196
|
20 |
+
VEHADD03 197 - 206 VEHREP03 207 - 216 GAS03 217 - 226
|
21 |
+
PARK03 227 - 236 BUS03 237 - 246 CAB03 247 - 256
|
22 |
+
OTRAN03 257 - 266 ED03 267 - 276 CHILD03 277 - 286
|
23 |
+
HEALTH03 287 - 296 HOS03 297 - 306 DOCTOR03 307 - 316
|
24 |
+
PRESCR03 317 - 326 HINS03 327 - 336
|
25 |
+
using CON03.txt, clear
|
26 |
+
;
|
27 |
+
label variable REL03 "2003 CONSUMPTION RELEASE NUMBER" ;
|
28 |
+
label variable CON03_ID "2003 FAMILY INTERVIEW (ID) NUMBER" ;
|
29 |
+
label variable FOOD03 "2003 FOOD EXPENDITURE" ;
|
30 |
+
label variable FDHM03 "2003 FOOD AT HOME EXPENDITURE" ;
|
31 |
+
label variable FDOUT03 "2003 FOOD AWAY FROM HOME EXPENDITURE" ;
|
32 |
+
label variable FDDEL03 "2003 FOOD DELIVERED EXPENDITURE" ;
|
33 |
+
label variable HOUS03 "2003 HOUSING EXPENDITURE" ;
|
34 |
+
label variable MORT03 "2003 MORTGAGE EXPENDITURE" ;
|
35 |
+
label variable RENT03 "2003 RENT EXPENDITURE" ;
|
36 |
+
label variable PRPTAX03 "2003 PROPERTY TAX EXPENDITURE" ;
|
37 |
+
label variable HMEINS03 "2003 HOME INSURANCE EXPENDITURE" ;
|
38 |
+
label variable UTIL03 "2003 UTILITY EXPENDITURE" ;
|
39 |
+
label variable HEAT03 "2003 GAS FOR HOME EXPENDITURE" ;
|
40 |
+
label variable ELECTR03 "2003 ELECTRICITY EXPENDITURE" ;
|
41 |
+
label variable WATER03 "2003 WATER/SEWER EXPENDITURE" ;
|
42 |
+
label variable OUTIL03 "2003 OTHER UTILITY EXPENDITURE" ;
|
43 |
+
label variable TRAN03 "2003 TRANSPORTATION EXPENDITURE" ;
|
44 |
+
label variable VEHLN03 "2003 VEHICLE LOAN PAYMENT EXPENDITURE" ;
|
45 |
+
label variable VEHPAY03 "2003 VEHICLE DOWN PAYMENT EXPENDITURE" ;
|
46 |
+
label variable VEHLS03 "2003 VEHICLE LEASE PAYMENT EXPENDITURE" ;
|
47 |
+
label variable AUTOIN03 "2003 AUTO INSURANCE EXPENDITURE" ;
|
48 |
+
label variable VEHADD03 "2003 ADDITIONAL VEHICLE EXPENDITURE" ;
|
49 |
+
label variable VEHREP03 "2003 VEHICLE REPAIR EXPENDITURE" ;
|
50 |
+
label variable GAS03 "2003 GASOLINE EXPENDITURE" ;
|
51 |
+
label variable PARK03 "2003 PARKING EXPENDITURE" ;
|
52 |
+
label variable BUS03 "2003 BUS/TRAIN EXPENDITURE" ;
|
53 |
+
label variable CAB03 "2003 TAXICAB EXPENDITURE" ;
|
54 |
+
label variable OTRAN03 "2003 OTHER TRANSPORTATION EXPENDITURE" ;
|
55 |
+
label variable ED03 "2003 EDUCATION EXPENDITURE" ;
|
56 |
+
label variable CHILD03 "2003 CHILDCARE EXPENDITURE" ;
|
57 |
+
label variable HEALTH03 "2003 HEALTH CARE EXPENDITURE" ;
|
58 |
+
label variable HOS03 "2003 HOSPITAL/NURSING HOME EXPENDITURE" ;
|
59 |
+
label variable DOCTOR03 "2003 DOCTOR EXPENDITURE" ;
|
60 |
+
label variable PRESCR03 "2003 PRESCRIPTIONS/OTHER EXPENDITURE" ;
|
61 |
+
label variable HINS03 "2003 HEALTH INSURANCE EXPENDITURE" ;
|
42/replication_package/data_replication/psid/raw_data/CON03.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:662c678567d365cf8f4e6342fabddde374925a16cf6c210112104bfb0f7ae009
|
3 |
+
size 2643836
|
42/replication_package/data_replication/psid/raw_data/CON05.do
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
#delimit ;
|
3 |
+
|
4 |
+
**************************************************************************
|
5 |
+
Label : 2005 Consumption File
|
6 |
+
Rows : 8002
|
7 |
+
Columns : 41
|
8 |
+
ASCII File Date : May 1, 2014
|
9 |
+
*************************************************************************;
|
10 |
+
|
11 |
+
|
12 |
+
infix
|
13 |
+
REL05 1 - 1 CON05_ID 2 - 6 FOOD05 7 - 16
|
14 |
+
FDHM05 17 - 26 FDOUT05 27 - 36 FDDEL05 37 - 46
|
15 |
+
HOUS05 47 - 56 MORT05 57 - 66 RENT05 67 - 76
|
16 |
+
PRPTAX05 77 - 86 HMEINS05 87 - 96 UTIL05 97 - 106
|
17 |
+
HEAT05 107 - 116 ELECTR05 117 - 126 WATER05 127 - 136
|
18 |
+
OUTIL05 137 - 146 TELINT05 147 - 156 TRAN05 157 - 166
|
19 |
+
VEHLN05 167 - 176 VEHPAY05 177 - 186 VEHLS05 187 - 196
|
20 |
+
AUTOIN05 197 - 206 VEHADD05 207 - 216 VEHREP05 217 - 226
|
21 |
+
GAS05 227 - 236 PARK05 237 - 246 BUS05 247 - 256
|
22 |
+
CAB05 257 - 266 OTRAN05 267 - 276 ED05 277 - 286
|
23 |
+
CHILD05 287 - 296 HEALTH05 297 - 306 HOS05 307 - 316
|
24 |
+
DOCTOR05 317 - 326 PRESCR05 327 - 336 HINS05 337 - 346
|
25 |
+
HHREP05 347 - 356 FURN05 357 - 366 CLOTH05 367 - 376
|
26 |
+
TRIPS05 377 - 386 OTHREC05 387 - 396
|
27 |
+
using CON05.txt, clear
|
28 |
+
;
|
29 |
+
label variable REL05 "2005 CONSUMPTION RELEASE NUMBER" ;
|
30 |
+
label variable CON05_ID "2005 FAMILY INTERVIEW (ID) NUMBER" ;
|
31 |
+
label variable FOOD05 "2005 FOOD EXPENDITURE" ;
|
32 |
+
label variable FDHM05 "2005 FOOD AT HOME EXPENDITURE" ;
|
33 |
+
label variable FDOUT05 "2005 FOOD AWAY FROM HOME EXPENDITURE" ;
|
34 |
+
label variable FDDEL05 "2005 FOOD DELIVERED EXPENDITURE" ;
|
35 |
+
label variable HOUS05 "2005 HOUSING EXPENDITURE" ;
|
36 |
+
label variable MORT05 "2005 MORTGAGE EXPENDITURE" ;
|
37 |
+
label variable RENT05 "2005 RENT EXPENDITURE" ;
|
38 |
+
label variable PRPTAX05 "2005 PROPERTY TAX EXPENDITURE" ;
|
39 |
+
label variable HMEINS05 "2005 HOME INSURANCE EXPENDITURE" ;
|
40 |
+
label variable UTIL05 "2005 UTILITY EXPENDITURE" ;
|
41 |
+
label variable HEAT05 "2005 GAS FOR HOME EXPENDITURE" ;
|
42 |
+
label variable ELECTR05 "2005 ELECTRICITY EXPENDITURE" ;
|
43 |
+
label variable WATER05 "2005 WATER/SEWER EXPENDITURE" ;
|
44 |
+
label variable OUTIL05 "2005 OTHER UTILITY EXPENDITURE" ;
|
45 |
+
label variable TELINT05 "2005 TELEPHONE/INTERNET EXPENDITURE" ;
|
46 |
+
label variable TRAN05 "2005 TRANSPORTATION EXPENDITURE" ;
|
47 |
+
label variable VEHLN05 "2005 VEHICLE LOAN PAYMENT EXPENDITURE" ;
|
48 |
+
label variable VEHPAY05 "2005 VEHICLE DOWN PAYMENT EXPENDITURE" ;
|
49 |
+
label variable VEHLS05 "2005 VEHICLE LEASE PAYMENT EXPENDITURE" ;
|
50 |
+
label variable AUTOIN05 "2005 AUTO INSURANCE EXPENDITURE" ;
|
51 |
+
label variable VEHADD05 "2005 ADDITIONAL VEHICLE EXPENDITURE" ;
|
52 |
+
label variable VEHREP05 "2005 VEHICLE REPAIR EXPENDITURE" ;
|
53 |
+
label variable GAS05 "2005 GASOLINE EXPENDITURE" ;
|
54 |
+
label variable PARK05 "2005 PARKING EXPENDITURE" ;
|
55 |
+
label variable BUS05 "2005 BUS/TRAIN EXPENDITURE" ;
|
56 |
+
label variable CAB05 "2005 TAXICAB EXPENDITURE" ;
|
57 |
+
label variable OTRAN05 "2005 OTHER TRANSPORTATION EXPENDITURE" ;
|
58 |
+
label variable ED05 "2005 EDUCATION EXPENDITURE" ;
|
59 |
+
label variable CHILD05 "2005 CHILDCARE EXPENDITURE" ;
|
60 |
+
label variable HEALTH05 "2005 HEALTH CARE EXPENDITURE" ;
|
61 |
+
label variable HOS05 "2005 HOSPITAL/NURSING HOME EXPENDITURE" ;
|
62 |
+
label variable DOCTOR05 "2005 DOCTOR EXPENDITURE" ;
|
63 |
+
label variable PRESCR05 "2005 PRESCRIPTIONS/OTHER EXPENDITURE" ;
|
64 |
+
label variable HINS05 "2005 HEALTH INSURANCE EXPENDITURE" ;
|
65 |
+
label variable HHREP05 "2005 HOUSEHOLD REPAIRS EXPENDITURE" ;
|
66 |
+
label variable FURN05 "2005 HOUSEHOLD FURNISHING EXPENDITURE" ;
|
67 |
+
label variable CLOTH05 "2005 CLOTHING EXPENDITURE" ;
|
68 |
+
label variable TRIPS05 "2005 TRIPS EXPENDITURE" ;
|
69 |
+
label variable OTHREC05 "2005 OTHER RECREATION EXPENDITURE" ;
|
42/replication_package/data_replication/psid/raw_data/CON05.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5e7b8355af6459f7928c868460a95d90b0af329f05790e438769a72e3b737fd9
|
3 |
+
size 3184796
|
42/replication_package/data_replication/psid/raw_data/CON07.do
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
#delimit ;
|
3 |
+
|
4 |
+
**************************************************************************
|
5 |
+
Label : 2007 Consumption File
|
6 |
+
Rows : 8289
|
7 |
+
Columns : 41
|
8 |
+
ASCII File Date : May 1, 2014
|
9 |
+
*************************************************************************;
|
10 |
+
|
11 |
+
|
12 |
+
infix
|
13 |
+
REL07 1 - 1 CON07_ID 2 - 6 FOOD07 7 - 16
|
14 |
+
FDHM07 17 - 26 FDOUT07 27 - 36 FDDEL07 37 - 46
|
15 |
+
HOUS07 47 - 56 MORT07 57 - 66 RENT07 67 - 76
|
16 |
+
PRPTAX07 77 - 86 HMEINS07 87 - 96 UTIL07 97 - 106
|
17 |
+
HEAT07 107 - 116 ELECTR07 117 - 126 WATER07 127 - 136
|
18 |
+
OUTIL07 137 - 146 TELINT07 147 - 156 TRAN07 157 - 166
|
19 |
+
VEHLN07 167 - 176 VEHPAY07 177 - 186 VEHLS07 187 - 196
|
20 |
+
AUTOIN07 197 - 206 VEHADD07 207 - 216 VEHREP07 217 - 226
|
21 |
+
GAS07 227 - 236 PARK07 237 - 246 BUS07 247 - 256
|
22 |
+
CAB07 257 - 266 OTRAN07 267 - 276 ED07 277 - 286
|
23 |
+
CHILD07 287 - 296 HEALTH07 297 - 306 HOS07 307 - 316
|
24 |
+
DOCTOR07 317 - 326 PRESCR07 327 - 336 HINS07 337 - 346
|
25 |
+
HHREP07 347 - 356 FURN07 357 - 366 CLOTH07 367 - 376
|
26 |
+
TRIPS07 377 - 386 OTHREC07 387 - 396
|
27 |
+
using CON07.txt, clear
|
28 |
+
;
|
29 |
+
label variable REL07 "2007 CONSUMPTION RELEASE NUMBER" ;
|
30 |
+
label variable CON07_ID "2007 FAMILY INTERVIEW (ID) NUMBER" ;
|
31 |
+
label variable FOOD07 "2007 FOOD EXPENDITURE" ;
|
32 |
+
label variable FDHM07 "2007 FOOD AT HOME EXPENDITURE" ;
|
33 |
+
label variable FDOUT07 "2007 FOOD AWAY FROM HOME EXPENDITURE" ;
|
34 |
+
label variable FDDEL07 "2007 FOOD DELIVERED EXPENDITURE" ;
|
35 |
+
label variable HOUS07 "2007 HOUSING EXPENDITURE" ;
|
36 |
+
label variable MORT07 "2007 MORTGAGE EXPENDITURE" ;
|
37 |
+
label variable RENT07 "2007 RENT EXPENDITURE" ;
|
38 |
+
label variable PRPTAX07 "2007 PROPERTY TAX EXPENDITURE" ;
|
39 |
+
label variable HMEINS07 "2007 HOME INSURANCE EXPENDITURE" ;
|
40 |
+
label variable UTIL07 "2007 UTILITY EXPENDITURE" ;
|
41 |
+
label variable HEAT07 "2007 GAS FOR HOME EXPENDITURE" ;
|
42 |
+
label variable ELECTR07 "2007 ELECTRICITY EXPENDITURE" ;
|
43 |
+
label variable WATER07 "2007 WATER/SEWER EXPENDITURE" ;
|
44 |
+
label variable OUTIL07 "2007 OTHER UTILITY EXPENDITURE" ;
|
45 |
+
label variable TELINT07 "2007 TELEPHONE/INTERNET EXPENDITURE" ;
|
46 |
+
label variable TRAN07 "2007 TRANSPORTATION EXPENDITURE" ;
|
47 |
+
label variable VEHLN07 "2007 VEHICLE LOAN PAYMENT EXPENDITURE" ;
|
48 |
+
label variable VEHPAY07 "2007 VEHICLE DOWN PAYMENT EXPENDITURE" ;
|
49 |
+
label variable VEHLS07 "2007 VEHICLE LEASE PAYMENT EXPENDITURE" ;
|
50 |
+
label variable AUTOIN07 "2007 AUTO INSURANCE EXPENDITURE" ;
|
51 |
+
label variable VEHADD07 "2007 ADDITIONAL VEHICLE EXPENDITURE" ;
|
52 |
+
label variable VEHREP07 "2007 VEHICLE REPAIR EXPENDITURE" ;
|
53 |
+
label variable GAS07 "2007 GASOLINE EXPENDITURE" ;
|
54 |
+
label variable PARK07 "2007 PARKING EXPENDITURE" ;
|
55 |
+
label variable BUS07 "2007 BUS/TRAIN EXPENDITURE" ;
|
56 |
+
label variable CAB07 "2007 TAXICAB EXPENDITURE" ;
|
57 |
+
label variable OTRAN07 "2007 OTHER TRANSPORTATION EXPENDITURE" ;
|
58 |
+
label variable ED07 "2007 EDUCATION EXPENDITURE" ;
|
59 |
+
label variable CHILD07 "2007 CHILDCARE EXPENDITURE" ;
|
60 |
+
label variable HEALTH07 "2007 HEALTH CARE EXPENDITURE" ;
|
61 |
+
label variable HOS07 "2007 HOSPITAL/NURSING HOME EXPENDITURE" ;
|
62 |
+
label variable DOCTOR07 "2007 DOCTOR EXPENDITURE" ;
|
63 |
+
label variable PRESCR07 "2007 PRESCRIPTIONS/OTHER EXPENDITURE" ;
|
64 |
+
label variable HINS07 "2007 HEALTH INSURANCE EXPENDITURE" ;
|
65 |
+
label variable HHREP07 "2007 HOUSEHOLD REPAIRS EXPENDITURE" ;
|
66 |
+
label variable FURN07 "2007 HOUSEHOLD FURNISHING EXPENDITURE" ;
|
67 |
+
label variable CLOTH07 "2007 CLOTHING EXPENDITURE" ;
|
68 |
+
label variable TRIPS07 "2007 TRIPS EXPENDITURE" ;
|
69 |
+
label variable OTHREC07 "2007 OTHER RECREATION EXPENDITURE" ;
|
42/replication_package/data_replication/psid/raw_data/CON07.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d1b9c71e4a8fd0b76ae6f84d39d0a5c9e582bc5e5bd1721b72d28b7f23c38fcc
|
3 |
+
size 3299022
|
42/replication_package/data_replication/psid/raw_data/CON09.do
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
#delimit ;
|
3 |
+
|
4 |
+
**************************************************************************
|
5 |
+
Label : 2009 Consumption File
|
6 |
+
Rows : 8690
|
7 |
+
Columns : 41
|
8 |
+
ASCII File Date : May 1, 2014
|
9 |
+
*************************************************************************;
|
10 |
+
|
11 |
+
|
12 |
+
infix
|
13 |
+
REL09 1 - 1 CON09_ID 2 - 6 FOOD09 7 - 16
|
14 |
+
FDHM09 17 - 26 FDOUT09 27 - 36 FDDEL09 37 - 46
|
15 |
+
HOUS09 47 - 56 MORT09 57 - 66 RENT09 67 - 76
|
16 |
+
PRPTAX09 77 - 86 HMEINS09 87 - 96 UTIL09 97 - 106
|
17 |
+
HEAT09 107 - 116 ELECTR09 117 - 126 WATER09 127 - 136
|
18 |
+
OUTIL09 137 - 146 TELINT09 147 - 156 TRAN09 157 - 166
|
19 |
+
VEHLN09 167 - 176 VEHPAY09 177 - 186 VEHLS09 187 - 196
|
20 |
+
AUTOIN09 197 - 206 VEHADD09 207 - 216 VEHREP09 217 - 226
|
21 |
+
GAS09 227 - 236 PARK09 237 - 246 BUS09 247 - 256
|
22 |
+
CAB09 257 - 266 OTRAN09 267 - 276 ED09 277 - 286
|
23 |
+
CHILD09 287 - 296 HEALTH09 297 - 306 HOS09 307 - 316
|
24 |
+
DOCTOR09 317 - 326 PRESCR09 327 - 336 HINS09 337 - 346
|
25 |
+
HHREP09 347 - 356 FURN09 357 - 366 CLOTH09 367 - 376
|
26 |
+
TRIPS09 377 - 386 OTHREC09 387 - 396
|
27 |
+
using CON09.txt, clear
|
28 |
+
;
|
29 |
+
label variable REL09 "2009 CONSUMPTION RELEASE NUMBER" ;
|
30 |
+
label variable CON09_ID "2009 FAMILY INTERVIEW (ID) NUMBER" ;
|
31 |
+
label variable FOOD09 "2009 FOOD EXPENDITURE" ;
|
32 |
+
label variable FDHM09 "2009 FOOD AT HOME EXPENDITURE" ;
|
33 |
+
label variable FDOUT09 "2009 FOOD AWAY FROM HOME EXPENDITURE" ;
|
34 |
+
label variable FDDEL09 "2009 FOOD DELIVERED EXPENDITURE" ;
|
35 |
+
label variable HOUS09 "2009 HOUSING EXPENDITURE" ;
|
36 |
+
label variable MORT09 "2009 MORTGAGE EXPENDITURE" ;
|
37 |
+
label variable RENT09 "2009 RENT EXPENDITURE" ;
|
38 |
+
label variable PRPTAX09 "2009 PROPERTY TAX EXPENDITURE" ;
|
39 |
+
label variable HMEINS09 "2009 HOME INSURANCE EXPENDITURE" ;
|
40 |
+
label variable UTIL09 "2009 UTILITY EXPENDITURE" ;
|
41 |
+
label variable HEAT09 "2009 GAS FOR HOME EXPENDITURE" ;
|
42 |
+
label variable ELECTR09 "2009 ELECTRICITY EXPENDITURE" ;
|
43 |
+
label variable WATER09 "2009 WATER/SEWER EXPENDITURE" ;
|
44 |
+
label variable OUTIL09 "2009 OTHER UTILITY EXPENDITURE" ;
|
45 |
+
label variable TELINT09 "2009 TELEPHONE/INTERNET EXPENDITURE" ;
|
46 |
+
label variable TRAN09 "2009 TRANSPORTATION EXPENDITURE" ;
|
47 |
+
label variable VEHLN09 "2009 VEHICLE LOAN PAYMENT EXPENDITURE" ;
|
48 |
+
label variable VEHPAY09 "2009 VEHICLE DOWN PAYMENT EXPENDITURE" ;
|
49 |
+
label variable VEHLS09 "2009 VEHICLE LEASE PAYMENT EXPENDITURE" ;
|
50 |
+
label variable AUTOIN09 "2009 AUTO INSURANCE EXPENDITURE" ;
|
51 |
+
label variable VEHADD09 "2009 ADDITIONAL VEHICLE EXPENDITURE" ;
|
52 |
+
label variable VEHREP09 "2009 VEHICLE REPAIR EXPENDITURE" ;
|
53 |
+
label variable GAS09 "2009 GASOLINE EXPENDITURE" ;
|
54 |
+
label variable PARK09 "2009 PARKING EXPENDITURE" ;
|
55 |
+
label variable BUS09 "2009 BUS/TRAIN EXPENDITURE" ;
|
56 |
+
label variable CAB09 "2009 TAXICAB EXPENDITURE" ;
|
57 |
+
label variable OTRAN09 "2009 OTHER TRANSPORTATION EXPENDITURE" ;
|
58 |
+
label variable ED09 "2009 EDUCATION EXPENDITURE" ;
|
59 |
+
label variable CHILD09 "2009 CHILDCARE EXPENDITURE" ;
|
60 |
+
label variable HEALTH09 "2009 HEALTH CARE EXPENDITURE" ;
|
61 |
+
label variable HOS09 "2009 HOSPITAL/NURSING HOME EXPENDITURE" ;
|
62 |
+
label variable DOCTOR09 "2009 DOCTOR EXPENDITURE" ;
|
63 |
+
label variable PRESCR09 "2009 PRESCRIPTIONS/OTHER EXPENDITURE" ;
|
64 |
+
label variable HINS09 "2009 HEALTH INSURANCE EXPENDITURE" ;
|
65 |
+
label variable HHREP09 "2009 HOUSEHOLD REPAIRS EXPENDITURE" ;
|
66 |
+
label variable FURN09 "2009 HOUSEHOLD FURNISHING EXPENDITURE" ;
|
67 |
+
label variable CLOTH09 "2009 CLOTHING EXPENDITURE" ;
|
68 |
+
label variable TRIPS09 "2009 TRIPS EXPENDITURE" ;
|
69 |
+
label variable OTHREC09 "2009 OTHER RECREATION EXPENDITURE" ;
|
42/replication_package/data_replication/psid/raw_data/CON09.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4e2962d44bb3dd1b5b2c398a4a72ae4d00b05e8f5f71bacf1337bc1bd29060a3
|
3 |
+
size 3458620
|
42/replication_package/data_replication/psid/raw_data/CON11.do
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
#delimit ;
|
3 |
+
|
4 |
+
**************************************************************************
|
5 |
+
Label : 2011 Consumption File
|
6 |
+
Rows : 8907
|
7 |
+
Columns : 41
|
8 |
+
ASCII File Date : May 1, 2014
|
9 |
+
*************************************************************************;
|
10 |
+
|
11 |
+
|
12 |
+
infix
|
13 |
+
REL11 1 - 1 CON11_ID 2 - 6 FOOD11 7 - 16
|
14 |
+
FDHM11 17 - 26 FDOUT11 27 - 36 FDDEL11 37 - 46
|
15 |
+
HOUS11 47 - 56 MORT11 57 - 66 RENT11 67 - 76
|
16 |
+
PRPTAX11 77 - 86 HMEINS11 87 - 96 UTIL11 97 - 106
|
17 |
+
HEAT11 107 - 116 ELECTR11 117 - 126 WATER11 127 - 136
|
18 |
+
OUTIL11 137 - 146 TELINT11 147 - 156 TRAN11 157 - 166
|
19 |
+
VEHLN11 167 - 176 VEHPAY11 177 - 186 VEHLS11 187 - 196
|
20 |
+
AUTOIN11 197 - 206 VEHADD11 207 - 216 VEHREP11 217 - 226
|
21 |
+
GAS11 227 - 236 PARK11 237 - 246 BUS11 247 - 256
|
22 |
+
CAB11 257 - 266 OTRAN11 267 - 276 ED11 277 - 286
|
23 |
+
CHILD11 287 - 296 HEALTH11 297 - 306 HOS11 307 - 316
|
24 |
+
DOCTOR11 317 - 326 PRESCR11 327 - 336 HINS11 337 - 346
|
25 |
+
HHREP11 347 - 356 FURN11 357 - 366 CLOTH11 367 - 376
|
26 |
+
TRIPS11 377 - 386 OTHREC11 387 - 396
|
27 |
+
using CON11.txt, clear
|
28 |
+
;
|
29 |
+
label variable REL11 "2011 CONSUMPTION RELEASE NUMBER" ;
|
30 |
+
label variable CON11_ID "2011 FAMILY INTERVIEW (ID) NUMBER" ;
|
31 |
+
label variable FOOD11 "2011 FOOD EXPENDITURE" ;
|
32 |
+
label variable FDHM11 "2011 FOOD AT HOME EXPENDITURE" ;
|
33 |
+
label variable FDOUT11 "2011 FOOD AWAY FROM HOME EXPENDITURE" ;
|
34 |
+
label variable FDDEL11 "2011 FOOD DELIVERED EXPENDITURE" ;
|
35 |
+
label variable HOUS11 "2011 HOUSING EXPENDITURE" ;
|
36 |
+
label variable MORT11 "2011 MORTGAGE EXPENDITURE" ;
|
37 |
+
label variable RENT11 "2011 RENT EXPENDITURE" ;
|
38 |
+
label variable PRPTAX11 "2011 PROPERTY TAX EXPENDITURE" ;
|
39 |
+
label variable HMEINS11 "2011 HOME INSURANCE EXPENDITURE" ;
|
40 |
+
label variable UTIL11 "2011 UTILITY EXPENDITURE" ;
|
41 |
+
label variable HEAT11 "2011 GAS FOR HOME EXPENDITURE" ;
|
42 |
+
label variable ELECTR11 "2011 ELECTRICITY EXPENDITURE" ;
|
43 |
+
label variable WATER11 "2011 WATER/SEWER EXPENDITURE" ;
|
44 |
+
label variable OUTIL11 "2011 OTHER UTILITY EXPENDITURE" ;
|
45 |
+
label variable TELINT11 "2011 TELEPHONE/INTERNET EXPENDITURE" ;
|
46 |
+
label variable TRAN11 "2011 TRANSPORTATION EXPENDITURE" ;
|
47 |
+
label variable VEHLN11 "2011 VEHICLE LOAN PAYMENT EXPENDITURE" ;
|
48 |
+
label variable VEHPAY11 "2011 VEHICLE DOWN PAYMENT EXPENDITURE" ;
|
49 |
+
label variable VEHLS11 "2011 VEHICLE LEASE PAYMENT EXPENDITURE" ;
|
50 |
+
label variable AUTOIN11 "2011 AUTO INSURANCE EXPENDITURE" ;
|
51 |
+
label variable VEHADD11 "2011 ADDITIONAL VEHICLE EXPENDITURE" ;
|
52 |
+
label variable VEHREP11 "2011 VEHICLE REPAIR EXPENDITURE" ;
|
53 |
+
label variable GAS11 "2011 GASOLINE EXPENDITURE" ;
|
54 |
+
label variable PARK11 "2011 PARKING EXPENDITURE" ;
|
55 |
+
label variable BUS11 "2011 BUS/TRAIN EXPENDITURE" ;
|
56 |
+
label variable CAB11 "2011 TAXICAB EXPENDITURE" ;
|
57 |
+
label variable OTRAN11 "2011 OTHER TRANSPORTATION EXPENDITURE" ;
|
58 |
+
label variable ED11 "2011 EDUCATION EXPENDITURE" ;
|
59 |
+
label variable CHILD11 "2011 CHILDCARE EXPENDITURE" ;
|
60 |
+
label variable HEALTH11 "2011 HEALTH CARE EXPENDITURE" ;
|
61 |
+
label variable HOS11 "2011 HOSPITAL/NURSING HOME EXPENDITURE" ;
|
62 |
+
label variable DOCTOR11 "2011 DOCTOR EXPENDITURE" ;
|
63 |
+
label variable PRESCR11 "2011 PRESCRIPTIONS/OTHER EXPENDITURE" ;
|
64 |
+
label variable HINS11 "2011 HEALTH INSURANCE EXPENDITURE" ;
|
65 |
+
label variable HHREP11 "2011 HOUSEHOLD REPAIRS EXPENDITURE" ;
|
66 |
+
label variable FURN11 "2011 HOUSEHOLD FURNISHING EXPENDITURE" ;
|
67 |
+
label variable CLOTH11 "2011 CLOTHING EXPENDITURE" ;
|
68 |
+
label variable TRIPS11 "2011 TRIPS EXPENDITURE" ;
|
69 |
+
label variable OTHREC11 "2011 OTHER RECREATION EXPENDITURE" ;
|
42/replication_package/data_replication/psid/raw_data/CON11.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:838a53f160778f31bd2ddd8ee3f14dc9ee0936127bfdc3b0f66130f34d5f0b46
|
3 |
+
size 3544986
|
42/replication_package/data_replication/psid/raw_data/CON99.do
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
#delimit ;
|
3 |
+
|
4 |
+
**************************************************************************
|
5 |
+
Label : Consumption 1999
|
6 |
+
Rows : 6997
|
7 |
+
Columns : 35
|
8 |
+
ASCII File Date : May 1, 2014
|
9 |
+
*************************************************************************;
|
10 |
+
|
11 |
+
|
12 |
+
infix
|
13 |
+
REL99 1 - 1 CON99_ID 2 - 6 FOOD99 7 - 16
|
14 |
+
FDHM99 17 - 26 FDOUT99 27 - 36 FDDEL99 37 - 46
|
15 |
+
HOUS99 47 - 56 MORT99 57 - 66 RENT99 67 - 76
|
16 |
+
PRPTAX99 77 - 86 HMEINS99 87 - 96 UTIL99 97 - 106
|
17 |
+
HEAT99 107 - 116 ELECTR99 117 - 126 WATER99 127 - 136
|
18 |
+
OUTIL99 137 - 146 TRAN99 147 - 156 VEHLN99 157 - 166
|
19 |
+
VEHPAY99 167 - 176 VEHLS99 177 - 186 AUTOIN99 187 - 196
|
20 |
+
VEHADD99 197 - 206 VEHREP99 207 - 216 GAS99 217 - 226
|
21 |
+
PARK99 227 - 236 BUS99 237 - 246 CAB99 247 - 256
|
22 |
+
OTRAN99 257 - 266 ED99 267 - 276 CHILD99 277 - 286
|
23 |
+
HEALTH99 287 - 296 HOS99 297 - 306 DOCTOR99 307 - 316
|
24 |
+
PRESCR99 317 - 326 HINS99 327 - 336
|
25 |
+
using CON99.txt, clear
|
26 |
+
;
|
27 |
+
label variable REL99 "1999 CONSUMPTION RELEASE NUMBER" ;
|
28 |
+
label variable CON99_ID "1999 FAMILY INTERVIEW (ID) NUMBER" ;
|
29 |
+
label variable FOOD99 "1999 FOOD EXPENDITURE" ;
|
30 |
+
label variable FDHM99 "1999 FOOD AT HOME EXPENDITURE" ;
|
31 |
+
label variable FDOUT99 "1999 FOOD AWAY FROM HOME EXPENDITURE" ;
|
32 |
+
label variable FDDEL99 "1999 FOOD DELIVERED EXPENDITURE" ;
|
33 |
+
label variable HOUS99 "1999 HOUSING EXPENDITURE" ;
|
34 |
+
label variable MORT99 "1999 MORTGAGE EXPENDITURE" ;
|
35 |
+
label variable RENT99 "1999 RENT EXPENDITURE" ;
|
36 |
+
label variable PRPTAX99 "1999 PROPERTY TAX EXPENDITURE" ;
|
37 |
+
label variable HMEINS99 "1999 HOME INSURANCE EXPENDITURE" ;
|
38 |
+
label variable UTIL99 "1999 UTILITY EXPENDITURE" ;
|
39 |
+
label variable HEAT99 "1999 GAS FOR HOME EXPENDITURE" ;
|
40 |
+
label variable ELECTR99 "1999 ELECTRICITY EXPENDITURE" ;
|
41 |
+
label variable WATER99 "1999 WATER/SEWER EXPENDITURE" ;
|
42 |
+
label variable OUTIL99 "1999 OTHER UTILITY EXPENDITURE" ;
|
43 |
+
label variable TRAN99 "1999 TRANSPORTATION EXPENDITURE" ;
|
44 |
+
label variable VEHLN99 "1999 VEHICLE LOAN PAYMENT EXPENDITURE" ;
|
45 |
+
label variable VEHPAY99 "1999 VEHICLE DOWN PAYMENT EXPENDITURE" ;
|
46 |
+
label variable VEHLS99 "1999 VEHICLE LEASE PAYMENT EXPENDITURE" ;
|
47 |
+
label variable AUTOIN99 "1999 AUTO INSURANCE EXPENDITURE" ;
|
48 |
+
label variable VEHADD99 "1999 ADDITIONAL VEHICLE EXPENDITURE" ;
|
49 |
+
label variable VEHREP99 "1999 VEHICLE REPAIR EXPENDITURE" ;
|
50 |
+
label variable GAS99 "1999 GASOLINE EXPENDITURE" ;
|
51 |
+
label variable PARK99 "1999 PARKING EXPENDITURE" ;
|
52 |
+
label variable BUS99 "1999 BUS/TRAIN EXPENDITURE" ;
|
53 |
+
label variable CAB99 "1999 TAXICAB EXPENDITURE" ;
|
54 |
+
label variable OTRAN99 "1999 OTHER TRANSPORTATION EXPENDITURE" ;
|
55 |
+
label variable ED99 "1999 EDUCATION EXPENDITURE" ;
|
56 |
+
label variable CHILD99 "1999 CHILDCARE EXPENDITURE" ;
|
57 |
+
label variable HEALTH99 "1999 HEALTH CARE EXPENDITURE" ;
|
58 |
+
label variable HOS99 "1999 HOSPITAL/NURSING HOME EXPENDITURE" ;
|
59 |
+
label variable DOCTOR99 "1999 DOCTOR EXPENDITURE" ;
|
60 |
+
label variable PRESCR99 "1999 PRESCRIPTIONS/OTHER EXPENDITURE" ;
|
61 |
+
label variable HINS99 "1999 HEALTH INSURANCE EXPENDITURE" ;
|
42/replication_package/data_replication/psid/raw_data/CON99.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fb209c0b1df5a806a58cd289ac332b53b5cff2b814fb8f2905d1e642c37c9e5f
|
3 |
+
size 2364986
|
42/replication_package/data_replication/psid/raw_data/FAM1999ER.do
ADDED
The diff for this file is too large to render.
See raw diff
|
|
42/replication_package/data_replication/psid/raw_data/FAM1999ER.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c6158c4648dffb0b39a7aaca221a012fbde375e6e25acc7252e79e79529b8899
|
3 |
+
size 48552183
|