-
Notifications
You must be signed in to change notification settings - Fork 0
/
8_equalizing_impact.do
125 lines (101 loc) · 4.15 KB
/
8_equalizing_impact.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
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
118
119
120
121
122
123
124
125
/* -----------------------------------------------------------------------------
------------------------------------------------------------------------------
Gaia Ghirardi - ECEC paper - December 2020
What if analysis
------------------------------------------------------------------------------
----------------------------------------------------------------------------- */
use "$working_dataset_path/xDataset_models.dta", clear
* Mathematics
reg math5_sd i.att3##c.Zses [pw=weight_ipw_atW45]
est store math1
margins, dydx(Zses) post // observed
est store ape_math1
est restore math1
margins, dydx(Zses) at(att3=0) post // scenario 1
est store ape0_math1
est restore math1
margins, dydx(Zses) at(att3=1) post // scenario 2
est store ape1_math1
coefplot (ape_math1, pstyle(p8)) ///
(ape0_math1, pstyle(p9)) ///
(ape1_math1, pstyle(p10)), vertical scale(1.2) ///
xlab(none) yline(0) ytitle ("Standard Deviation", size(small)) ///
title ("Mathematics (4 y)", span size(medium)) ///
ciopts(recast(rcap)) ///
legend(lab(2 "Observed") ///
lab(4 "Scenario 1: No ECEC") ///
lab(6 "Scenario 2: Everyone in ECEC") col(3) color(black) size(medium)) ///
name(math, replace)
* Categorization
reg cat4_sd i.att3##c.Zses [pw=weight_ipw_atW45]
est store cat1
margins, dydx(Zses) post // observed
est store ape_cat1
est restore cat1
margins, dydx(Zses) at(att3=0) post // scenario 1
est store ape0_cat1
est restore cat1
margins, dydx(Zses) at(att3=1) post // scenario 2
est store ape1_cat1
coefplot (ape_cat1, pstyle(p8)) ///
(ape0_cat1, pstyle(p9)) ///
(ape1_cat1, pstyle(p10)), vertical scale(1.2) ///
xlab(none) yline(0) ytitle ("Standard Deviation", size(small)) ///
title ("Categorization (3 y)", span size(medium)) ///
ciopts(recast(rcap)) ///
legend(lab(2 "Observed") ///
lab(4 "Scenario 1: No ECEC") ///
lab(6 "Scenario 2: Everyone in ECEC") col(3) size(medium)) ///
name(cat, replace)
* Vocabulary
reg voc6_sd i.att3##c.Zses [pw=weight_ipw_atW6]
est store voc6_sd
margins, dydx(Zses) post // observed
est store ape_voc6_sd
est restore voc6_sd
margins, dydx(Zses) at(att3=0) post // scenario 1
est store ape0_voc6_sd
est restore voc6_sd
margins, dydx(Zses) at(att3=1) post // scenario 2
est store ape1_voc6_sd
coefplot (ape_voc6_sd, pstyle(p8)) ///
(ape0_voc6_sd, pstyle(p9)) ///
(ape1_voc6_sd, pstyle(p10)), vertical scale(1.2) ///
xlab(none) yline(0) ytitle ("Standard Deviation", size(small)) ///
title ("Vocabulary (5 y)", span size(medium)) ///
ciopts(recast(rcap)) ///
legend(lab(2 "Observed") ///
lab(4 "Scenario 1: No ECEC") ///
lab(6 "Scenario 2: Everyone in ECEC") col(3) size(medium)) ///
name(voc, replace)
* Peers problems behaviour
reg SDQ_ppb6_sd i.att3##c.Zses [pw=weight_ipw_atW6]
est store m4_ppb1
margins, dydx(Zses) post // observed
est store ape_m4_ppb1
est restore m4_ppb1
margins, dydx(Zses) at(att3=0) post // scenario 1
est store ape0_m4_ppb1
est restore m4_ppb1
margins, dydx(Zses) at(att3=1) post // scenario 2
est store ape1_m4_ppb1
coefplot (ape_m4_ppb1, pstyle(p8)) ///
(ape0_m4_ppb1, pstyle(p9)) ///
(ape1_m4_ppb1, pstyle(p10)), vertical scale(1.2) ///
xlab(none) yline(0) ytitle ("Standard Deviation", size(small)) ///
title ("Peers problems (5 y)", span size(medium)) ///
ciopts(recast(rcap)) ///
legend(lab(2 "Observed") ///
lab(4 "Scenario 1: No ECEC") ///
lab(6 "Scenario 2: Everyone in ECEC") col(3) size(medium)) ///
name(ppb, replace)
*summary table
est table ape_math1 ape0_math1 ape1_math1 ///
ape_cat1 ape0_cat1 ape1_cat1 ///
ape_voc6_sd ape0_voc6_sd ape1_voc6_sd ///
ape_m4_ppb1 ape0_m4_ppb1 ape1_m4_ppb1 ///
, b(%9.3f) star
*graph
grc1leg cat math voc ppb, ycom col(4) ///
saving($output/H3_equalizing, replace)
graph export "$output/H3_equalizing.pdf", replace