-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogit10_models.do
More file actions
84 lines (69 loc) · 3.77 KB
/
Copy pathlogit10_models.do
File metadata and controls
84 lines (69 loc) · 3.77 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// Declining Fertility in Taiwan: The Deterring Impact of Housework
// Jac Thomas - Department of Economics, National Tsing Hua University,
// Taiwan (R.O.C.); Department of Geography and Planning, University of
// Liverpool, UK
// Francisco Rowe - Department of Geography and Planning,
// University of Liverpool, UK
// Eric Lin - Department of Economics, National Tsing Hua University,
// Taiwan (R.O.C.)
// Cross-sectional logit models - data analysis script
// 05/05/2020
cd "C:/Users/Jac/OneDrive/paper_1/submission_3/analysis_and_results"
use b1115b_dp.dta
// Generate all interactions between w_wrkhrs nanb whw parentsb, and also w_wrkbXwhw
generate w_wrkhrsXnanb = w_wrkhrs*nanb
generate whwXnanb = whw*nanb
generate parentsbXnanb = parentsb*nanb
generate parentsbXw_wrkhrs = parentsb*w_wrkhrs
generate parentsbXwhw = parentsb*whw
generate w_wrkhrsXwhw = w_wrkhrs*whw
generate w_wrkbXwhw = w_wrkb*whw
// Generate interactions between intentions and variables of interest
generate morebirbXratio = morebirb*ratio
generate morebirbXwhw = morebirb*whw
// Generate genideo interactions
generate genideoXratio = genideo*ratio
generate genideoXwhw = genideo*whw
// Generate log income and income / 1000
generate loginc = log(inc)
generate inc_thou = inc / 1000
// Generate inverse age of youngest child
generate cyoung10YOB_01 = cyoung10YOB
replace cyoung10YOB_01 = 0.1 if cyoung10YOB_01 == 0
generate cyoung10YOB_inv = 1 / cyoung10YOB_01
// Generate binary for youngest child being zero
generate cyoung10YOB0b = 0
replace cyoung10YOB0b = 1 if cyoung10YOB > 0
// Generate binary for youngest child being less than 5
generate cyng_agel5b = 0
replace cyng_agel5b = 1 if cyng_age < 5
// Candidate variables; check for correlations
correlate b11_15b cyoung10YOB weduH heduH ratio whw hhw wy_age w_wrkb ///
parentsb inc_thou loginc p2plusb nanb morebirb parentsbXnanb w_wrkbXwhw ///
morebirbXratio morebirbXwhw gender
// 0.9161 loginc inc_thou
// 0.8113 morebirb morebirbXratio
// Omit inc_thou and morebirbXratio
quietly logit b11_15b cyng_agel5b weduH heduH ratio whw hhw wy_age w_wrkb parentsb loginc p2plusb nanb morebirb parentsbXnanb w_wrkbXwhw morebirbXwhw gender, vce(robust)
estimates store log1 // All
quietly logit b11_15b cyng_agel5b weduH heduH ratio whw hhw wy_age w_wrkb parentsb loginc p2plusb nanb morebirb parentsbXnanb w_wrkbXwhw morebirbXwhw if gender == 1, vce(robust)
estimates store log2 // Females
quietly logit b11_15b cyng_agel5b weduH heduH ratio whw hhw wy_age w_wrkb parentsb loginc p2plusb nanb morebirb parentsbXnanb w_wrkbXwhw morebirbXwhw if gender == 2, vce(robust)
estimates store log3 // Males
esttab log1 log2 log3, se star(+ 0.10 * 0.05 ** 0.01 *** 0.001) scalars(N)
// Births file output:
quietly esttab log1 log2 log3 using logit10f10, ///
se star(+ 0.10 * 0.05 ** 0.01 *** 0.001) scalars(N) csv title(Comparison of ///
models predicting births) mtitles("All" "Females" "Males") ///
coeflabels(cyng_agel5b "Youngest child younger than five" ///
weduH "Wife's tertiary education" heduH "Husband's tertiary education" ///
ratio "Proportion" whw "Wife's hours of housework" hhw "Husband's hours of housework" ///
wy_age "Wife's age" w_wrkb "Wife works" parentsb "Parents co-reside" ///
loginc "Log income" gender "Gender" p2plusb "Parity 2 or more" nanb "Pays for nanny" ///
ddum "Year of the Dragon" morebirb "Desires more children" parentsbXnanb "Parents co-reside * pays for nanny" ///
w_wrkbXwhw "Wife works * wife's hours of housework" ///
morebirbXwhw "Desires more children * wife's hours of housework") ///
replace
// Summary statistics output:
quietly estpost summarize b11_15b, detail
esttab . using sumstats_b11_15bf10, cells("mean sd min p50 max") title(Summary statistics) nonumbers noobs replace