-
Notifications
You must be signed in to change notification settings - Fork 1
/
tables.do
53 lines (40 loc) · 1.19 KB
/
tables.do
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cd "C:\Users\Marcos Lee\Dropbox\Rice\Courses\Labor\KW94\"
use keane_wolpin_1994_restat.dta, clear
gen school_c = 0
replace school_c = 1 if choice == 3
gen work1 = 0
replace work1 = 1 if choice == 1
gen work2 = 0
replace work2 = 1 if choice == 2
gen home = 0
replace home = 1 if choice == 4
preserve
collapse school_c work1 work2 home, by(period)
keep if period == 1 | period == 10 | period == 20 | period == 30 | period == 40
tabstat school_c, by(period)
tabstat work1, by(period)
tabstat work2, by(period)
tabstat home, by(period)
restore
foreach i in 100000 2000 1000 250{
import delimited output\df1_MC`i'.csv, clear
preserve
collapse school_c work1 work2 home, by(period)
keep if period == 1 | period == 10 | period == 20 | period == 30 | period == 40
tabstat school_c, by(period)
tabstat work1, by(period)
tabstat work2, by(period)
tabstat home, by(period)
restore
}
foreach i in 2000 500{
import delimited output\df1_MC2000_S`i'.csv, clear
preserve
collapse school_c work1 work2 home, by(period)
keep if period == 1 | period == 10 | period == 20 | period == 30 | period == 40
tabstat school_c, by(period)
tabstat work1, by(period)
tabstat work2, by(period)
tabstat home, by(period)
restore
}