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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
global xmpldir "/Users/ginglam/OneDrive - whu.edu.cn/07_Scholars/Tobias Rüttenauer/04_Example1/01_Stata"
cd "${xmpldir}"
use mwp_US_analysis, clear
xtset id year
recode nchild 3/max=3, gen(dchild)
tab dchild, gen(dchild)
recode year 1979/1980=1 1981/1985=2 1986/1990=3 1991/1995=4 1996/2000=5 2001/2005=6 2006/2012=7, gen(yeargr)
tab yeargr, gen(yeargr)
keep if sample1==1
//FEIS estimation and comparison across models
qui xtfeis lnw marry dchild2-dchild4 enrol yeduc tenure ib1.yeargr, slope(c.exp c.exp#c.exp) cluster(id)
est store FEIS
//standard FE model
qui xtreg lnw marry dchild2-dchild4 enrol yeduc tenure c.exp##c.exp ib1.yeargr, fe vce(cluster id)
qui est store FE
//reproduce FE model using xtfeis command
qui xtfeis lnw marry dchild2-dchild4 enrol yeduc tenure c.exp##c.exp ib1.yeargr, cluster(id)
qui est store FE_xtfeis
//FEGS model (FE allowing for Group-specific Slopes)
qui xtreg lnw marry dchild2-dchild4 enrol yeduc tenure c.exp c.exp#c.exp ib1.yeargr ///
1.evermarr#c.exp 1.evermarr#c.exp#c.exp , fe vce(cluster id)
qui est store FEGS
//Standard RE model
qui xtreg lnw marry dchild2-dchild4 enrol yeduc tenure c.exp##c.exp ib1.yeargr , re vce(cluster id)
qui est store RE
//RIRS model
qui mixed lnw marry dchild2-dchild4 enrol yeduc tenure ib1.yeargr exp expq || id: exp expq , vce(cluster id) mle
qui est store RS
//RSGS model
qui mixed lnw marry dchild2-dchild4 enrol yeduc tenure ib1.yeargr exp expq evermarr 1.evermarr#c.exp 1.evermarr#c.expq || id: exp expq , vce(cluster id)
qui est store RSGS
test evermarr
test 1.evermarr#c.exp 1.evermarr#c.expq
esttab RE FE FEIS, nogap se stats(N N_g r2_w, fmt(0 0 3)) ///
keep(marry dchild2 dchild3 dchild4 enrol yeduc tenure exp c.exp#c.exp 1.evermarr#c.exp ///
1.evermarr#c.exp#c.exp expq 1.evermarr#c.expq) ///
mtitle(RE FE FEIS)
------------------------------------------------------------
(1) (2) (3)
RE FE FEIS
------------------------------------------------------------
marry 0.0994*** 0.0800*** 0.00474
(0.00794) (0.00832) (0.00919)
dchild2 0.0147 0.0198* -0.0155
(0.00798) (0.00841) (0.00975)
dchild3 0.0361*** 0.0385*** -0.0276
(0.0110) (0.0117) (0.0151)
dchild4 -0.00263 0.00408 -0.0543*
(0.0165) (0.0177) (0.0239)
enrol -0.192*** -0.199*** -0.123***
(0.00865) (0.00995) (0.00964)
yeduc 0.0735*** 0.0678*** 0.00708
(0.00229) (0.00370) (0.00597)
tenure 0.0126*** 0.0115*** 0.00828***
(0.00109) (0.00111) (0.00134)
exp 0.0472*** 0.0439***
(0.00232) (0.00249)
c.exp#c.exp -0.000623*** -0.000585***
(0.0000831) (0.0000845)
------------------------------------------------------------
N 49801 49801 49801
N_g 4287 4287 4287
r2_w 0.336 0.336 0.019
------------------------------------------------------------
esttab RS FEGS RSGS, nogap se stats(N N_g r2_w, fmt(0 0 3)) ///
keep(marry dchild2 dchild3 dchild4 enrol yeduc tenure exp c.exp#c.exp 1.evermarr#c.exp ///
1.evermarr#c.exp#c.exp expq 1.evermarr#c.expq) ///
mtitle(RS FEGS RSGS)
------------------------------------------------------------
(1) (2) (3)
RS FEGS RSGS
------------------------------------------------------------
main
marry 0.0676*** 0.0418*** 0.0469***
(0.00733) (0.00833) (0.00774)
dchild2 0.00424 0.0141 0.00165
(0.00744) (0.00841) (0.00744)
dchild3 -0.000305 0.0197 -0.00814
(0.0103) (0.0117) (0.0104)
dchild4 -0.0390* -0.0214 -0.0515***
(0.0153) (0.0176) (0.0154)
enrol -0.169*** -0.198*** -0.171***
(0.00806) (0.00995) (0.00807)
yeduc 0.0555*** 0.0663*** 0.0541***
(0.00224) (0.00372) (0.00223)
tenure 0.0117*** 0.0110*** 0.0114***
(0.00105) (0.00111) (0.00105)
exp 0.0539*** 0.0354*** 0.0447***
(0.00224) (0.00307) (0.00290)
expq -0.000860*** -0.000802***
(0.0000813) (0.000102)
c.exp#c.exp -0.000447***
(0.000105)
1.evermarr~p 0.0158*** 0.0144***
(0.00303) (0.00304)
1.evermarr~p -0.000277*
(0.000108)
1.evermarr~q -0.000164
(0.000114)
------------------------------------------------------------
N 49801 49801 49801
N_g 4287
r2_w 0.338
------------------------------------------------------------
|