Commit
·
8deff36
1
Parent(s):
4897581
add 26
Browse files- 26/paper.pdf +3 -0
- 26/replication_package/data/raw/expAbatch1.csv +3 -0
- 26/replication_package/data/raw/expAbatch2.csv +3 -0
- 26/replication_package/data/raw/expAbatch3.csv +3 -0
- 26/replication_package/data/raw/expAbatch4.csv +3 -0
- 26/replication_package/data/raw/expAbatch5.csv +3 -0
- 26/replication_package/data/raw/expAbatch6.csv +3 -0
- 26/replication_package/data/raw/expAbatch7.csv +3 -0
- 26/replication_package/data/raw/expAbatch8.csv +3 -0
- 26/replication_package/data/raw/expBbatch1.csv +3 -0
- 26/replication_package/data/raw/expBbatch2.csv +3 -0
- 26/replication_package/doFiles/analysis.do +1962 -0
- 26/replication_package/doFiles/dataManagementExpA.do +640 -0
- 26/replication_package/doFiles/dataManagementExpB.do +562 -0
- 26/replication_package/doFiles/master.do +12 -0
- 26/replication_package/doFiles/setup.do +2 -0
- 26/replication_package/readMe.pdf +3 -0
- 26/should_reproduce.txt +3 -0
26/paper.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:69073c0a673a92217a2ee3d60a72fd373d16c04b6c658a609dfe8e6f5ea254de
|
3 |
+
size 858887
|
26/replication_package/data/raw/expAbatch1.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d5a03702a6c4998c0e48e128f013f2d20c63821b4a12b3afc2e9d8bdeee769b7
|
3 |
+
size 204834
|
26/replication_package/data/raw/expAbatch2.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:caa79e3c90fff52b76aa25f42931573550f9ceba0630bc65419555f2d536a384
|
3 |
+
size 580857
|
26/replication_package/data/raw/expAbatch3.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:522ee8c2e09f595b578a5693de5d1f35942c7d67bea4857b46e1500db70d7bd0
|
3 |
+
size 920098
|
26/replication_package/data/raw/expAbatch4.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cb343dc8e30e862af86cfbde93506ed2b95f0bff8bb32c278d0174f5d4d40548
|
3 |
+
size 268625
|
26/replication_package/data/raw/expAbatch5.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:512c1a21c6a0be4a9ad2789a0e49cea8d481297c99e047d42123001aeb54d412
|
3 |
+
size 1447376
|
26/replication_package/data/raw/expAbatch6.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:491c7211c142f4eabb28fcddb0821278606b907417b3e9df1e88cdb5eec2db67
|
3 |
+
size 1961465
|
26/replication_package/data/raw/expAbatch7.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:76f6156c30c5cf225bb541425a9c2619f572e108924d8b604dbf7a9fe079d9f0
|
3 |
+
size 520451
|
26/replication_package/data/raw/expAbatch8.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0e2898eb5d584c636aab6ab58af94c2ac6433ab7aff467320a2367a74e1f84a7
|
3 |
+
size 369940
|
26/replication_package/data/raw/expBbatch1.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5c887000160ab6daad717ff62f8dc39485aa5e3c2c9a3aa4187107996b4815c7
|
3 |
+
size 5878669
|
26/replication_package/data/raw/expBbatch2.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7f1f646f9e21ca91733a9312c464ffa691b2a9d48fcc66cb7c3b21943ef126e1
|
3 |
+
size 15448283
|
26/replication_package/doFiles/analysis.do
ADDED
@@ -0,0 +1,1962 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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compound == 1
|
9 |
+
|
10 |
+
gen discount_unframed = v_unframed/amount * 100
|
11 |
+
gen discount_framed = v_framed/amount_precise * 100
|
12 |
+
gen discount_framed_72 = v_framed/amount * 100
|
13 |
+
|
14 |
+
sort id delay
|
15 |
+
by id delay: egen min_discount_unframed = min(discount_unframed)
|
16 |
+
by id delay: egen max_discount_unframed = max(discount_unframed)
|
17 |
+
|
18 |
+
gen diff = discount_framed - discount_unframed
|
19 |
+
gen diff72 = discount_framed - discount_unframed
|
20 |
+
gen absDiff = abs(discount_framed - discount_unframed)
|
21 |
+
|
22 |
+
|
23 |
+
// generate treatment dummies
|
24 |
+
gen contNew = fined == 0 // Control
|
25 |
+
gen fullNew = fined == 1 // Full
|
26 |
+
|
27 |
+
gen sample = "new"
|
28 |
+
|
29 |
+
append using "data/dataExpA.dta"
|
30 |
+
gen sqDiff = abs(discount_framed^2 - discount_unframed^2) / 100
|
31 |
+
|
32 |
+
|
33 |
+
replace sample = "old" if sample == ""
|
34 |
+
replace absDiff = abs(discount_framed - discount_unframed)
|
35 |
+
|
36 |
+
replace Full = 0 if sample == "new"
|
37 |
+
replace Cont = 0 if sample == "new"
|
38 |
+
replace Rule72 = 0 if sample == "new"
|
39 |
+
replace Rhetoric = 0 if sample == "new"
|
40 |
+
replace fullNew = 0 if sample == "old"
|
41 |
+
replace contNew = 0 if sample == "old"
|
42 |
+
|
43 |
+
gen condition = .
|
44 |
+
replace condition = 0 if Control == 1
|
45 |
+
replace condition = 1 if contNew == 1
|
46 |
+
replace condition = 2 if Full == 1
|
47 |
+
replace condition = 3 if fullNew == 1
|
48 |
+
replace condition = 4 if Rule72 == 1
|
49 |
+
replace condition = 5 if Rhetoric == 1
|
50 |
+
la de condition 0 "C old" 1 "C new" 2 "Tr old" 3 "Tr new" 4 "Subst. only" 5 "Rhet. only"
|
51 |
+
la val condition condition
|
52 |
+
|
53 |
+
// attrition: 1 subject in Treatment, 1 subject in Control
|
54 |
+
|
55 |
+
su score_compounding if Full == 1
|
56 |
+
su score_compounding if Control == 1
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
reg score_compounding contNew fullNew if sample == "new" & multi == 0, nocons cl(id)
|
61 |
+
reg discount_unframed contNew fullNew if sample == "new" & multi == 0, nocons cl(id)
|
62 |
+
reg discount_framed contNew fullNew if sample == "new" & multi == 0, nocons cl(id)
|
63 |
+
reg absDiff contNew fullNew if sample == "new" & multi == 0, nocons cl(id)
|
64 |
+
reg sqDiff contNew fullNew if sample == "new" & multi == 0, nocons cl(id)
|
65 |
+
reg diff contNew fullNew if sample == "new" & multi == 0, nocons cl(id)
|
66 |
+
|
67 |
+
reg absDiff fullNew if sample == "new" & multi == 0, cl(id)
|
68 |
+
reg sqDiff fullNew if sample == "new" & multi == 0, cl(id)
|
69 |
+
reg diff fullNew if sample == "new" & multi == 0, cl(id)
|
70 |
+
|
71 |
+
|
72 |
+
reg discount_framed fullNew if sample == "new" & multi == 0, cl(id)
|
73 |
+
reg discount_framed Full if sample == "old" & multi == 0 & (Full == 1 | Control == 1), cl(id)
|
74 |
+
|
75 |
+
|
76 |
+
reg absDiff Full if multi == 0 & (Full == 1 | fullNew == 1), cl(id)
|
77 |
+
|
78 |
+
reg absDiff if multi == 0 & Full == 1 , cl(id)
|
79 |
+
reg absDiff if multi == 0 & fullNew == 1 , cl(id)
|
80 |
+
|
81 |
+
|
82 |
+
|
83 |
+
// get individual-specific means
|
84 |
+
|
85 |
+
bysort id: egen vSimple = mean(discount_unfr)
|
86 |
+
bysort id: egen vComplex = mean(discount_framed)
|
87 |
+
|
88 |
+
gen dRaw = vComplex - vSimple
|
89 |
+
gen dAbs = abs(dRaw)
|
90 |
+
gen dSq = dAbs^2
|
91 |
+
|
92 |
+
|
93 |
+
replace id = 10000 + id if sample == "old"
|
94 |
+
replace id = 20000 + id if sample == "new"
|
95 |
+
|
96 |
+
cap drop tag
|
97 |
+
egen tag = tag(id)
|
98 |
+
|
99 |
+
cap drop r72report
|
100 |
+
gen r72report = rule72 == 1
|
101 |
+
|
102 |
+
cap drop r72invReport
|
103 |
+
gen r72invReport = rule72_inv == 1
|
104 |
+
|
105 |
+
|
106 |
+
// keep single-switchers only
|
107 |
+
keep if multi == 0
|
108 |
+
|
109 |
+
|
110 |
+
bysort id: egen meanVsimple36_i = mean(discount_unframed) if delay == 36
|
111 |
+
bysort id: egen meanVsimple72_i = mean(discount_unframed) if delay == 72
|
112 |
+
|
113 |
+
bysort id: egen meanVsimple36 = mean(meanVsimple36_i)
|
114 |
+
bysort id: egen meanVsimple72 = mean(meanVsimple72_i)
|
115 |
+
|
116 |
+
replace meanVsimple36 = meanVsimple36 / 100
|
117 |
+
replace meanVsimple72 = meanVsimple72 / 100
|
118 |
+
|
119 |
+
gen delta = meanVsimple72 / meanVsimple36
|
120 |
+
gen beta = meanVsimple36^2 / meanVsimple72
|
121 |
+
|
122 |
+
gen meanVsimple = 100 * (meanVsimple36 + meanVsimple72)/2
|
123 |
+
|
124 |
+
|
125 |
+
|
126 |
+
bysort id: egen meanVsimple36first_i = mean(discount_unframed) if delay == 36 & treatment <= 5
|
127 |
+
bysort id: egen meanVsimple72first_i = mean(discount_unframed) if delay == 72 & treatment <= 5
|
128 |
+
|
129 |
+
bysort id: egen meanVsimple36first = mean(meanVsimple36first_i)
|
130 |
+
bysort id: egen meanVsimple72first = mean(meanVsimple72first_i)
|
131 |
+
|
132 |
+
replace meanVsimple36first = meanVsimple36first / 100
|
133 |
+
replace meanVsimple72first = meanVsimple72first / 100
|
134 |
+
|
135 |
+
gen deltaFirst = meanVsimple72first / meanVsimple36first
|
136 |
+
gen betaFirst = meanVsimple36first^2 / meanVsimple72first
|
137 |
+
|
138 |
+
|
139 |
+
bysort id: egen meanVsimple36second_i = mean(discount_unframed) if delay == 36 & treatment > 5
|
140 |
+
bysort id: egen meanVsimple72second_i = mean(discount_unframed) if delay == 72 & treatment > 5
|
141 |
+
|
142 |
+
bysort id: egen meanVsimple36second = mean(meanVsimple36second_i)
|
143 |
+
bysort id: egen meanVsimple72second = mean(meanVsimple72second_i)
|
144 |
+
|
145 |
+
|
146 |
+
|
147 |
+
replace meanVsimple36second = meanVsimple36second / 100
|
148 |
+
replace meanVsimple72second = meanVsimple72second / 100
|
149 |
+
|
150 |
+
gen deltaSecond = meanVsimple72second / meanVsimple36second
|
151 |
+
gen betaSecond = meanVsimple36second^2 / meanVsimple72second
|
152 |
+
|
153 |
+
|
154 |
+
|
155 |
+
|
156 |
+
|
157 |
+
|
158 |
+
bysort id: egen meanVcomplex36_i = mean(discount_framed) if delay == 36
|
159 |
+
bysort id: egen meanVcomplex72_i = mean(discount_framed) if delay == 72
|
160 |
+
|
161 |
+
bysort id: egen meanVcomplex36 = mean(meanVcomplex36_i)
|
162 |
+
bysort id: egen meanVcomplex72 = mean(meanVcomplex72_i)
|
163 |
+
|
164 |
+
replace meanVcomplex36 = meanVcomplex36 / 100
|
165 |
+
replace meanVcomplex72 = meanVcomplex72 / 100
|
166 |
+
|
167 |
+
gen meanVcomplex = 100 * (meanVcomplex36 + meanVcomplex72)/2
|
168 |
+
|
169 |
+
replace income = . if income < 0
|
170 |
+
replace income = 1000*income if sample == "old"
|
171 |
+
|
172 |
+
save "data/managedData.dta", replace
|
173 |
+
|
174 |
+
}
|
175 |
+
|
176 |
+
|
177 |
+
// Mentioned in main text
|
178 |
+
if 1 {
|
179 |
+
forvalues i = 1 / 5 {
|
180 |
+
noisily: tab finlit`i'
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
// Graphs
|
185 |
+
if 1 {
|
186 |
+
|
187 |
+
// CDF
|
188 |
+
if 1 {
|
189 |
+
local scale = 1.3
|
190 |
+
local aspect = 0.8
|
191 |
+
|
192 |
+
preserve
|
193 |
+
keep if sample == "old"
|
194 |
+
replace diff = 100 if diff>100
|
195 |
+
replace diff = -100 if diff < -100
|
196 |
+
distplot diff if fined <= 1, over(fined) ///
|
197 |
+
scheme(s2mono) ///
|
198 |
+
legend(order(1 "Control A" 2 "Treatment A") col(1) ring(0) pos(11)) ///
|
199 |
+
xtitle("Valuation difference (complex minus simple)") ///
|
200 |
+
ytitle("Cumulative probability") xlabel(-100(50)100) ///
|
201 |
+
bgcolor(white) graphregion(color(white)) ///
|
202 |
+
scale(*`scale') aspect(`aspect')
|
203 |
+
graph export "graphs/cdfExpA.pdf", replace
|
204 |
+
restore
|
205 |
+
|
206 |
+
|
207 |
+
|
208 |
+
preserve
|
209 |
+
keep if sample == "new"
|
210 |
+
replace diff = -100 if diff < -100
|
211 |
+
replace diff = 100 if diff > 100
|
212 |
+
distplot diff , over(condition) ///
|
213 |
+
scheme(s2mono) ///
|
214 |
+
legend(order(1 "Control B" 2 "Treatment B") col(1) ring(0) pos(11)) ///
|
215 |
+
xtitle("Valuation difference (complex minus simple)") ///
|
216 |
+
ytitle("Cumulative probability") xlabel(-100(50)100) ///
|
217 |
+
bgcolor(white) graphregion(color(white)) ///
|
218 |
+
scale(*`scale') aspect(`aspect')
|
219 |
+
graph export "graphs/cdfExpB.pdf", replace
|
220 |
+
restore
|
221 |
+
|
222 |
+
|
223 |
+
|
224 |
+
}
|
225 |
+
|
226 |
+
// CDFs with simple frame superimposed
|
227 |
+
if 1 {
|
228 |
+
|
229 |
+
bysort id delay: egen vSimple12_i = mean(discount_unframed) if amount == 12
|
230 |
+
bysort id delay: egen vSimple14_i = mean(discount_unframed) if amount == 14
|
231 |
+
bysort id delay: egen vSimple16_i = mean(discount_unframed) if amount == 16
|
232 |
+
bysort id delay: egen vSimple18_i = mean(discount_unframed) if amount == 18
|
233 |
+
bysort id delay: egen vSimple20_i = mean(discount_unframed) if amount == 20
|
234 |
+
|
235 |
+
bysort id delay: egen vSimple12 = mean(vSimple12_i)
|
236 |
+
bysort id delay: egen vSimple14 = mean(vSimple14_i)
|
237 |
+
bysort id delay: egen vSimple16 = mean(vSimple16_i)
|
238 |
+
bysort id delay: egen vSimple18 = mean(vSimple18_i)
|
239 |
+
bysort id delay: egen vSimple20 = mean(vSimple20_i)
|
240 |
+
|
241 |
+
gen simpleDiff = .
|
242 |
+
replace simpleDiff = discount_unframed - vSimple14 if amount == 12
|
243 |
+
replace simpleDiff = discount_unframed - vSimple16 if amount == 18
|
244 |
+
replace simpleDiff = discount_unframed - vSimple12 if amount == 14
|
245 |
+
replace simpleDiff = discount_unframed - vSimple18 if amount == 16
|
246 |
+
|
247 |
+
local scale = 1.1
|
248 |
+
local aspect = 0.8
|
249 |
+
preserve
|
250 |
+
keep if sample == "new"
|
251 |
+
keep if fined == 0
|
252 |
+
stack diff simpleDiff, into(depVar) clear
|
253 |
+
keep if depVar ~= .
|
254 |
+
save "data/temp.dta", replace
|
255 |
+
restore
|
256 |
+
|
257 |
+
preserve
|
258 |
+
keep if sample == "new"
|
259 |
+
keep if fined == 1
|
260 |
+
stack diff simpleDiff, into(depVar) clear
|
261 |
+
replace _stack = 5 if _stack == 1
|
262 |
+
append using "data/temp.dta"
|
263 |
+
replace _stack = 3 if _stack == 2
|
264 |
+
replace _stack = 2 if _stack == 5
|
265 |
+
keep if depVar ~= .
|
266 |
+
replace depVar = 100 if depVar>100
|
267 |
+
replace depVar = -100 if depVar < -100
|
268 |
+
distplot depVar, over(_stack) ///
|
269 |
+
scheme(s2mono) ///
|
270 |
+
legend(order(1 "Control B" 2 "Treatment B" 3 "Simple frame B") col(1) ring(0) pos(11)) ///
|
271 |
+
xtitle(" ") ///
|
272 |
+
ytitle(" ") xlabel(-100(50)100) ///
|
273 |
+
bgcolor(white) graphregion(color(white)) ///
|
274 |
+
scale(*`scale') aspect(`aspect')
|
275 |
+
graph export "graphs/cdfBWithSimple.pdf", replace
|
276 |
+
restore
|
277 |
+
|
278 |
+
|
279 |
+
|
280 |
+
local scale = 1.1
|
281 |
+
local aspect = 0.8
|
282 |
+
preserve
|
283 |
+
keep if sample == "old"
|
284 |
+
keep if fined == 0
|
285 |
+
stack diff simpleDiff, into(depVar) clear
|
286 |
+
keep if depVar ~= .
|
287 |
+
save "data/temp.dta", replace
|
288 |
+
restore
|
289 |
+
|
290 |
+
preserve
|
291 |
+
keep if sample == "old"
|
292 |
+
keep if fined == 1
|
293 |
+
stack diff simpleDiff, into(depVar) clear
|
294 |
+
replace _stack = 5 if _stack == 1
|
295 |
+
append using "data/temp.dta"
|
296 |
+
replace _stack = 3 if _stack == 2
|
297 |
+
replace _stack = 2 if _stack == 5
|
298 |
+
keep if depVar ~= .
|
299 |
+
replace depVar = 100 if depVar>100
|
300 |
+
replace depVar = -100 if depVar < -100
|
301 |
+
distplot depVar, over(_stack) ///
|
302 |
+
scheme(s2mono) ///
|
303 |
+
legend(order(1 "Control A" 2 "Treatment A" 3 "Simple frame A") col(1) ring(0) pos(11)) ///
|
304 |
+
xtitle(" ") ///
|
305 |
+
ytitle(" ") xlabel(-100(50)100) ///
|
306 |
+
bgcolor(white) graphregion(color(white)) ///
|
307 |
+
scale(*`scale') aspect(`aspect')
|
308 |
+
graph export "graphs/cdfAWithSimple.pdf", replace
|
309 |
+
restore
|
310 |
+
}
|
311 |
+
|
312 |
+
// Bar graphs
|
313 |
+
if 1 {
|
314 |
+
|
315 |
+
preserve
|
316 |
+
|
317 |
+
local var = "score_compounding"
|
318 |
+
local scale = 1.3
|
319 |
+
local aspect = 0.8
|
320 |
+
local lwidth = 0.2
|
321 |
+
|
322 |
+
keep if Full == 1 | Control == 1 | fullNew == 1 | contNew == 1
|
323 |
+
|
324 |
+
gen tr = .
|
325 |
+
replace tr = 1 if Control == 1
|
326 |
+
replace tr = 2 if Full == 1
|
327 |
+
replace tr = 3 if contNew == 1
|
328 |
+
replace tr = 4 if fullNew == 1
|
329 |
+
|
330 |
+
|
331 |
+
xi, noomit: reg `var' i.tr, nocons cl(id)
|
332 |
+
local s1 = _se[_Itr_1]
|
333 |
+
local s2 = _se[_Itr_2]
|
334 |
+
local s3 = _se[_Itr_3]
|
335 |
+
local s4 = _se[_Itr_4]
|
336 |
+
|
337 |
+
collapse `var', by(tr)
|
338 |
+
|
339 |
+
gen top = .
|
340 |
+
replace top = `var' + `s1'*1.96 if tr == 1
|
341 |
+
replace top = `var' + `s2'*1.96 if tr == 2
|
342 |
+
replace top = `var' + `s3'*1.96 if tr == 3
|
343 |
+
replace top = `var' + `s4'*1.96 if tr == 4
|
344 |
+
|
345 |
+
gen bottom = .
|
346 |
+
replace bottom = `var' - `s1'*1.96 if tr == 1
|
347 |
+
replace bottom = `var' - `s2'*1.96 if tr == 2
|
348 |
+
replace bottom = `var' - `s3'*1.96 if tr == 3
|
349 |
+
replace bottom = `var' - `s4'*1.96 if tr == 4
|
350 |
+
|
351 |
+
replace tr = tr + 0.5 if tr > 2
|
352 |
+
|
353 |
+
tw (bar `var' tr ///
|
354 |
+
, barwidth(0.8) color(gs13) lwidth(`lwidth') lcolor(black)) ///
|
355 |
+
(bar `var' tr if tr == 2 | tr > 4 ///
|
356 |
+
, barwidth(0.8) color(gs5) lwidth(`lwidth') lcolor(black)) ///
|
357 |
+
(rcap bottom top tr, lcolor(black) lwidth(`lwidth')) ///
|
358 |
+
, ///
|
359 |
+
legend(order(1 "Control" 2 "Treatment") col(2) ring(0) pos(12)) ///
|
360 |
+
xtitle(" ") ytitle("Correct answers (out of 5)" " ") ///
|
361 |
+
ylabel(0(1)5) ///
|
362 |
+
xlabel(1.5 "Experiment A" 4 "Experiment B") ///
|
363 |
+
bgcolor(white) graphregion(color(white)) ///
|
364 |
+
scale(*`scale') aspect(`aspect') ///
|
365 |
+
xscale(range(0.5 5))
|
366 |
+
graph export "graphs/figure1A.pdf", replace
|
367 |
+
|
368 |
+
restore
|
369 |
+
|
370 |
+
|
371 |
+
|
372 |
+
|
373 |
+
|
374 |
+
preserve
|
375 |
+
local var = "discount_framed"
|
376 |
+
local scale = 1.3
|
377 |
+
local aspect = 0.8
|
378 |
+
local lwidth = 0.2
|
379 |
+
|
380 |
+
keep if Full == 1 | Control == 1 | fullNew == 1 | contNew == 1
|
381 |
+
|
382 |
+
gen tr = .
|
383 |
+
replace tr = 1 if Control == 1
|
384 |
+
replace tr = 2 if Full == 1
|
385 |
+
replace tr = 3 if contNew == 1
|
386 |
+
replace tr = 4 if fullNew == 1
|
387 |
+
|
388 |
+
|
389 |
+
xi, noomit: reg `var' i.tr, nocons cl(id)
|
390 |
+
local s1 = _se[_Itr_1]
|
391 |
+
local s2 = _se[_Itr_2]
|
392 |
+
local s3 = _se[_Itr_3]
|
393 |
+
local s4 = _se[_Itr_4]
|
394 |
+
|
395 |
+
collapse `var', by(tr)
|
396 |
+
|
397 |
+
gen top = .
|
398 |
+
replace top = `var' + `s1'*1.96 if tr == 1
|
399 |
+
replace top = `var' + `s2'*1.96 if tr == 2
|
400 |
+
replace top = `var' + `s3'*1.96 if tr == 3
|
401 |
+
replace top = `var' + `s4'*1.96 if tr == 4
|
402 |
+
|
403 |
+
gen bottom = .
|
404 |
+
replace bottom = `var' - `s1'*1.96 if tr == 1
|
405 |
+
replace bottom = `var' - `s2'*1.96 if tr == 2
|
406 |
+
replace bottom = `var' - `s3'*1.96 if tr == 3
|
407 |
+
replace bottom = `var' - `s4'*1.96 if tr == 4
|
408 |
+
|
409 |
+
replace tr = tr + 0.5 if tr > 2
|
410 |
+
|
411 |
+
tw (bar `var' tr ///
|
412 |
+
, barwidth(0.8) color(gs13) lwidth(`lwidth') lcolor(black)) ///
|
413 |
+
(bar `var' tr if tr == 2 | tr > 4 ///
|
414 |
+
, barwidth(0.8) color(gs5) lwidth(`lwidth') lcolor(black)) ///
|
415 |
+
(rcap bottom top tr, lcolor(black) lwidth(`lwidth')) ///
|
416 |
+
, ///
|
417 |
+
legend(order(1 "Control" 2 "Treatment") col(2) ring(0) pos(12)) ///
|
418 |
+
xtitle(" ") ytitle("WTP in cents for $1 in the future," "framed as interest-bearing investment" " ") ///
|
419 |
+
ylabel(0(20)100) ///
|
420 |
+
xscale(range(0.5 5)) ///
|
421 |
+
xlabel(1.5 "Experiment A" 4 "Experiment B") ///
|
422 |
+
bgcolor(white) graphregion(color(white)) ///
|
423 |
+
scale(*`scale') aspect(`aspect')
|
424 |
+
graph export "graphs/figure1B.pdf", replace
|
425 |
+
|
426 |
+
|
427 |
+
restore
|
428 |
+
|
429 |
+
|
430 |
+
|
431 |
+
|
432 |
+
|
433 |
+
|
434 |
+
|
435 |
+
|
436 |
+
|
437 |
+
preserve
|
438 |
+
|
439 |
+
local var = "absDiff"
|
440 |
+
replace `var' = -`var'
|
441 |
+
local scale = 1.3
|
442 |
+
local aspect = 0.8
|
443 |
+
local lwidth = 0.2
|
444 |
+
local lwidth2 = 0.6
|
445 |
+
|
446 |
+
keep if Full == 1 | Control == 1 | fullNew == 1 | contNew == 1
|
447 |
+
|
448 |
+
gen tr = .
|
449 |
+
replace tr = 1 if Control == 1
|
450 |
+
replace tr = 2 if Full == 1
|
451 |
+
replace tr = 3 if contNew == 1
|
452 |
+
replace tr = 4 if fullNew == 1
|
453 |
+
|
454 |
+
|
455 |
+
xi, noomit: reg `var' i.tr, nocons cl(id)
|
456 |
+
local s1 = _se[_Itr_1]
|
457 |
+
local s2 = _se[_Itr_2]
|
458 |
+
local s3 = _se[_Itr_3]
|
459 |
+
local s4 = _se[_Itr_4]
|
460 |
+
|
461 |
+
collapse `var', by(tr)
|
462 |
+
|
463 |
+
gen top = .
|
464 |
+
replace top = `var' + `s1'*1.96 if tr == 1
|
465 |
+
replace top = `var' + `s2'*1.96 if tr == 2
|
466 |
+
replace top = `var' + `s3'*1.96 if tr == 3
|
467 |
+
replace top = `var' + `s4'*1.96 if tr == 4
|
468 |
+
|
469 |
+
gen bottom = .
|
470 |
+
replace bottom = `var' - `s1'*1.96 if tr == 1
|
471 |
+
replace bottom = `var' - `s2'*1.96 if tr == 2
|
472 |
+
replace bottom = `var' - `s3'*1.96 if tr == 3
|
473 |
+
replace bottom = `var' - `s4'*1.96 if tr == 4
|
474 |
+
|
475 |
+
keep if tr <= 2
|
476 |
+
|
477 |
+
local top -15
|
478 |
+
tw (line `var' tr ///
|
479 |
+
, lwidth(`lwidth2') lcolor(black)) ///
|
480 |
+
(rcap bottom top tr, lcolor(black) lwidth(`lwidth')) ///
|
481 |
+
, ///
|
482 |
+
legend(off) ///
|
483 |
+
xtitle(" ") ytitle("Negative absolute value" "of valuation difference" " ") ///
|
484 |
+
ylabel(-30(5)`top') ///
|
485 |
+
xscale(range(0.5 2.5)) ///
|
486 |
+
xlabel(1 "Control" 2 "Treatment") ///
|
487 |
+
bgcolor(white) graphregion(color(white)) ///
|
488 |
+
scale(*`scale') aspect(`aspect')
|
489 |
+
|
490 |
+
graph export "graphs/finCompLinesA.pdf", replace
|
491 |
+
restore
|
492 |
+
|
493 |
+
|
494 |
+
|
495 |
+
|
496 |
+
preserve
|
497 |
+
|
498 |
+
local var = "absDiff"
|
499 |
+
replace `var' = -`var'
|
500 |
+
local scale = 1.3
|
501 |
+
local aspect = 0.8
|
502 |
+
local lwidth = 0.2
|
503 |
+
local lwidth2 = 0.6
|
504 |
+
|
505 |
+
keep if Full == 1 | Control == 1 | fullNew == 1 | contNew == 1
|
506 |
+
|
507 |
+
gen tr = .
|
508 |
+
replace tr = 1 if Control == 1
|
509 |
+
replace tr = 2 if Full == 1
|
510 |
+
replace tr = 3 if contNew == 1
|
511 |
+
replace tr = 4 if fullNew == 1
|
512 |
+
|
513 |
+
|
514 |
+
xi, noomit: reg `var' i.tr, nocons cl(id)
|
515 |
+
local s1 = _se[_Itr_1]
|
516 |
+
local s2 = _se[_Itr_2]
|
517 |
+
local s3 = _se[_Itr_3]
|
518 |
+
local s4 = _se[_Itr_4]
|
519 |
+
|
520 |
+
collapse `var', by(tr)
|
521 |
+
|
522 |
+
gen top = .
|
523 |
+
replace top = `var' + `s1'*1.96 if tr == 1
|
524 |
+
replace top = `var' + `s2'*1.96 if tr == 2
|
525 |
+
replace top = `var' + `s3'*1.96 if tr == 3
|
526 |
+
replace top = `var' + `s4'*1.96 if tr == 4
|
527 |
+
|
528 |
+
gen bottom = .
|
529 |
+
replace bottom = `var' - `s1'*1.96 if tr == 1
|
530 |
+
replace bottom = `var' - `s2'*1.96 if tr == 2
|
531 |
+
replace bottom = `var' - `s3'*1.96 if tr == 3
|
532 |
+
replace bottom = `var' - `s4'*1.96 if tr == 4
|
533 |
+
|
534 |
+
keep if tr > 2
|
535 |
+
replace tr = tr - 2
|
536 |
+
|
537 |
+
local top -15
|
538 |
+
tw (line `var' tr ///
|
539 |
+
, lwidth(`lwidth2') lcolor(black)) ///
|
540 |
+
(rcap bottom top tr, lcolor(black) lwidth(`lwidth')) ///
|
541 |
+
, ///
|
542 |
+
legend(off) ///
|
543 |
+
xtitle(" ") ytitle("Negative absolute value" "of valuation difference" " ") ///
|
544 |
+
ylabel(-30(5)`top') ///
|
545 |
+
xscale(range(0.5 2.5)) ///
|
546 |
+
xlabel(1 "Control" 2 "Treatment") ///
|
547 |
+
bgcolor(white) graphregion(color(white)) ///
|
548 |
+
scale(*`scale') aspect(`aspect')
|
549 |
+
|
550 |
+
graph export "graphs/finCompLinesB.pdf", replace
|
551 |
+
restore
|
552 |
+
|
553 |
+
}
|
554 |
+
|
555 |
+
}
|
556 |
+
|
557 |
+
// Tables
|
558 |
+
if 1 {
|
559 |
+
// Table test scores
|
560 |
+
if 1 {
|
561 |
+
preserve
|
562 |
+
|
563 |
+
replace Full = fullNew if sample == "new"
|
564 |
+
|
565 |
+
reg score_compounding Full if tag == 1 & (Full == 1 | Control == 1) & sample == "old", cl(id)
|
566 |
+
local subj = e(N_clust)
|
567 |
+
lincom _b[_cons] + _b[Full]
|
568 |
+
local levelFull = r(estimate)
|
569 |
+
local seFull = r(se)
|
570 |
+
outreg2 using "tables/testScores.tex", ///
|
571 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
572 |
+
tex(frag) ///
|
573 |
+
dec(3) replace
|
574 |
+
|
575 |
+
reg score_compounding Full if tag == 1 & (fullNew == 1 | contNew == 1) & sample == "new", cl(id)
|
576 |
+
local subj = e(N_clust)
|
577 |
+
lincom _b[_cons] + _b[Full]
|
578 |
+
local levelFull = r(estimate)
|
579 |
+
local seFull = r(se)
|
580 |
+
outreg2 using "tables/testScores.tex", ///
|
581 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
582 |
+
tex(frag) ///
|
583 |
+
dec(3)
|
584 |
+
|
585 |
+
|
586 |
+
reg score_indexing Full if tag == 1 & (Full == 1 | Control == 1) & sample == "old", cl(id)
|
587 |
+
local subj = e(N_clust)
|
588 |
+
lincom _b[_cons] + _b[Full]
|
589 |
+
local levelFull = r(estimate)
|
590 |
+
local seFull = r(se)
|
591 |
+
outreg2 using "tables/testScores.tex", ///
|
592 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
593 |
+
tex(frag) ///
|
594 |
+
dec(3)
|
595 |
+
|
596 |
+
reg score_indexing Full if tag == 1 & (fullNew == 1 | contNew == 1) & sample == "new", cl(id)
|
597 |
+
local subj = e(N_clust)
|
598 |
+
lincom _b[_cons] + _b[Full]
|
599 |
+
local levelFull = r(estimate)
|
600 |
+
local seFull = r(se)
|
601 |
+
outreg2 using "tables/testScores.tex", ///
|
602 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
603 |
+
tex(frag) ///
|
604 |
+
dec(3)
|
605 |
+
restore
|
606 |
+
}
|
607 |
+
|
608 |
+
// Table individual test questions
|
609 |
+
if 1 {
|
610 |
+
|
611 |
+
// Experiment A
|
612 |
+
|
613 |
+
reg t1 Full Rule72 Rhetoric if sample == "old" & tag == 1, cl(id)
|
614 |
+
local subj = e(N_clust)
|
615 |
+
lincom _b[_cons] + _b[Full]
|
616 |
+
local levelFull = r(estimate)
|
617 |
+
local seFull = r(se)
|
618 |
+
outreg2 using "tables/indivTestQuestionsA.tex", ///
|
619 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
620 |
+
tex(frag) ///
|
621 |
+
dec(3) adec(3) replace
|
622 |
+
|
623 |
+
|
624 |
+
reg t2 Full Rule72 Rhetoric if sample == "old" & tag == 1, cl(id)
|
625 |
+
local subj = e(N_clust)
|
626 |
+
lincom _b[_cons] + _b[Full]
|
627 |
+
local levelFull = r(estimate)
|
628 |
+
local seFull = r(se)
|
629 |
+
outreg2 using "tables/indivTestQuestionsA.tex", ///
|
630 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
631 |
+
tex(frag) ///
|
632 |
+
dec(3) adec(3)
|
633 |
+
|
634 |
+
reg t3 Full Rule72 Rhetoric if sample == "old" & tag == 1, cl(id)
|
635 |
+
local subj = e(N_clust)
|
636 |
+
lincom _b[_cons] + _b[Full]
|
637 |
+
local levelFull = r(estimate)
|
638 |
+
local seFull = r(se)
|
639 |
+
outreg2 using "tables/indivTestQuestionsA.tex", ///
|
640 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
641 |
+
tex(frag) ///
|
642 |
+
dec(3) adec(3)
|
643 |
+
|
644 |
+
reg t4 Full Rule72 Rhetoric if sample == "old" & tag == 1, cl(id)
|
645 |
+
local subj = e(N_clust)
|
646 |
+
lincom _b[_cons] + _b[Full]
|
647 |
+
local levelFull = r(estimate)
|
648 |
+
local seFull = r(se)
|
649 |
+
outreg2 using "tables/indivTestQuestionsA.tex", ///
|
650 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
651 |
+
tex(frag) ///
|
652 |
+
dec(3) adec(3)
|
653 |
+
|
654 |
+
|
655 |
+
reg t5 Full Rule72 Rhetoric if sample == "old" & tag == 1, cl(id)
|
656 |
+
local subj = e(N_clust)
|
657 |
+
lincom _b[_cons] + _b[Full]
|
658 |
+
local levelFull = r(estimate)
|
659 |
+
local seFull = r(se)
|
660 |
+
outreg2 using "tables/indivTestQuestionsA.tex", ///
|
661 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
662 |
+
tex(frag) ///
|
663 |
+
dec(3) adec(3)
|
664 |
+
|
665 |
+
|
666 |
+
// Experiment B
|
667 |
+
|
668 |
+
preserve
|
669 |
+
|
670 |
+
replace Full = fullNew if sample == "new"
|
671 |
+
|
672 |
+
reg t1 Full if sample == "new" , cl(id)
|
673 |
+
local subj = e(N_clust)
|
674 |
+
lincom _b[_cons] + _b[Full]
|
675 |
+
local levelFull = r(estimate)
|
676 |
+
local seFull = r(se)
|
677 |
+
outreg2 using "tables/indivTestQuestionsB.tex", ///
|
678 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
679 |
+
tex(frag) ///
|
680 |
+
dec(3) adec(3) replace
|
681 |
+
|
682 |
+
|
683 |
+
reg t2 Full if sample == "new" , cl(id)
|
684 |
+
local subj = e(N_clust)
|
685 |
+
lincom _b[_cons] + _b[Full]
|
686 |
+
local levelFull = r(estimate)
|
687 |
+
local seFull = r(se)
|
688 |
+
outreg2 using "tables/indivTestQuestionsB.tex", ///
|
689 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
690 |
+
tex(frag) ///
|
691 |
+
dec(3) adec(3)
|
692 |
+
|
693 |
+
reg t3 Full if sample == "new" , cl(id)
|
694 |
+
local subj = e(N_clust)
|
695 |
+
lincom _b[_cons] + _b[Full]
|
696 |
+
local levelFull = r(estimate)
|
697 |
+
local seFull = r(se)
|
698 |
+
outreg2 using "tables/indivTestQuestionsB.tex", ///
|
699 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
700 |
+
tex(frag) ///
|
701 |
+
dec(3) adec(3)
|
702 |
+
|
703 |
+
reg t4 Full if sample == "new" , cl(id)
|
704 |
+
local subj = e(N_clust)
|
705 |
+
lincom _b[_cons] + _b[Full]
|
706 |
+
local levelFull = r(estimate)
|
707 |
+
local seFull = r(se)
|
708 |
+
outreg2 using "tables/indivTestQuestionsB.tex", ///
|
709 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
710 |
+
tex(frag) ///
|
711 |
+
dec(3) adec(3)
|
712 |
+
|
713 |
+
|
714 |
+
reg t5 Full if sample == "new" , cl(id)
|
715 |
+
local subj = e(N_clust)
|
716 |
+
lincom _b[_cons] + _b[Full]
|
717 |
+
local levelFull = r(estimate)
|
718 |
+
local seFull = r(se)
|
719 |
+
outreg2 using "tables/indivTestQuestionsB.tex", ///
|
720 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
721 |
+
tex(frag) ///
|
722 |
+
dec(3) adec(3)
|
723 |
+
|
724 |
+
restore
|
725 |
+
|
726 |
+
|
727 |
+
}
|
728 |
+
|
729 |
+
// Table self-reports
|
730 |
+
if 1 {
|
731 |
+
|
732 |
+
preserve
|
733 |
+
|
734 |
+
replace Full = fullNew if sample == "new"
|
735 |
+
|
736 |
+
reg calculate Full if tag == 1 & (Full == 1 | Control == 1) & sample == "old", cl(id)
|
737 |
+
local subj = e(N_clust)
|
738 |
+
lincom _b[_cons] + _b[Full]
|
739 |
+
local levelFull = r(estimate)
|
740 |
+
local seFull = r(se)
|
741 |
+
outreg2 using "tables/selfReports.tex", ///
|
742 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
743 |
+
tex(frag) ///
|
744 |
+
dec(3) replace
|
745 |
+
|
746 |
+
reg calculate Full if sample == "new" & tag == 1 & sample == "new", cl(id)
|
747 |
+
local subj = e(N_clust)
|
748 |
+
lincom _b[_cons] + _b[Full]
|
749 |
+
local levelFull = r(estimate)
|
750 |
+
local seFull = r(se)
|
751 |
+
outreg2 using "tables/selfReports.tex", ///
|
752 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
753 |
+
tex(frag) ///
|
754 |
+
dec(3)
|
755 |
+
|
756 |
+
reg r72report Full if tag == 1 & (Full == 1 | Control == 1) & sample == "old", cl(id)
|
757 |
+
local subj = e(N_clust)
|
758 |
+
lincom _b[_cons] + _b[Full]
|
759 |
+
local levelFull = r(estimate)
|
760 |
+
local seFull = r(se)
|
761 |
+
outreg2 using "tables/selfReports.tex", ///
|
762 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
763 |
+
tex(frag) ///
|
764 |
+
dec(3)
|
765 |
+
|
766 |
+
reg r72report Full if sample == "new" & tag == 1 & sample == "new", cl(id)
|
767 |
+
local subj = e(N_clust)
|
768 |
+
lincom _b[_cons] + _b[Full]
|
769 |
+
local levelFull = r(estimate)
|
770 |
+
local seFull = r(se)
|
771 |
+
outreg2 using "tables/selfReports.tex", ///
|
772 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
773 |
+
tex(frag) ///
|
774 |
+
dec(3)
|
775 |
+
|
776 |
+
reg r72invReport Full if tag == 1 & (Full == 1 | Control == 1) & sample == "old", cl(id)
|
777 |
+
local subj = e(N_clust)
|
778 |
+
lincom _b[_cons] + _b[Full]
|
779 |
+
local levelFull = r(estimate)
|
780 |
+
local seFull = r(se)
|
781 |
+
outreg2 using "tables/selfReports.tex", ///
|
782 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
783 |
+
tex(frag) ///
|
784 |
+
dec(3)
|
785 |
+
|
786 |
+
reg r72invReport Full if sample == "new" & tag == 1 & sample == "new", cl(id)
|
787 |
+
local subj = e(N_clust)
|
788 |
+
lincom _b[_cons] + _b[Full]
|
789 |
+
local levelFull = r(estimate)
|
790 |
+
local seFull = r(se)
|
791 |
+
outreg2 using "tables/selfReports.tex", ///
|
792 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
793 |
+
tex(frag) ///
|
794 |
+
dec(3)
|
795 |
+
|
796 |
+
reg help_test Full if tag == 1 & (Full == 1 | Control == 1) & sample == "old", cl(id)
|
797 |
+
local subj = e(N_clust)
|
798 |
+
lincom _b[_cons] + _b[Full]
|
799 |
+
local levelFull = r(estimate)
|
800 |
+
local seFull = r(se)
|
801 |
+
outreg2 using "tables/selfReports.tex", ///
|
802 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
803 |
+
tex(frag) ///
|
804 |
+
dec(3)
|
805 |
+
|
806 |
+
reg help_test Full if sample == "new" & tag == 1 & sample == "new", cl(id)
|
807 |
+
local subj = e(N_clust)
|
808 |
+
lincom _b[_cons] + _b[Full]
|
809 |
+
local levelFull = r(estimate)
|
810 |
+
local seFull = r(se)
|
811 |
+
outreg2 using "tables/selfReports.tex", ///
|
812 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
813 |
+
tex(frag) ///
|
814 |
+
dec(3)
|
815 |
+
restore
|
816 |
+
}
|
817 |
+
|
818 |
+
// Table directional behavioral effects
|
819 |
+
if 1 {
|
820 |
+
|
821 |
+
preserve
|
822 |
+
replace Full = fullNew if sample == "new"
|
823 |
+
|
824 |
+
|
825 |
+
reg discount_framed Full if (Full == 1 | Control == 1) & sample == "old" , cl(id)
|
826 |
+
local subj = e(N_clust)
|
827 |
+
lincom _b[_cons] + _b[Full]
|
828 |
+
local levelFull = r(estimate)
|
829 |
+
local seFull = r(se)
|
830 |
+
outreg2 using "tables/directionalBehaviorV2.tex", ///
|
831 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
832 |
+
tex(frag) ///
|
833 |
+
dec(3) adec(3) replace
|
834 |
+
|
835 |
+
|
836 |
+
reg discount_framed Full if (fullNew == 1 | contNew == 1) & sample == "new" , cl(id)
|
837 |
+
local subj = e(N_clust)
|
838 |
+
lincom _b[_cons] + _b[Full]
|
839 |
+
local levelFull = r(estimate)
|
840 |
+
local seFull = r(se)
|
841 |
+
outreg2 using "tables/directionalBehaviorV2.tex", ///
|
842 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
843 |
+
tex(frag) ///
|
844 |
+
dec(3) adec(3)
|
845 |
+
|
846 |
+
reg discount_framed Full if (Full == 1 | Control == 1) & sample == "old" & delay == 72, cl(id)
|
847 |
+
local subj = e(N_clust)
|
848 |
+
lincom _b[_cons] + _b[Full]
|
849 |
+
local levelFull = r(estimate)
|
850 |
+
local seFull = r(se)
|
851 |
+
outreg2 using "tables/directionalBehaviorV2.tex", ///
|
852 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
853 |
+
tex(frag) ///
|
854 |
+
dec(3) adec(3)
|
855 |
+
|
856 |
+
|
857 |
+
reg discount_framed Full if (fullNew == 1 | contNew == 1) & sample == "new" & delay == 72, cl(id)
|
858 |
+
local subj = e(N_clust)
|
859 |
+
lincom _b[_cons] + _b[Full]
|
860 |
+
local levelFull = r(estimate)
|
861 |
+
local seFull = r(se)
|
862 |
+
outreg2 using "tables/directionalBehaviorV2.tex", ///
|
863 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
864 |
+
tex(frag) ///
|
865 |
+
dec(3) adec(3)
|
866 |
+
|
867 |
+
|
868 |
+
reg discount_framed Full if (Full == 1 | Control == 1) & sample == "old" & delay == 36, cl(id)
|
869 |
+
local subj = e(N_clust)
|
870 |
+
lincom _b[_cons] + _b[Full]
|
871 |
+
local levelFull = r(estimate)
|
872 |
+
local seFull = r(se)
|
873 |
+
outreg2 using "tables/directionalBehaviorV2.tex", ///
|
874 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
875 |
+
tex(frag) ///
|
876 |
+
dec(3) adec(3)
|
877 |
+
|
878 |
+
reg discount_framed Full if (fullNew == 1 | contNew == 1) & sample == "new" & delay == 36, cl(id)
|
879 |
+
local subj = e(N_clust)
|
880 |
+
lincom _b[_cons] + _b[Full]
|
881 |
+
local levelFull = r(estimate)
|
882 |
+
local seFull = r(se)
|
883 |
+
outreg2 using "tables/directionalBehaviorV2.tex", ///
|
884 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
885 |
+
tex(frag) ///
|
886 |
+
dec(3) adec(3)
|
887 |
+
|
888 |
+
|
889 |
+
restore
|
890 |
+
|
891 |
+
}
|
892 |
+
|
893 |
+
// Table Financial Competence
|
894 |
+
if 1 {
|
895 |
+
|
896 |
+
preserve
|
897 |
+
replace Full = fullNew if sample == "new"
|
898 |
+
|
899 |
+
cap gen negAbsDiff = -absDiff
|
900 |
+
|
901 |
+
replace Control = 1 if contNew == 1
|
902 |
+
|
903 |
+
reg negAbsDiff Control Full Rule72 Rhetoric if sample == "old", nocons cl(id)
|
904 |
+
local subj = e(N_clust)
|
905 |
+
test Full == Control
|
906 |
+
local pFull = r(p)
|
907 |
+
test Rule72 == Control
|
908 |
+
local pRule72 = r(p)
|
909 |
+
test Rhetoric == Control
|
910 |
+
local pRhetoric = r(p)
|
911 |
+
noisily: nlcom 1 - _b[Full]/_b[Control]
|
912 |
+
outreg2 using "tables/finComp.tex", ///
|
913 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
914 |
+
tex(frag) ///
|
915 |
+
dec(3) adec(3) replace
|
916 |
+
|
917 |
+
reg negAbsDiff Control Full if sample == "new", nocons cl(id)
|
918 |
+
local subj = e(N_clust)
|
919 |
+
test Full == Control
|
920 |
+
local pFull = r(p)
|
921 |
+
noisily: di "Relative improvement:"
|
922 |
+
noisily: nlcom 1 - _b[Full]/_b[Control]
|
923 |
+
outreg2 using "tables/finComp.tex", ///
|
924 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
925 |
+
tex(frag) ///
|
926 |
+
dec(3) adec(3)
|
927 |
+
|
928 |
+
|
929 |
+
reg negAbsDiff Control Full Rule72 Rhetoric if sample == "old" & delay == 72, nocons cl(id)
|
930 |
+
local subj = e(N_clust)
|
931 |
+
test Full == Control
|
932 |
+
local pFull = r(p)
|
933 |
+
test Rule72 == Control
|
934 |
+
local pRule72 = r(p)
|
935 |
+
test Rhetoric == Control
|
936 |
+
local pRhetoric = r(p)
|
937 |
+
outreg2 using "tables/finComp.tex", ///
|
938 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
939 |
+
tex(frag) ///
|
940 |
+
dec(3) adec(3)
|
941 |
+
|
942 |
+
reg negAbsDiff Control Full if sample == "new" & delay == 72, nocons cl(id)
|
943 |
+
local subj = e(N_clust)
|
944 |
+
test Full == Control
|
945 |
+
local pFull = r(p)
|
946 |
+
outreg2 using "tables/finComp.tex", ///
|
947 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
948 |
+
tex(frag) ///
|
949 |
+
dec(3) adec(3)
|
950 |
+
|
951 |
+
|
952 |
+
reg negAbsDiff Control Full Rule72 Rhetoric if sample == "old" & delay == 36, nocons cl(id)
|
953 |
+
local subj = e(N_clust)
|
954 |
+
test Full == Control
|
955 |
+
local pFull = r(p)
|
956 |
+
test Rule72 == Control
|
957 |
+
local pRule72 = r(p)
|
958 |
+
test Rhetoric == Control
|
959 |
+
local pRhetoric = r(p)
|
960 |
+
outreg2 using "tables/finComp.tex", ///
|
961 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
962 |
+
tex(frag) ///
|
963 |
+
dec(3) adec(3)
|
964 |
+
|
965 |
+
reg negAbsDiff Control Full if sample == "new" & delay == 36, nocons cl(id)
|
966 |
+
local subj = e(N_clust)
|
967 |
+
test Full == Control
|
968 |
+
local pFull = r(p)
|
969 |
+
outreg2 using "tables/finComp.tex", ///
|
970 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
971 |
+
tex(frag) ///
|
972 |
+
dec(3) adec(3)
|
973 |
+
|
974 |
+
restore
|
975 |
+
|
976 |
+
}
|
977 |
+
|
978 |
+
// Table Financial Competence SQUARE measure
|
979 |
+
if 1 {
|
980 |
+
|
981 |
+
preserve
|
982 |
+
replace Full = fullNew if sample == "new"
|
983 |
+
|
984 |
+
cap gen negSqDiff = -sqDiff
|
985 |
+
|
986 |
+
replace Control = 1 if contNew == 1
|
987 |
+
|
988 |
+
reg negSqDiff Control Full Rule72 Rhetoric if sample == "old", nocons cl(id)
|
989 |
+
local subj = e(N_clust)
|
990 |
+
test Full == Control
|
991 |
+
local pFull = r(p)
|
992 |
+
test Rule72 == Control
|
993 |
+
local pRule72 = r(p)
|
994 |
+
test Rhetoric == Control
|
995 |
+
local pRhetoric = r(p)
|
996 |
+
noisily: nlcom 1 - _b[Full]/_b[Control]
|
997 |
+
outreg2 using "tables/finCompSq.tex", ///
|
998 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
999 |
+
tex(frag) ///
|
1000 |
+
dec(3) adec(3) replace
|
1001 |
+
|
1002 |
+
reg negSqDiff Control Full if sample == "new", nocons cl(id)
|
1003 |
+
local subj = e(N_clust)
|
1004 |
+
test Full == Control
|
1005 |
+
local pFull = r(p)
|
1006 |
+
noisily: di "Relative improvement:"
|
1007 |
+
noisily: nlcom 1 - _b[Full]/_b[Control]
|
1008 |
+
outreg2 using "tables/finCompSq.tex", ///
|
1009 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1010 |
+
tex(frag) ///
|
1011 |
+
dec(3) adec(3)
|
1012 |
+
|
1013 |
+
|
1014 |
+
reg negSqDiff Control Full Rule72 Rhetoric if sample == "old" & delay == 72, nocons cl(id)
|
1015 |
+
local subj = e(N_clust)
|
1016 |
+
test Full == Control
|
1017 |
+
local pFull = r(p)
|
1018 |
+
test Rule72 == Control
|
1019 |
+
local pRule72 = r(p)
|
1020 |
+
test Rhetoric == Control
|
1021 |
+
local pRhetoric = r(p)
|
1022 |
+
outreg2 using "tables/finCompSq.tex", ///
|
1023 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1024 |
+
tex(frag) ///
|
1025 |
+
dec(3) adec(3)
|
1026 |
+
|
1027 |
+
reg negSqDiff Control Full if sample == "new" & delay == 72, nocons cl(id)
|
1028 |
+
local subj = e(N_clust)
|
1029 |
+
test Full == Control
|
1030 |
+
local pFull = r(p)
|
1031 |
+
outreg2 using "tables/finCompSq.tex", ///
|
1032 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1033 |
+
tex(frag) ///
|
1034 |
+
dec(3) adec(3)
|
1035 |
+
|
1036 |
+
|
1037 |
+
reg negSqDiff Control Full Rule72 Rhetoric if sample == "old" & delay == 36, nocons cl(id)
|
1038 |
+
local subj = e(N_clust)
|
1039 |
+
test Full == Control
|
1040 |
+
local pFull = r(p)
|
1041 |
+
test Rule72 == Control
|
1042 |
+
local pRule72 = r(p)
|
1043 |
+
test Rhetoric == Control
|
1044 |
+
local pRhetoric = r(p)
|
1045 |
+
outreg2 using "tables/finCompSq.tex", ///
|
1046 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1047 |
+
tex(frag) ///
|
1048 |
+
dec(3) adec(3)
|
1049 |
+
|
1050 |
+
reg negSqDiff Control Full if sample == "new" & delay == 36, nocons cl(id)
|
1051 |
+
local subj = e(N_clust)
|
1052 |
+
test Full == Control
|
1053 |
+
local pFull = r(p)
|
1054 |
+
outreg2 using "tables/finCompSq.tex", ///
|
1055 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1056 |
+
tex(frag) ///
|
1057 |
+
dec(3) adec(3)
|
1058 |
+
|
1059 |
+
restore
|
1060 |
+
|
1061 |
+
}
|
1062 |
+
|
1063 |
+
// Table Financial Competence Correction for change in simply framed choices
|
1064 |
+
if 1 {
|
1065 |
+
|
1066 |
+
cap drop correctionFactor
|
1067 |
+
bysort id delay: egen correctionFactor = mean(discount_unframed)
|
1068 |
+
replace correctionFactor = 1 / correctionFactor
|
1069 |
+
|
1070 |
+
cap drop finCompAvg
|
1071 |
+
cap drop finCompCorr
|
1072 |
+
gen finCompCorr = -correctionFactor * absDiff * 100
|
1073 |
+
|
1074 |
+
preserve
|
1075 |
+
replace Full = fullNew if sample == "new"
|
1076 |
+
replace Control = 1 if contNew == 1
|
1077 |
+
|
1078 |
+
cap gen negAbsDiff = -absDiff
|
1079 |
+
|
1080 |
+
reg finCompCorr Control Full Rule72 Rhetoric if sample == "old", nocons cl(id)
|
1081 |
+
local subj = e(N_clust)
|
1082 |
+
test Full == Control
|
1083 |
+
local pFull = r(p)
|
1084 |
+
test Rule72 == Control
|
1085 |
+
local pRule72 = r(p)
|
1086 |
+
test Rhetoric == Control
|
1087 |
+
local pRhetoric = r(p)
|
1088 |
+
noisily: nlcom 1 - _b[Full]/_b[Control]
|
1089 |
+
outreg2 using "tables/finCompCorr.tex", ///
|
1090 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1091 |
+
tex(frag) ///
|
1092 |
+
dec(3) adec(3) replace
|
1093 |
+
|
1094 |
+
reg finCompCorr Control Full if sample == "new", nocons cl(id)
|
1095 |
+
local subj = e(N_clust)
|
1096 |
+
test Full == Control
|
1097 |
+
local pFull = r(p)
|
1098 |
+
noisily: di "Relative improvement:"
|
1099 |
+
noisily: nlcom 1 - _b[Full]/_b[Control]
|
1100 |
+
outreg2 using "tables/finCompCorr.tex", ///
|
1101 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1102 |
+
tex(frag) ///
|
1103 |
+
dec(3) adec(3)
|
1104 |
+
|
1105 |
+
|
1106 |
+
reg finCompCorr Control Full Rule72 Rhetoric if sample == "old" & delay == 72, nocons cl(id)
|
1107 |
+
local subj = e(N_clust)
|
1108 |
+
test Full == Control
|
1109 |
+
local pFull = r(p)
|
1110 |
+
test Rule72 == Control
|
1111 |
+
local pRule72 = r(p)
|
1112 |
+
test Rhetoric == Control
|
1113 |
+
local pRhetoric = r(p)
|
1114 |
+
outreg2 using "tables/finCompCorr.tex", ///
|
1115 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1116 |
+
tex(frag) ///
|
1117 |
+
dec(3) adec(3)
|
1118 |
+
|
1119 |
+
reg finCompCorr Control Full if sample == "new" & delay == 72, nocons cl(id)
|
1120 |
+
local subj = e(N_clust)
|
1121 |
+
test Full == Control
|
1122 |
+
local pFull = r(p)
|
1123 |
+
outreg2 using "tables/finCompCorr.tex", ///
|
1124 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1125 |
+
tex(frag) ///
|
1126 |
+
dec(3) adec(3)
|
1127 |
+
|
1128 |
+
|
1129 |
+
reg finCompCorr Control Full Rule72 Rhetoric if sample == "old" & delay == 36, nocons cl(id)
|
1130 |
+
local subj = e(N_clust)
|
1131 |
+
test Full == Control
|
1132 |
+
local pFull = r(p)
|
1133 |
+
test Rule72 == Control
|
1134 |
+
local pRule72 = r(p)
|
1135 |
+
test Rhetoric == Control
|
1136 |
+
local pRhetoric = r(p)
|
1137 |
+
outreg2 using "tables/finCompCorr.tex", ///
|
1138 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1139 |
+
tex(frag) ///
|
1140 |
+
dec(3) adec(3)
|
1141 |
+
|
1142 |
+
reg finCompCorr Control Full if sample == "new" & delay == 36, nocons cl(id)
|
1143 |
+
local subj = e(N_clust)
|
1144 |
+
test Full == Control
|
1145 |
+
local pFull = r(p)
|
1146 |
+
outreg2 using "tables/finCompCorr.tex", ///
|
1147 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1148 |
+
tex(frag) ///
|
1149 |
+
dec(3) adec(3)
|
1150 |
+
|
1151 |
+
restore
|
1152 |
+
}
|
1153 |
+
|
1154 |
+
// Table Financial Competence Correction for change in simply framed choices ALT APPROX
|
1155 |
+
if 1 {
|
1156 |
+
|
1157 |
+
// rho is the amount by which the simply framed valuation changes as we scale up the consequences
|
1158 |
+
// Regress the (unnormalized) simply framed valuation on the amount, define rho as the slope factor
|
1159 |
+
|
1160 |
+
cap drop rhoAgg
|
1161 |
+
gen rhoAgg = .
|
1162 |
+
reg v_unframed amount if sample == "new" & Control == 0 & delay == 36
|
1163 |
+
replace rhoAgg = _b[amount] if sample == "new" & Control == 0 & delay == 36
|
1164 |
+
reg v_unframed amount if sample == "new" & contNew == 1 & delay == 36
|
1165 |
+
replace rhoAgg = _b[amount] if sample == "new" & contNew == 1 & delay == 36
|
1166 |
+
reg v_unframed amount if sample == "old" & Control == 0 & delay == 36
|
1167 |
+
replace rhoAgg = _b[amount] if sample == "old" & Control == 0 & delay == 36
|
1168 |
+
reg v_unframed amount if sample == "old" & Control == 1 & delay == 36
|
1169 |
+
replace rhoAgg = _b[amount] if sample == "old" & Control == 1 & delay == 36
|
1170 |
+
reg v_unframed amount if sample == "new" & Control == 0 & delay == 72
|
1171 |
+
replace rhoAgg = _b[amount] if sample == "new" & Control == 0 & delay == 72
|
1172 |
+
reg v_unframed amount if sample == "new" & contNew == 1 & delay == 72
|
1173 |
+
replace rhoAgg = _b[amount] if sample == "new" & contNew == 1 & delay == 72
|
1174 |
+
reg v_unframed amount if sample == "old" & Control == 0 & delay == 72
|
1175 |
+
replace rhoAgg = _b[amount] if sample == "old" & Control == 0 & delay == 72
|
1176 |
+
reg v_unframed amount if sample == "old" & Control == 1 & delay == 72
|
1177 |
+
replace rhoAgg = _b[amount] if sample == "old" & Control == 1 & delay == 72
|
1178 |
+
|
1179 |
+
|
1180 |
+
cap drop id2
|
1181 |
+
egen id2 = group(id)
|
1182 |
+
|
1183 |
+
cap drop rho
|
1184 |
+
gen rho = .
|
1185 |
+
forvalues i = 1 / 803 {
|
1186 |
+
reg v_unframed amount if id2 == `i'
|
1187 |
+
replace rho = _b[amount] if id2 == `i'
|
1188 |
+
}
|
1189 |
+
|
1190 |
+
|
1191 |
+
cap drop correctionFactor
|
1192 |
+
gen correctionFactor = 1 / rho
|
1193 |
+
|
1194 |
+
cap drop finCompAvg
|
1195 |
+
cap drop finCompCorrAltApprox
|
1196 |
+
gen finCompCorrAltApprox = -correctionFactor * absDiff
|
1197 |
+
|
1198 |
+
preserve
|
1199 |
+
replace Full = fullNew if sample == "new"
|
1200 |
+
|
1201 |
+
replace Control = 1 if contNew == 1
|
1202 |
+
|
1203 |
+
reg finCompCorrAltApprox Control Full Rule72 Rhetoric if sample == "old", nocons cl(id)
|
1204 |
+
local subj = e(N_clust)
|
1205 |
+
test Full == Control
|
1206 |
+
local pFull = r(p)
|
1207 |
+
test Rule72 == Control
|
1208 |
+
local pRule72 = r(p)
|
1209 |
+
test Rhetoric == Control
|
1210 |
+
local pRhetoric = r(p)
|
1211 |
+
noisily: nlcom 1 - _b[Full]/_b[Control]
|
1212 |
+
outreg2 using "tables/finCompCorrAltApprox.tex", ///
|
1213 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1214 |
+
tex(frag) ///
|
1215 |
+
dec(3) adec(3) replace
|
1216 |
+
|
1217 |
+
reg finCompCorrAltApprox Control Full if sample == "new", nocons cl(id)
|
1218 |
+
local subj = e(N_clust)
|
1219 |
+
test Full == Control
|
1220 |
+
local pFull = r(p)
|
1221 |
+
noisily: di "Relative improvement:"
|
1222 |
+
noisily: nlcom 1 - _b[Full]/_b[Control]
|
1223 |
+
outreg2 using "tables/finCompCorrAltApprox.tex", ///
|
1224 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1225 |
+
tex(frag) ///
|
1226 |
+
dec(3) adec(3)
|
1227 |
+
|
1228 |
+
|
1229 |
+
reg finCompCorrAltApprox Control Full Rule72 Rhetoric if sample == "old" & delay == 72, nocons cl(id)
|
1230 |
+
local subj = e(N_clust)
|
1231 |
+
test Full == Control
|
1232 |
+
local pFull = r(p)
|
1233 |
+
test Rule72 == Control
|
1234 |
+
local pRule72 = r(p)
|
1235 |
+
test Rhetoric == Control
|
1236 |
+
local pRhetoric = r(p)
|
1237 |
+
outreg2 using "tables/finCompCorrAltApprox.tex", ///
|
1238 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1239 |
+
tex(frag) ///
|
1240 |
+
dec(3) adec(3)
|
1241 |
+
|
1242 |
+
reg finCompCorrAltApprox Control Full if sample == "new" & delay == 72, nocons cl(id)
|
1243 |
+
local subj = e(N_clust)
|
1244 |
+
test Full == Control
|
1245 |
+
local pFull = r(p)
|
1246 |
+
outreg2 using "tables/finCompCorrAltApprox.tex", ///
|
1247 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1248 |
+
tex(frag) ///
|
1249 |
+
dec(3) adec(3)
|
1250 |
+
|
1251 |
+
|
1252 |
+
reg finCompCorrAltApprox Control Full Rule72 Rhetoric if sample == "old" & delay == 36, nocons cl(id)
|
1253 |
+
local subj = e(N_clust)
|
1254 |
+
test Full == Control
|
1255 |
+
local pFull = r(p)
|
1256 |
+
test Rule72 == Control
|
1257 |
+
local pRule72 = r(p)
|
1258 |
+
test Rhetoric == Control
|
1259 |
+
local pRhetoric = r(p)
|
1260 |
+
outreg2 using "tables/finCompCorrAltApprox.tex", ///
|
1261 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1262 |
+
tex(frag) ///
|
1263 |
+
dec(3) adec(3)
|
1264 |
+
|
1265 |
+
reg finCompCorrAltApprox Control Full if sample == "new" & delay == 36, nocons cl(id)
|
1266 |
+
local subj = e(N_clust)
|
1267 |
+
test Full == Control
|
1268 |
+
local pFull = r(p)
|
1269 |
+
outreg2 using "tables/finCompCorrAltApprox.tex", ///
|
1270 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1271 |
+
tex(frag) ///
|
1272 |
+
dec(3) adec(3)
|
1273 |
+
|
1274 |
+
restore
|
1275 |
+
}
|
1276 |
+
|
1277 |
+
// Table Financial Competence Correction for change in simply framed choices SQUARE measure
|
1278 |
+
if 1 {
|
1279 |
+
|
1280 |
+
cap drop correctionFactorSq
|
1281 |
+
bysort id delay: egen correctionFactorSq = mean(discount_unframed)
|
1282 |
+
replace correctionFactorSq = correctionFactorSq / 100
|
1283 |
+
replace correctionFactorSq = 1 / correctionFactorSq^2
|
1284 |
+
|
1285 |
+
cap drop finCompAvg
|
1286 |
+
cap drop finCompCorrSq
|
1287 |
+
gen finCompCorrSq = -correctionFactorSq * sqDiff
|
1288 |
+
|
1289 |
+
preserve
|
1290 |
+
replace Full = fullNew if sample == "new"
|
1291 |
+
replace Control = 1 if contNew == 1
|
1292 |
+
|
1293 |
+
|
1294 |
+
reg finCompCorrSq Control Full Rule72 Rhetoric if sample == "old", nocons cl(id)
|
1295 |
+
local subj = e(N_clust)
|
1296 |
+
test Full == Control
|
1297 |
+
local pFull = r(p)
|
1298 |
+
test Rule72 == Control
|
1299 |
+
local pRule72 = r(p)
|
1300 |
+
test Rhetoric == Control
|
1301 |
+
local pRhetoric = r(p)
|
1302 |
+
noisily: nlcom 1 - _b[Full]/_b[Control]
|
1303 |
+
outreg2 using "tables/finCompCorrSq.tex", ///
|
1304 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1305 |
+
tex(frag) ///
|
1306 |
+
dec(3) adec(3) replace
|
1307 |
+
|
1308 |
+
reg finCompCorrSq Control Full if sample == "new", nocons cl(id)
|
1309 |
+
local subj = e(N_clust)
|
1310 |
+
test Full == Control
|
1311 |
+
local pFull = r(p)
|
1312 |
+
noisily: di "Relative improvement:"
|
1313 |
+
noisily: nlcom 1 - _b[Full]/_b[Control]
|
1314 |
+
outreg2 using "tables/finCompCorrSq.tex", ///
|
1315 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1316 |
+
tex(frag) ///
|
1317 |
+
dec(3) adec(3)
|
1318 |
+
|
1319 |
+
|
1320 |
+
reg finCompCorrSq Control Full Rule72 Rhetoric if sample == "old" & delay == 72, nocons cl(id)
|
1321 |
+
local subj = e(N_clust)
|
1322 |
+
test Full == Control
|
1323 |
+
local pFull = r(p)
|
1324 |
+
test Rule72 == Control
|
1325 |
+
local pRule72 = r(p)
|
1326 |
+
test Rhetoric == Control
|
1327 |
+
local pRhetoric = r(p)
|
1328 |
+
outreg2 using "tables/finCompCorrSq.tex", ///
|
1329 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1330 |
+
tex(frag) ///
|
1331 |
+
dec(3) adec(3)
|
1332 |
+
|
1333 |
+
reg finCompCorrSq Control Full if sample == "new" & delay == 72, nocons cl(id)
|
1334 |
+
local subj = e(N_clust)
|
1335 |
+
test Full == Control
|
1336 |
+
local pFull = r(p)
|
1337 |
+
outreg2 using "tables/finCompCorrSq.tex", ///
|
1338 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1339 |
+
tex(frag) ///
|
1340 |
+
dec(3) adec(3)
|
1341 |
+
|
1342 |
+
|
1343 |
+
reg finCompCorrSq Control Full Rule72 Rhetoric if sample == "old" & delay == 36, nocons cl(id)
|
1344 |
+
local subj = e(N_clust)
|
1345 |
+
test Full == Control
|
1346 |
+
local pFull = r(p)
|
1347 |
+
test Rule72 == Control
|
1348 |
+
local pRule72 = r(p)
|
1349 |
+
test Rhetoric == Control
|
1350 |
+
local pRhetoric = r(p)
|
1351 |
+
outreg2 using "tables/finCompCorrSq.tex", ///
|
1352 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1353 |
+
tex(frag) ///
|
1354 |
+
dec(3) adec(3)
|
1355 |
+
|
1356 |
+
reg finCompCorrSq Control Full if sample == "new" & delay == 36, nocons cl(id)
|
1357 |
+
local subj = e(N_clust)
|
1358 |
+
test Full == Control
|
1359 |
+
local pFull = r(p)
|
1360 |
+
outreg2 using "tables/finCompCorrSq.tex", ///
|
1361 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1362 |
+
tex(frag) ///
|
1363 |
+
dec(3) adec(3)
|
1364 |
+
|
1365 |
+
restore
|
1366 |
+
}
|
1367 |
+
|
1368 |
+
// Table Financial Competence Correction for change in simply framed choices SQUARE measure, ALT APPROX
|
1369 |
+
if 1 {
|
1370 |
+
|
1371 |
+
// rho is the amount by which the simply framed valuation changes as we scale up the consequences
|
1372 |
+
// Regress the (unnormalized) simply framed valuation on the amount, define rho as the slope factor
|
1373 |
+
|
1374 |
+
cap drop rhoAgg
|
1375 |
+
gen rhoAgg = .
|
1376 |
+
reg v_unframed amount if sample == "new" & Control == 0 & delay == 36
|
1377 |
+
replace rhoAgg = _b[amount] if sample == "new" & Control == 0 & delay == 36
|
1378 |
+
reg v_unframed amount if sample == "new" & contNew == 1 & delay == 36
|
1379 |
+
replace rhoAgg = _b[amount] if sample == "new" & contNew == 1 & delay == 36
|
1380 |
+
reg v_unframed amount if sample == "old" & Control == 0 & delay == 36
|
1381 |
+
replace rhoAgg = _b[amount] if sample == "old" & Control == 0 & delay == 36
|
1382 |
+
reg v_unframed amount if sample == "old" & Control == 1 & delay == 36
|
1383 |
+
replace rhoAgg = _b[amount] if sample == "old" & Control == 1 & delay == 36
|
1384 |
+
reg v_unframed amount if sample == "new" & Control == 0 & delay == 72
|
1385 |
+
replace rhoAgg = _b[amount] if sample == "new" & Control == 0 & delay == 72
|
1386 |
+
reg v_unframed amount if sample == "new" & contNew == 1 & delay == 72
|
1387 |
+
replace rhoAgg = _b[amount] if sample == "new" & contNew == 1 & delay == 72
|
1388 |
+
reg v_unframed amount if sample == "old" & Control == 0 & delay == 72
|
1389 |
+
replace rhoAgg = _b[amount] if sample == "old" & Control == 0 & delay == 72
|
1390 |
+
reg v_unframed amount if sample == "old" & Control == 1 & delay == 72
|
1391 |
+
replace rhoAgg = _b[amount] if sample == "old" & Control == 1 & delay == 72
|
1392 |
+
|
1393 |
+
|
1394 |
+
cap drop id2
|
1395 |
+
egen id2 = group(id)
|
1396 |
+
|
1397 |
+
cap drop rho
|
1398 |
+
gen rho = .
|
1399 |
+
forvalues i = 1 / 803 {
|
1400 |
+
reg v_unframed amount if id2 == `i'
|
1401 |
+
replace rho = _b[amount] if id2 == `i'
|
1402 |
+
}
|
1403 |
+
|
1404 |
+
|
1405 |
+
cap drop correctionFactor
|
1406 |
+
gen correctionFactor = 1 / rhoAgg^2
|
1407 |
+
|
1408 |
+
cap drop finCompAvg
|
1409 |
+
cap drop finCompCorrAltApprox
|
1410 |
+
gen finCompCorrAltApprox = -correctionFactor * sqDiff
|
1411 |
+
|
1412 |
+
preserve
|
1413 |
+
replace Full = fullNew if sample == "new"
|
1414 |
+
|
1415 |
+
replace Control = 1 if contNew == 1
|
1416 |
+
|
1417 |
+
reg finCompCorrAltApprox Control Full Rule72 Rhetoric if sample == "old", nocons cl(id)
|
1418 |
+
local subj = e(N_clust)
|
1419 |
+
test Full == Control
|
1420 |
+
local pFull = r(p)
|
1421 |
+
test Rule72 == Control
|
1422 |
+
local pRule72 = r(p)
|
1423 |
+
test Rhetoric == Control
|
1424 |
+
local pRhetoric = r(p)
|
1425 |
+
noisily: nlcom 1 - _b[Full]/_b[Control]
|
1426 |
+
outreg2 using "tables/finCompCorrSqAltApprox.tex", ///
|
1427 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1428 |
+
tex(frag) ///
|
1429 |
+
dec(3) adec(3) replace
|
1430 |
+
|
1431 |
+
reg finCompCorrAltApprox Control Full if sample == "new", nocons cl(id)
|
1432 |
+
local subj = e(N_clust)
|
1433 |
+
test Full == Control
|
1434 |
+
local pFull = r(p)
|
1435 |
+
noisily: di "Relative improvement:"
|
1436 |
+
noisily: nlcom 1 - _b[Full]/_b[Control]
|
1437 |
+
outreg2 using "tables/finCompCorrSqAltApprox.tex", ///
|
1438 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1439 |
+
tex(frag) ///
|
1440 |
+
dec(3) adec(3)
|
1441 |
+
|
1442 |
+
|
1443 |
+
reg finCompCorrAltApprox Control Full Rule72 Rhetoric if sample == "old" & delay == 72, nocons cl(id)
|
1444 |
+
local subj = e(N_clust)
|
1445 |
+
test Full == Control
|
1446 |
+
local pFull = r(p)
|
1447 |
+
test Rule72 == Control
|
1448 |
+
local pRule72 = r(p)
|
1449 |
+
test Rhetoric == Control
|
1450 |
+
local pRhetoric = r(p)
|
1451 |
+
outreg2 using "tables/finCompCorrSqAltApprox.tex", ///
|
1452 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1453 |
+
tex(frag) ///
|
1454 |
+
dec(3) adec(3)
|
1455 |
+
|
1456 |
+
reg finCompCorrAltApprox Control Full if sample == "new" & delay == 72, nocons cl(id)
|
1457 |
+
local subj = e(N_clust)
|
1458 |
+
test Full == Control
|
1459 |
+
local pFull = r(p)
|
1460 |
+
outreg2 using "tables/finCompCorrSqAltApprox.tex", ///
|
1461 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1462 |
+
tex(frag) ///
|
1463 |
+
dec(3) adec(3)
|
1464 |
+
|
1465 |
+
|
1466 |
+
reg finCompCorrAltApprox Control Full Rule72 Rhetoric if sample == "old" & delay == 36, nocons cl(id)
|
1467 |
+
local subj = e(N_clust)
|
1468 |
+
test Full == Control
|
1469 |
+
local pFull = r(p)
|
1470 |
+
test Rule72 == Control
|
1471 |
+
local pRule72 = r(p)
|
1472 |
+
test Rhetoric == Control
|
1473 |
+
local pRhetoric = r(p)
|
1474 |
+
outreg2 using "tables/finCompCorrSqAltApprox.tex", ///
|
1475 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1476 |
+
tex(frag) ///
|
1477 |
+
dec(3) adec(3)
|
1478 |
+
|
1479 |
+
reg finCompCorrAltApprox Control Full if sample == "new" & delay == 36, nocons cl(id)
|
1480 |
+
local subj = e(N_clust)
|
1481 |
+
test Full == Control
|
1482 |
+
local pFull = r(p)
|
1483 |
+
outreg2 using "tables/finCompCorrSqAltApprox.tex", ///
|
1484 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1485 |
+
tex(frag) ///
|
1486 |
+
dec(3) adec(3)
|
1487 |
+
|
1488 |
+
restore
|
1489 |
+
}
|
1490 |
+
|
1491 |
+
// Table Simple frame
|
1492 |
+
if 1 {
|
1493 |
+
preserve
|
1494 |
+
replace Full = fullNew if sample == "new"
|
1495 |
+
|
1496 |
+
cap gen negAbsDiff = -absDiff
|
1497 |
+
|
1498 |
+
reg discount_unframed Full if (Full == 1 | Control == 1) & delay == 72 & sample == "old", cl(id)
|
1499 |
+
local subj = e(N_clust)
|
1500 |
+
lincom _b[_cons] + _b[Full]
|
1501 |
+
local levelFull = r(estimate)
|
1502 |
+
local seFull = r(se)
|
1503 |
+
outreg2 using "tables/simpleFrame.tex", ///
|
1504 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
1505 |
+
tex(frag) ///
|
1506 |
+
dec(3) adec(3) replace
|
1507 |
+
|
1508 |
+
reg discount_unframed Full if (Full == 1 | contNew == 1) & delay == 72 & sample == "new", cl(id)
|
1509 |
+
local subj = e(N_clust)
|
1510 |
+
lincom _b[_cons] + _b[Full]
|
1511 |
+
local levelFull = r(estimate)
|
1512 |
+
local seFull = r(se)
|
1513 |
+
outreg2 using "tables/simpleFrame.tex", ///
|
1514 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
1515 |
+
tex(frag) ///
|
1516 |
+
dec(3) adec(3)
|
1517 |
+
|
1518 |
+
reg discount_unframed Full if (Full == 1 | Control == 1) & delay == 36 & sample == "old", cl(id)
|
1519 |
+
local subj = e(N_clust)
|
1520 |
+
lincom _b[_cons] + _b[Full]
|
1521 |
+
local levelFull = r(estimate)
|
1522 |
+
local seFull = r(se)
|
1523 |
+
outreg2 using "tables/simpleFrame.tex", ///
|
1524 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
1525 |
+
tex(frag) ///
|
1526 |
+
dec(3) adec(3)
|
1527 |
+
|
1528 |
+
reg discount_unframed Full if (Full == 1 | contNew == 1) & delay == 36 & sample == "new", cl(id)
|
1529 |
+
local subj = e(N_clust)
|
1530 |
+
lincom _b[_cons] + _b[Full]
|
1531 |
+
local levelFull = r(estimate)
|
1532 |
+
local seFull = r(se)
|
1533 |
+
outreg2 using "tables/simpleFrame.tex", ///
|
1534 |
+
addstat("subj", `subj', "levelFull",`levelFull', "seFull", `seFull') ///
|
1535 |
+
tex(frag) ///
|
1536 |
+
dec(3) adec(3)
|
1537 |
+
|
1538 |
+
|
1539 |
+
|
1540 |
+
restore
|
1541 |
+
|
1542 |
+
|
1543 |
+
}
|
1544 |
+
|
1545 |
+
// Table Analysis by Quartiles
|
1546 |
+
if 1 {
|
1547 |
+
|
1548 |
+
|
1549 |
+
preserve
|
1550 |
+
|
1551 |
+
gen qSimple1 = .
|
1552 |
+
gen qSimple2 = .
|
1553 |
+
gen qSimple3 = .
|
1554 |
+
gen qSimple4 = .
|
1555 |
+
|
1556 |
+
foreach tr in Full fullN Control contN {
|
1557 |
+
su meanVsimple if `tr' == 1, d
|
1558 |
+
|
1559 |
+
replace qSimple1 = meanVsimple < r(p25) if `tr' == 1
|
1560 |
+
replace qSimple2 = meanVsimple < r(p50) & meanVsimple >= r(p25) if `tr' == 1
|
1561 |
+
replace qSimple3 = meanVsimple < r(p75) & meanVsimple >= r(p50) if `tr' == 1
|
1562 |
+
replace qSimple4 = meanVsimple >= r(p75) if `tr' == 1
|
1563 |
+
|
1564 |
+
}
|
1565 |
+
|
1566 |
+
replace Full = fullNew if sample == "new"
|
1567 |
+
|
1568 |
+
cap gen Full1 = qSimple1 * Full
|
1569 |
+
cap gen Full2 = qSimple2 * Full
|
1570 |
+
cap gen Full3 = qSimple3 * Full
|
1571 |
+
cap gen Full4 = qSimple4 * Full
|
1572 |
+
|
1573 |
+
cap gen negAbsDiff = -absDiff
|
1574 |
+
|
1575 |
+
reg negAbsDiff Full1 Full2 Full3 Full4 qSimple1 qSimple2 qSimple3 qSimple4 if sample == "old", nocons cl(id)
|
1576 |
+
local subj = e(N_clust)
|
1577 |
+
lincom qSimple1 + Full1
|
1578 |
+
local levelFull1 = r(estimate)
|
1579 |
+
local levelFull1se = r(se)
|
1580 |
+
lincom qSimple2 + Full2
|
1581 |
+
local levelFull2 = r(estimate)
|
1582 |
+
local levelFull2se = r(se)
|
1583 |
+
lincom qSimple3 + Full3
|
1584 |
+
local levelFull3 = r(estimate)
|
1585 |
+
local levelFull3se = r(se)
|
1586 |
+
lincom qSimple4 + Full4
|
1587 |
+
local levelFull4 = r(estimate)
|
1588 |
+
local levelFull4se = r(se)
|
1589 |
+
outreg2 using "tables/finCompAggregation.tex", ///
|
1590 |
+
addstat( "subj", `subj', ///
|
1591 |
+
"levelFull1", `levelFull1', ///
|
1592 |
+
"levelFull1se", `levelFull1se', ///
|
1593 |
+
"levelFull2", `levelFull2', ///
|
1594 |
+
"levelFull2se", `levelFull2se', ///
|
1595 |
+
"levelFull3", `levelFull3', ///
|
1596 |
+
"levelFull3se", `levelFull3se', ///
|
1597 |
+
"levelFull4", `levelFull4', ///
|
1598 |
+
"levelFull4se", `levelFull4se' ) ///
|
1599 |
+
tex(frag) ///
|
1600 |
+
dec(3) adec(3) replace
|
1601 |
+
|
1602 |
+
|
1603 |
+
|
1604 |
+
reg negAbsDiff Full1 Full2 Full3 Full4 qSimple1 qSimple2 qSimple3 qSimple4 if sample == "new", nocons cl(id)
|
1605 |
+
local subj = e(N_clust)
|
1606 |
+
lincom qSimple1 + Full1
|
1607 |
+
local levelFull1 = r(estimate)
|
1608 |
+
local levelFull1se = r(se)
|
1609 |
+
lincom qSimple2 + Full2
|
1610 |
+
local levelFull2 = r(estimate)
|
1611 |
+
local levelFull2se = r(se)
|
1612 |
+
lincom qSimple3 + Full3
|
1613 |
+
local levelFull3 = r(estimate)
|
1614 |
+
local levelFull3se = r(se)
|
1615 |
+
lincom qSimple4 + Full4
|
1616 |
+
local levelFull4 = r(estimate)
|
1617 |
+
local levelFull4se = r(se)
|
1618 |
+
outreg2 using "tables/finCompAggregation.tex", ///
|
1619 |
+
addstat( "subj", `subj', ///
|
1620 |
+
"levelFull1", `levelFull1', ///
|
1621 |
+
"levelFull1se", `levelFull1se', ///
|
1622 |
+
"levelFull2", `levelFull2', ///
|
1623 |
+
"levelFull2se", `levelFull2se', ///
|
1624 |
+
"levelFull3", `levelFull3', ///
|
1625 |
+
"levelFull3se", `levelFull3se', ///
|
1626 |
+
"levelFull4", `levelFull4', ///
|
1627 |
+
"levelFull4se", `levelFull4se' ) ///
|
1628 |
+
tex(frag) ///
|
1629 |
+
dec(3) adec(3)
|
1630 |
+
|
1631 |
+
|
1632 |
+
|
1633 |
+
restore
|
1634 |
+
}
|
1635 |
+
|
1636 |
+
// Table Analysis by Quartiles SQUARE measure
|
1637 |
+
if 1 {
|
1638 |
+
|
1639 |
+
|
1640 |
+
preserve
|
1641 |
+
|
1642 |
+
gen qSimple1 = .
|
1643 |
+
gen qSimple2 = .
|
1644 |
+
gen qSimple3 = .
|
1645 |
+
gen qSimple4 = .
|
1646 |
+
|
1647 |
+
foreach tr in Full fullN Control contN {
|
1648 |
+
su meanVsimple if `tr' == 1, d
|
1649 |
+
|
1650 |
+
replace qSimple1 = meanVsimple < r(p25) if `tr' == 1
|
1651 |
+
replace qSimple2 = meanVsimple < r(p50) & meanVsimple >= r(p25) if `tr' == 1
|
1652 |
+
replace qSimple3 = meanVsimple < r(p75) & meanVsimple >= r(p50) if `tr' == 1
|
1653 |
+
replace qSimple4 = meanVsimple >= r(p75) if `tr' == 1
|
1654 |
+
|
1655 |
+
}
|
1656 |
+
|
1657 |
+
replace Full = fullNew if sample == "new"
|
1658 |
+
|
1659 |
+
cap gen Full1 = qSimple1 * Full
|
1660 |
+
cap gen Full2 = qSimple2 * Full
|
1661 |
+
cap gen Full3 = qSimple3 * Full
|
1662 |
+
cap gen Full4 = qSimple4 * Full
|
1663 |
+
|
1664 |
+
cap gen negSqDiff = -sqDiff
|
1665 |
+
|
1666 |
+
reg negSqDiff Full1 Full2 Full3 Full4 qSimple1 qSimple2 qSimple3 qSimple4 if sample == "old", nocons cl(id)
|
1667 |
+
local subj = e(N_clust)
|
1668 |
+
lincom qSimple1 + Full1
|
1669 |
+
local levelFull1 = r(estimate)
|
1670 |
+
local levelFull1se = r(se)
|
1671 |
+
lincom qSimple2 + Full2
|
1672 |
+
local levelFull2 = r(estimate)
|
1673 |
+
local levelFull2se = r(se)
|
1674 |
+
lincom qSimple3 + Full3
|
1675 |
+
local levelFull3 = r(estimate)
|
1676 |
+
local levelFull3se = r(se)
|
1677 |
+
lincom qSimple4 + Full4
|
1678 |
+
local levelFull4 = r(estimate)
|
1679 |
+
local levelFull4se = r(se)
|
1680 |
+
outreg2 using "tables/finCompAggregationSq.tex", ///
|
1681 |
+
addstat( "subj", `subj', ///
|
1682 |
+
"levelFull1", `levelFull1', ///
|
1683 |
+
"levelFull1se", `levelFull1se', ///
|
1684 |
+
"levelFull2", `levelFull2', ///
|
1685 |
+
"levelFull2se", `levelFull2se', ///
|
1686 |
+
"levelFull3", `levelFull3', ///
|
1687 |
+
"levelFull3se", `levelFull3se', ///
|
1688 |
+
"levelFull4", `levelFull4', ///
|
1689 |
+
"levelFull4se", `levelFull4se' ) ///
|
1690 |
+
tex(frag) ///
|
1691 |
+
dec(3) adec(3) replace
|
1692 |
+
|
1693 |
+
|
1694 |
+
|
1695 |
+
reg negSqDiff Full1 Full2 Full3 Full4 qSimple1 qSimple2 qSimple3 qSimple4 if sample == "new", nocons cl(id)
|
1696 |
+
local subj = e(N_clust)
|
1697 |
+
lincom qSimple1 + Full1
|
1698 |
+
local levelFull1 = r(estimate)
|
1699 |
+
local levelFull1se = r(se)
|
1700 |
+
lincom qSimple2 + Full2
|
1701 |
+
local levelFull2 = r(estimate)
|
1702 |
+
local levelFull2se = r(se)
|
1703 |
+
lincom qSimple3 + Full3
|
1704 |
+
local levelFull3 = r(estimate)
|
1705 |
+
local levelFull3se = r(se)
|
1706 |
+
lincom qSimple4 + Full4
|
1707 |
+
local levelFull4 = r(estimate)
|
1708 |
+
local levelFull4se = r(se)
|
1709 |
+
outreg2 using "tables/finCompAggregationSq.tex", ///
|
1710 |
+
addstat( "subj", `subj', ///
|
1711 |
+
"levelFull1", `levelFull1', ///
|
1712 |
+
"levelFull1se", `levelFull1se', ///
|
1713 |
+
"levelFull2", `levelFull2', ///
|
1714 |
+
"levelFull2se", `levelFull2se', ///
|
1715 |
+
"levelFull3", `levelFull3', ///
|
1716 |
+
"levelFull3se", `levelFull3se', ///
|
1717 |
+
"levelFull4", `levelFull4', ///
|
1718 |
+
"levelFull4se", `levelFull4se' ) ///
|
1719 |
+
tex(frag) ///
|
1720 |
+
dec(3) adec(3)
|
1721 |
+
|
1722 |
+
|
1723 |
+
|
1724 |
+
restore
|
1725 |
+
}
|
1726 |
+
|
1727 |
+
// Table mechanisms
|
1728 |
+
if 1 {
|
1729 |
+
|
1730 |
+
cap gen negAbsDiff = -absDiff
|
1731 |
+
|
1732 |
+
reg score_compounding Rule72 Rhetoric Full Control if tag == 1 & sample == "old", nocons cl(id)
|
1733 |
+
local subj = e(N_clust)
|
1734 |
+
test Full == Control
|
1735 |
+
local pFull = r(p)
|
1736 |
+
test Rule72 == Control
|
1737 |
+
local pRule72 = r(p)
|
1738 |
+
test Rhetoric == Control
|
1739 |
+
local pRhetoric = r(p)
|
1740 |
+
outreg2 using "tables/mechanisms1.tex", ///
|
1741 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1742 |
+
tex(frag) ///
|
1743 |
+
dec(3) adec(3) replace
|
1744 |
+
|
1745 |
+
reg score_indexing Rule72 Rhetoric Full Control if tag == 1 & sample == "old", nocons cl(id)
|
1746 |
+
local subj = e(N_clust)
|
1747 |
+
test Full == Control
|
1748 |
+
local pFull = r(p)
|
1749 |
+
test Rule72 == Control
|
1750 |
+
local pRule72 = r(p)
|
1751 |
+
test Rhetoric == Control
|
1752 |
+
local pRhetoric = r(p)
|
1753 |
+
outreg2 using "tables/mechanisms1.tex", ///
|
1754 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1755 |
+
tex(frag) ///
|
1756 |
+
dec(3) adec(3)
|
1757 |
+
|
1758 |
+
reg discount_framed Rule72 Rhetoric Full Control if sample == "old", nocons cl(id)
|
1759 |
+
local subj = e(N_clust)
|
1760 |
+
test Full == Control
|
1761 |
+
local pFull = r(p)
|
1762 |
+
test Rule72 == Control
|
1763 |
+
local pRule72 = r(p)
|
1764 |
+
test Rhetoric == Control
|
1765 |
+
local pRhetoric = r(p)
|
1766 |
+
outreg2 using "tables/mechanisms1.tex", ///
|
1767 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1768 |
+
tex(frag) ///
|
1769 |
+
dec(3) adec(3)
|
1770 |
+
|
1771 |
+
|
1772 |
+
reg discount_unframed Rule72 Rhetoric Full Control if sample == "old", nocons cl(id)
|
1773 |
+
local subj = e(N_clust)
|
1774 |
+
test Full == Control
|
1775 |
+
local pFull = r(p)
|
1776 |
+
test Rule72 == Control
|
1777 |
+
local pRule72 = r(p)
|
1778 |
+
test Rhetoric == Control
|
1779 |
+
local pRhetoric = r(p)
|
1780 |
+
outreg2 using "tables/mechanisms1.tex", ///
|
1781 |
+
addstat("subj", `subj', "pFull", `pFull', "pRule72", `pRule72', "pRhetoric", `pRhetoric') ///
|
1782 |
+
tex(frag) ///
|
1783 |
+
dec(3) adec(3)
|
1784 |
+
|
1785 |
+
|
1786 |
+
|
1787 |
+
}
|
1788 |
+
|
1789 |
+
// Table demographics
|
1790 |
+
if 1 {
|
1791 |
+
|
1792 |
+
gen flAll3 = fl1 * fl2 * fl3
|
1793 |
+
gen flAll5 = flAll3 * fl4 * fl5
|
1794 |
+
|
1795 |
+
postfile demo str16 var float Control Full Rule72 Rhetoric fullNew contNew pOld pNew using "data/demographics.dta", replace
|
1796 |
+
|
1797 |
+
local varlist = "fl1 fl2 fl3 fl4 fl5 flAll3 flAll5 gender age income afram asian caucasian hispanic other lessThanHighSchool highSchool voc someCollege college graduate fullTime partTime married widowed divorced never_married rural urbanSuburban hh1 hh2 hh3 hh4 ownStocks"
|
1798 |
+
foreach var in `varlist' {
|
1799 |
+
|
1800 |
+
|
1801 |
+
if ("`var'" == "age" | "`var'" == "income" ) {
|
1802 |
+
qreg `var' fullNew if tag == 1 & sample == "new"
|
1803 |
+
cap test fullNew == 0
|
1804 |
+
local pNew = r(p)
|
1805 |
+
local fullNew = _b[fullNew] + _b[_cons]
|
1806 |
+
local contNew = _b[_cons]
|
1807 |
+
qreg `var' Full Rule72 Rhetoric if tag == 1 & sample == "old"
|
1808 |
+
cap test Full == Rule72 == Rhetoric == 0
|
1809 |
+
local pOld = r(p)
|
1810 |
+
local Full = _b[_cons] + _b[Full]
|
1811 |
+
local Rule72 = _b[_cons] + _b[Rule72]
|
1812 |
+
local Rhetoric = _b[_cons] + _b[Rhetoric]
|
1813 |
+
post demo ("`var'") (_b[_cons]) (`Full') (`Rule72') (`Rhetoric') (`fullNew') (`contNew') (`pOld') (`pNew')
|
1814 |
+
}
|
1815 |
+
else {
|
1816 |
+
reg `var' fullNew contNew if tag == 1 & sample == "new", nocons
|
1817 |
+
cap test fullNew == contNew
|
1818 |
+
local pNew = r(p)
|
1819 |
+
local fullNew = _b[fullNew]
|
1820 |
+
local contNew = _b[contNew]
|
1821 |
+
reg `var' Control Full Rule72 Rhetoric if tag == 1 & sample == "old", nocons
|
1822 |
+
cap test Control == Full == Rule72 == Rhetoric
|
1823 |
+
local pOld = r(p)
|
1824 |
+
post demo ("`var'") (_b[Control]) (_b[Full]) (_b[Rule72]) (_b[Rhetoric]) (`fullNew') (`contNew') (`pOld') (`pNew')
|
1825 |
+
}
|
1826 |
+
|
1827 |
+
}
|
1828 |
+
|
1829 |
+
count if Control == 1 & tag == 1
|
1830 |
+
local nCont = r(N)
|
1831 |
+
count if Full == 1 & tag == 1
|
1832 |
+
local nFull = r(N)
|
1833 |
+
count if Rule72 == 1 & tag == 1
|
1834 |
+
local nRule72 = r(N)
|
1835 |
+
count if Rhetoric == 1 & tag == 1
|
1836 |
+
local nRhetoric = r(N)
|
1837 |
+
count if fullNew == 1 & tag == 1
|
1838 |
+
local nfullNew = r(N)
|
1839 |
+
count if contNew == 1 & tag == 1
|
1840 |
+
local ncontNew = r(N)
|
1841 |
+
|
1842 |
+
post demo ("N") (`nCont') (`nFull') (`nRule72') (`nRhetoric') (`nfullNew') (`ncontNew') (.) (.)
|
1843 |
+
|
1844 |
+
|
1845 |
+
postclose demo
|
1846 |
+
|
1847 |
+
preserve
|
1848 |
+
clear
|
1849 |
+
use "data/demographics.dta"
|
1850 |
+
format %9.2f Full Control Rule72 Rhetoric fullNew contNew pOld pNew
|
1851 |
+
order var Full Control Rule72 Rhetoric pOld fullNew contNew pNew
|
1852 |
+
outsheet using "tables/demographicsNew.tex", delimiter("&") nonames replace
|
1853 |
+
restore
|
1854 |
+
|
1855 |
+
}
|
1856 |
+
|
1857 |
+
// Table demographic controls
|
1858 |
+
if 1 {
|
1859 |
+
|
1860 |
+
cap gen negAbsDiff = -absDiff
|
1861 |
+
local controls = "fl1 fl2 fl3 fl4 fl5 gender age income afram asian caucasian hispanic other lessThanHighSchool highSchool voc someCollege college graduate fullTime partTime married widowed divorced never_married rural urbanSuburban hh1 hh2 hh3 hh4 ownStocks"
|
1862 |
+
local treatments = "fullN Full Control Rule72 Rhetoric"
|
1863 |
+
|
1864 |
+
reg score_compounding `treatments' `controls' if tag == 1, nocons cl(id)
|
1865 |
+
local subj = e(N_clust)
|
1866 |
+
test Full == Control
|
1867 |
+
local pFull = r(p)
|
1868 |
+
outreg2 using "tables/demoControl.tex", ///
|
1869 |
+
keep(`treatments') ///
|
1870 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1871 |
+
tex(frag) ///
|
1872 |
+
dec(3) adec(3) replace
|
1873 |
+
|
1874 |
+
reg score_indexing `treatments' `controls' if tag == 1, nocons cl(id)
|
1875 |
+
local subj = e(N_clust)
|
1876 |
+
test Full == Control
|
1877 |
+
local pFull = r(p)
|
1878 |
+
outreg2 using "tables/demoControl.tex", ///
|
1879 |
+
keep(`treatments') ///
|
1880 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1881 |
+
tex(frag) ///
|
1882 |
+
dec(3) adec(3)
|
1883 |
+
|
1884 |
+
reg discount_framed `treatments' `controls' , nocons cl(id)
|
1885 |
+
local subj = e(N_clust)
|
1886 |
+
test Full == Control
|
1887 |
+
local pFull = r(p)
|
1888 |
+
outreg2 using "tables/demoControl.tex", ///
|
1889 |
+
keep(`treatments') ///
|
1890 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1891 |
+
tex(frag) ///
|
1892 |
+
dec(3) adec(3)
|
1893 |
+
|
1894 |
+
|
1895 |
+
reg discount_unframed `treatments' `controls' , nocons cl(id)
|
1896 |
+
local subj = e(N_clust)
|
1897 |
+
test Full == Control
|
1898 |
+
local pFull = r(p)
|
1899 |
+
outreg2 using "tables/demoControl.tex", ///
|
1900 |
+
keep(`treatments') ///
|
1901 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1902 |
+
tex(frag) ///
|
1903 |
+
dec(3) adec(3)
|
1904 |
+
|
1905 |
+
reg negAbsDiff `treatments' `controls' , nocons cl(id)
|
1906 |
+
local subj = e(N_clust)
|
1907 |
+
test Full == Control
|
1908 |
+
local pFull = r(p)
|
1909 |
+
outreg2 using "tables/demoControl.tex", ///
|
1910 |
+
keep(`treatments') ///
|
1911 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1912 |
+
tex(frag) ///
|
1913 |
+
dec(3) adec(3)
|
1914 |
+
|
1915 |
+
|
1916 |
+
cap drop correctionFactor
|
1917 |
+
bysort id delay: egen correctionFactor = mean(discount_unframed)
|
1918 |
+
replace correctionFactor = 1 / correctionFactor
|
1919 |
+
|
1920 |
+
cap drop finCompAvg
|
1921 |
+
cap drop finCompCorr
|
1922 |
+
gen finCompCorr = -correctionFactor * absDiff * 100
|
1923 |
+
|
1924 |
+
reg finCompCorr `treatments' `controls' , nocons cl(id)
|
1925 |
+
local subj = e(N_clust)
|
1926 |
+
test Full == Control
|
1927 |
+
local pFull = r(p)
|
1928 |
+
outreg2 using "tables/demoControl.tex", ///
|
1929 |
+
keep(`treatments') ///
|
1930 |
+
addstat("subj", `subj', "pFull", `pFull') ///
|
1931 |
+
tex(frag) ///
|
1932 |
+
dec(3) adec(3)
|
1933 |
+
|
1934 |
+
|
1935 |
+
|
1936 |
+
}
|
1937 |
+
|
1938 |
+
}
|
1939 |
+
|
1940 |
+
|
1941 |
+
|
1942 |
+
|
1943 |
+
|
1944 |
+
|
1945 |
+
|
1946 |
+
|
1947 |
+
|
1948 |
+
|
1949 |
+
|
1950 |
+
|
1951 |
+
|
1952 |
+
|
1953 |
+
|
1954 |
+
|
1955 |
+
|
1956 |
+
|
1957 |
+
|
1958 |
+
|
1959 |
+
|
1960 |
+
|
1961 |
+
|
1962 |
+
|
26/replication_package/doFiles/dataManagementExpA.do
ADDED
@@ -0,0 +1,640 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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== 1
|
10 |
+
replace id = id - 1 + 1000
|
11 |
+
destring, replace
|
12 |
+
rename treatment fined
|
13 |
+
save "data/raw_1.dta", replace
|
14 |
+
clear
|
15 |
+
|
16 |
+
|
17 |
+
insheet using "data/raw/expAbatch2.csv", names
|
18 |
+
gen id = _n
|
19 |
+
drop if id == 1
|
20 |
+
replace id = id - 1 + 2000
|
21 |
+
drop excluded
|
22 |
+
destring, replace
|
23 |
+
rename treatment fined
|
24 |
+
save "data/raw_2.dta", replace
|
25 |
+
|
26 |
+
|
27 |
+
clear
|
28 |
+
insheet using "data/raw/expAbatch3.csv", names
|
29 |
+
gen id = _n
|
30 |
+
drop if id == 1
|
31 |
+
replace id = id - 1 + 3000
|
32 |
+
destring, replace
|
33 |
+
drop excluded
|
34 |
+
rename treatment fined
|
35 |
+
replace fined = 2 if fined == 1 // 2 is substance only
|
36 |
+
replace fined = 3 if fined == 0 // 3 is rhetoric only
|
37 |
+
save "data/raw_3.dta", replace
|
38 |
+
|
39 |
+
|
40 |
+
clear
|
41 |
+
insheet using "data/raw/expAbatch4.csv", names
|
42 |
+
gen id = _n
|
43 |
+
drop if id == 1
|
44 |
+
replace id = id - 1 + 4000
|
45 |
+
destring, replace
|
46 |
+
drop excluded
|
47 |
+
rename treatment fined
|
48 |
+
save "data/raw_4.dta", replace
|
49 |
+
|
50 |
+
|
51 |
+
clear
|
52 |
+
insheet using "data/raw/expAbatch5.csv", names
|
53 |
+
gen id = _n
|
54 |
+
drop if id == 1
|
55 |
+
replace id = id - 1 + 5000
|
56 |
+
destring, replace
|
57 |
+
drop excluded
|
58 |
+
rename treatment fined
|
59 |
+
save "data/raw_5.dta", replace
|
60 |
+
|
61 |
+
|
62 |
+
|
63 |
+
clear
|
64 |
+
insheet using "data/raw/expAbatch6.csv", names
|
65 |
+
gen id = _n
|
66 |
+
drop if id == 1
|
67 |
+
replace id = id - 1 + 6000
|
68 |
+
destring, replace
|
69 |
+
drop excluded
|
70 |
+
rename treatment fined
|
71 |
+
replace fined = 2 if fined == 1 // 2 is substance only
|
72 |
+
replace fined = 3 if fined == 0 // 3 is rhetoric only
|
73 |
+
save "data/raw_6.dta", replace
|
74 |
+
|
75 |
+
|
76 |
+
clear
|
77 |
+
insheet using "data/raw/expAbatch7.csv", names
|
78 |
+
gen id = _n
|
79 |
+
drop if id == 1
|
80 |
+
replace id = id - 1 + 7000
|
81 |
+
destring, replace
|
82 |
+
drop excluded
|
83 |
+
rename treatment fined
|
84 |
+
replace fined = 2 if fined == 1 // 2 is substance only
|
85 |
+
replace fined = 3 if fined == 0 // 3 is rhetoric only
|
86 |
+
save "data/raw_7.dta", replace
|
87 |
+
clear
|
88 |
+
|
89 |
+
|
90 |
+
insheet using "data/raw/expAbatch8.csv", names
|
91 |
+
gen id = _n
|
92 |
+
drop if id == 1
|
93 |
+
replace id = id - 1 + 8000
|
94 |
+
destring, replace
|
95 |
+
drop excluded
|
96 |
+
rename treatment fined
|
97 |
+
replace fined = 2 if fined == 1 // 2 is substance only
|
98 |
+
replace fined = 3 if fined == 0 // 3 is rhetoric only
|
99 |
+
drop codewt
|
100 |
+
drop codetreat
|
101 |
+
save "data/raw_8.dta", replace
|
102 |
+
|
103 |
+
|
104 |
+
clear
|
105 |
+
use "data/raw_1.dta"
|
106 |
+
append using "data/raw_2.dta"
|
107 |
+
append using "data/raw_3.dta"
|
108 |
+
append using "data/raw_4.dta"
|
109 |
+
append using "data/raw_5.dta"
|
110 |
+
append using "data/raw_6.dta"
|
111 |
+
append using "data/raw_7.dta"
|
112 |
+
append using "data/raw_8.dta"
|
113 |
+
|
114 |
+
rename v6 ip
|
115 |
+
rename v8 startDate
|
116 |
+
rename v9 endDate
|
117 |
+
|
118 |
+
|
119 |
+
|
120 |
+
***** attrition
|
121 |
+
|
122 |
+
gen attrited = help_test == .
|
123 |
+
gen attrition_before_video = q120 == .
|
124 |
+
gen started_video = (q124 == 1 | q125 == 1)
|
125 |
+
|
126 |
+
preserve
|
127 |
+
keep id attrited attrition_before_video started_video fined
|
128 |
+
save "data/attrition.dta", replace
|
129 |
+
restore
|
130 |
+
|
131 |
+
|
132 |
+
drop if help_test == .
|
133 |
+
drop attrited attrition_before_video started_video
|
134 |
+
save "data/raw_all.dta", replace
|
135 |
+
|
136 |
+
|
137 |
+
** find switching points
|
138 |
+
|
139 |
+
// strategy:
|
140 |
+
// 1. reshape
|
141 |
+
// 2. order
|
142 |
+
// 3. generate variable in order starting from 35, going down
|
143 |
+
// 4. generate second variable, set to missing if choice was 1, to order otherwise, egen min of these
|
144 |
+
// 5. generate third variable, set to missing if choice was 2, to order otherwise, egen max of those
|
145 |
+
// 6. check for single switch by comparing whether max + 1 == min
|
146 |
+
|
147 |
+
|
148 |
+
preserve
|
149 |
+
rename sc0_0 score
|
150 |
+
gen pay_test = payment_for_test <= 25
|
151 |
+
keep id ip amt_id gender age ethnicity educ marital urban income employed hh_size stocks rule72* calculate line1 line2 amt1 amt2 decision_index pay_test payment_for_test score fined finlit* att* help_test test* startDate endDate time*
|
152 |
+
save "data/non_MPL.dta", replace
|
153 |
+
restore
|
154 |
+
|
155 |
+
keep id impl*
|
156 |
+
|
157 |
+
forvalues i = 1 / 20 {
|
158 |
+
rename impl`i'_1_11 impl`i'_1
|
159 |
+
rename impl`i'_1_21 impl`i'_2
|
160 |
+
rename impl`i'_1_31 impl`i'_3
|
161 |
+
rename impl`i'_1_41 impl`i'_4
|
162 |
+
rename impl`i'_1_51 impl`i'_5
|
163 |
+
rename impl`i'_1_61 impl`i'_6
|
164 |
+
rename impl`i'_1_71 impl`i'_7
|
165 |
+
rename impl`i'_1_81 impl`i'_8
|
166 |
+
rename impl`i'_1_91 impl`i'_9
|
167 |
+
rename impl`i'_1_101 impl`i'_10
|
168 |
+
rename impl`i'_1_111 impl`i'_11
|
169 |
+
|
170 |
+
}
|
171 |
+
|
172 |
+
keep impl1_* impl2_* impl3_* impl4_* impl5_* impl6_* impl7_* impl8_* impl9_* impl10_* impl11_* impl12_* impl13_* impl14_* impl15_* impl16_* impl17_* impl18_* impl19_* impl20_* id
|
173 |
+
reshape long impl1_ impl2_ impl3_ impl4_ impl5_ impl6_ impl7_ impl8_ impl9_ impl10_ impl11_ impl12_ impl13_ impl14_ impl15_ impl16_ impl17_ impl18_ impl19_ impl20_, i(id) j(line 1-11)
|
174 |
+
|
175 |
+
forvalues i = 1 / 20 {
|
176 |
+
rename impl`i'_ impl`i'
|
177 |
+
}
|
178 |
+
|
179 |
+
sort id line
|
180 |
+
|
181 |
+
gen sum_multi_switch_1 = 0
|
182 |
+
|
183 |
+
local varlist impl1
|
184 |
+
forvalues i=2/20 {
|
185 |
+
local varlist `varlist' impl`i'
|
186 |
+
}
|
187 |
+
|
188 |
+
|
189 |
+
** first pricelist for each delayed reward
|
190 |
+
|
191 |
+
foreach var in `varlist' {
|
192 |
+
|
193 |
+
gen line_left = line
|
194 |
+
gen line_right = line
|
195 |
+
replace line_left = . if `var' == 1
|
196 |
+
replace line_right = . if `var' == 0
|
197 |
+
|
198 |
+
by id: egen switch_low = max(line_left)
|
199 |
+
by id: egen switch_high = min(line_right)
|
200 |
+
by id: egen mll = max(line_left)
|
201 |
+
by id: egen mlr = min(line_right)
|
202 |
+
|
203 |
+
gen multi_switch_`var' = 1 - (switch_high == 1 + switch_low)
|
204 |
+
replace multi_switch_`var' = 0 if switch_high == 11 | switch_high == . | switch_low == 1 | switch_low == .
|
205 |
+
|
206 |
+
gen value_`var' = switch_high
|
207 |
+
replace value_`var' = . if multi_switch_`var' == 1
|
208 |
+
replace value_`var' = 0 if mlr == 1 //case where all right selected
|
209 |
+
replace value_`var' = 12 if mll == 11 // case where all left selected
|
210 |
+
|
211 |
+
replace sum_multi_switch_1 = sum_multi_switch_1 + multi_switch_`var'
|
212 |
+
|
213 |
+
drop line_left
|
214 |
+
drop line_right
|
215 |
+
drop switch_high
|
216 |
+
drop switch_low
|
217 |
+
drop mll
|
218 |
+
drop mlr
|
219 |
+
|
220 |
+
gen value_coarse_`var' = 20 - 2*(value_`var'-1)
|
221 |
+
|
222 |
+
}
|
223 |
+
|
224 |
+
preserve
|
225 |
+
drop value_impl*
|
226 |
+
drop impl*
|
227 |
+
|
228 |
+
|
229 |
+
collapse (mean) value* sum_multi* (max) multi*, by(id)
|
230 |
+
|
231 |
+
save "data/data_coarse.dta", replace
|
232 |
+
restore
|
233 |
+
|
234 |
+
|
235 |
+
// second pricelist for each delayed reward
|
236 |
+
|
237 |
+
clear all
|
238 |
+
set more off
|
239 |
+
use "data/raw_all.dta"
|
240 |
+
|
241 |
+
keep id impl*
|
242 |
+
|
243 |
+
|
244 |
+
forvalues i = 1 / 20 {
|
245 |
+
rename impl`i'_2_31 impl`i'_1
|
246 |
+
rename impl`i'_2_41 impl`i'_2
|
247 |
+
rename impl`i'_2_51 impl`i'_3
|
248 |
+
rename impl`i'_2_61 impl`i'_4
|
249 |
+
rename impl`i'_2_71 impl`i'_5
|
250 |
+
rename impl`i'_2_81 impl`i'_6
|
251 |
+
rename impl`i'_2_91 impl`i'_7
|
252 |
+
rename impl`i'_2_101 impl`i'_8
|
253 |
+
rename impl`i'_2_111 impl`i'_9
|
254 |
+
rename impl`i'_2_121 impl`i'_10
|
255 |
+
drop impl`i'_1_*
|
256 |
+
}
|
257 |
+
|
258 |
+
keep impl1_* impl2_* impl3_* impl4_* impl5_* impl6_* impl7_* impl8_* impl9_* impl10_* impl11_* impl12_* impl13_* impl14_* impl15_* impl16_* impl17_* impl18_* impl19_* impl20_* id
|
259 |
+
reshape long impl1_ impl2_ impl3_ impl4_ impl5_ impl6_ impl7_ impl8_ impl9_ impl10_ impl11_ impl12_ impl13_ impl14_ impl15_ impl16_ impl17_ impl18_ impl19_ impl20_ , i(id) j(line 1-10)
|
260 |
+
|
261 |
+
forvalues i = 1 / 20 {
|
262 |
+
rename impl`i'_ impl`i'
|
263 |
+
}
|
264 |
+
|
265 |
+
sort id line
|
266 |
+
|
267 |
+
gen sum_multi_switch_2 = 0
|
268 |
+
|
269 |
+
local varlist impl1
|
270 |
+
forvalues i=2/20 {
|
271 |
+
local varlist `varlist' impl`i'
|
272 |
+
}
|
273 |
+
|
274 |
+
foreach var in `varlist' {
|
275 |
+
|
276 |
+
gen line_left = line
|
277 |
+
gen line_right = line
|
278 |
+
replace line_left = . if `var' == 1
|
279 |
+
replace line_right = . if `var' == 0
|
280 |
+
|
281 |
+
by id: egen switch_low = max(line_left)
|
282 |
+
by id: egen switch_high = min(line_right)
|
283 |
+
by id: egen mll = max(line_left)
|
284 |
+
by id: egen mlr = min(line_right)
|
285 |
+
|
286 |
+
|
287 |
+
|
288 |
+
gen multi_switch_`var' = 1 - (switch_high == 1 + switch_low)
|
289 |
+
replace multi_switch_`var' = 0 if (switch_high == 1 & switch_low == .) | (switch_high == . & switch_low == 10)
|
290 |
+
|
291 |
+
gen value_`var' = switch_low
|
292 |
+
replace value_`var' = . if multi_switch_`var' == 1
|
293 |
+
replace value_`var' = 0 if mlr == 1 //case where all right selected
|
294 |
+
replace value_`var' = 10 if mll == 10 // case where all left selected
|
295 |
+
|
296 |
+
replace sum_multi_switch_2 = sum_multi_switch_2 + multi_switch_`var'
|
297 |
+
|
298 |
+
drop line_left
|
299 |
+
drop line_right
|
300 |
+
drop switch_high
|
301 |
+
drop switch_low
|
302 |
+
drop mll
|
303 |
+
drop mlr
|
304 |
+
|
305 |
+
gen value_fine_`var' = 1.8 - 0.2*value_`var'
|
306 |
+
replace value_fine_`var' = 0 if value_fine_`var' < 0
|
307 |
+
}
|
308 |
+
|
309 |
+
|
310 |
+
drop value_impl*
|
311 |
+
drop impl*
|
312 |
+
|
313 |
+
collapse (mean) value* sum_multi* (max) multi*, by(id)
|
314 |
+
|
315 |
+
save "data/data_fine.dta", replace
|
316 |
+
|
317 |
+
|
318 |
+
|
319 |
+
|
320 |
+
|
321 |
+
|
322 |
+
***********************************
|
323 |
+
*** merge datasets ***************
|
324 |
+
***********************************
|
325 |
+
|
326 |
+
clear all
|
327 |
+
use "data/data_fine.dta"
|
328 |
+
merge 1:1 id using "data/data_coarse.dta"
|
329 |
+
drop _merge
|
330 |
+
merge 1:1 id using "data/non_MPL.dta"
|
331 |
+
drop _merge
|
332 |
+
|
333 |
+
forvalues i = 1/20 {
|
334 |
+
gen value`i' = value_coarse_impl`i' + value_fine_impl`i'
|
335 |
+
rename time`i'1_1 timeFirstClick`i'
|
336 |
+
rename time`i'1_2 timeLastClick`i'
|
337 |
+
rename time`i'1_3 timeSubmit`i'
|
338 |
+
rename time`i'1_4 numClicks`i'
|
339 |
+
}
|
340 |
+
|
341 |
+
|
342 |
+
// Label variables conveniently
|
343 |
+
|
344 |
+
gen multi = 0
|
345 |
+
forvalues i = 1 / 20 {
|
346 |
+
replace multi = 1 if multi_switch_impl`i' == 1
|
347 |
+
replace multi = 1 if sum_multi_switch_1 == 1 | sum_multi_switch_2 == 1
|
348 |
+
}
|
349 |
+
drop multi_* value_*
|
350 |
+
|
351 |
+
reshape long value timeFirstClick timeLastClick timeSubmit numClicks, i(id) j(treatment)
|
352 |
+
|
353 |
+
gen framed = treatment > 10
|
354 |
+
gen delay = 72
|
355 |
+
replace delay = 36 if treatment >=6 & treatment <= 10
|
356 |
+
replace delay = 36 if treatment == 11 | treatment == 13 | treatment == 15 | treatment == 17 | treatment == 19
|
357 |
+
|
358 |
+
gen amount = 20
|
359 |
+
replace amount = 18 if treatment == 2 | treatment == 7 | treatment == 14 | treatment == 13
|
360 |
+
replace amount = 16 if treatment == 3 | treatment == 8 | treatment == 16 | treatment == 15
|
361 |
+
replace amount = 14 if treatment == 4 | treatment == 9 | treatment == 18 | treatment == 17
|
362 |
+
replace amount = 12 if treatment == 5 | treatment == 10 | treatment == 20 | treatment == 19
|
363 |
+
gen amount_precise = amount
|
364 |
+
|
365 |
+
|
366 |
+
// rename treatments such that #framed = #unframed + 10
|
367 |
+
gen tr_new = tr
|
368 |
+
replace tr_new = 1 if treat == 6
|
369 |
+
replace tr_new = 2 if treat == 1
|
370 |
+
replace tr_new = 3 if treat == 7
|
371 |
+
replace tr_new = 4 if treat == 2
|
372 |
+
replace tr_new = 5 if treat == 8
|
373 |
+
replace tr_new = 6 if treat == 3
|
374 |
+
replace tr_new = 7 if treat == 9
|
375 |
+
replace tr_new = 8 if treat == 4
|
376 |
+
replace tr_new = 9 if treat == 10
|
377 |
+
replace tr_new = 10 if treat == 5
|
378 |
+
|
379 |
+
rename treatment tr_old
|
380 |
+
rename tr_new treatment
|
381 |
+
|
382 |
+
replace treatment = treatment - 10 if framed == 1
|
383 |
+
|
384 |
+
replace amount_precise = 20.40 if treatment == 11 | treatment == 1
|
385 |
+
replace amount_precise = 20.47 if treatment == 12 | treatment == 2
|
386 |
+
replace amount_precise = 18.47 if treatment == 13 | treatment == 3
|
387 |
+
replace amount_precise = 18.73 if treatment == 14 | treatment == 4
|
388 |
+
replace amount_precise = 16.29 if treatment == 15 | treatment == 5
|
389 |
+
replace amount_precise = 16.80 if treatment == 16 | treatment == 6
|
390 |
+
replace amount_precise = 14.37 if treatment == 17 | treatment == 7
|
391 |
+
replace amount_precise = 15.16 if treatment == 18 | treatment == 8
|
392 |
+
replace amount_precise = 11.58 if treatment == 19 | treatment == 9
|
393 |
+
replace amount_precise = 11.83 if treatment == 20 | treatment == 10
|
394 |
+
|
395 |
+
gen id_alt = 1000*id+treatment
|
396 |
+
sort id_alt
|
397 |
+
order id_alt delay treatment tr_old
|
398 |
+
|
399 |
+
drop tr_old
|
400 |
+
|
401 |
+
reshape wide value timeFirstClick timeLastClick timeSubmit numClicks, i(id_alt) j(framed)
|
402 |
+
|
403 |
+
rename value0 v_unframed
|
404 |
+
rename value1 v_framed
|
405 |
+
|
406 |
+
rename timeFirstClick0 timeFirstClickUnframed
|
407 |
+
rename timeFirstClick1 timeFirstClickFramed
|
408 |
+
rename timeLastClick0 timeLastClickUnframed
|
409 |
+
rename timeLastClick1 timeLastClickFramed
|
410 |
+
rename timeSubmit0 timeSubmitUnframed
|
411 |
+
rename timeSubmit1 timeSubmitFramed
|
412 |
+
rename numClicks0 numClicksUnframed
|
413 |
+
rename numClicks1 numClicksFramed
|
414 |
+
|
415 |
+
gen r = .
|
416 |
+
replace r = 0.02 if treatment == 1
|
417 |
+
replace r = 0.01 if treatment == 2
|
418 |
+
replace r = 0.04 if treatment == 3
|
419 |
+
replace r = 0.02 if treatment == 4
|
420 |
+
replace r = 0.06 if treatment == 5
|
421 |
+
replace r = 0.03 if treatment == 6
|
422 |
+
replace r = 0.08 if treatment == 7
|
423 |
+
replace r = 0.04 if treatment == 8
|
424 |
+
replace r = 0.05 if treatment == 9
|
425 |
+
replace r = 0.25 if treatment == 10
|
426 |
+
|
427 |
+
gen doublings = 1
|
428 |
+
replace doublings = 2 if treatment == 3 | treatment == 4
|
429 |
+
replace doublings = 3 if treatment == 5 | treatment == 6
|
430 |
+
replace doublings = 4 if treatment == 7 | treatment == 8
|
431 |
+
replace doublings = 2.5 if treatment == 9 | treatment == 10
|
432 |
+
|
433 |
+
replace age = age + 17
|
434 |
+
|
435 |
+
forvalues i = 1/10 {
|
436 |
+
gen t`i' = 0
|
437 |
+
}
|
438 |
+
|
439 |
+
replace t1 = 1 if test1 == 2
|
440 |
+
replace t2 = 1 if test2 == 4
|
441 |
+
replace t3 = 1 if test3 == 4
|
442 |
+
replace t4 = 1 if test4 == 7
|
443 |
+
replace t5 = 1 if test5 == 6
|
444 |
+
replace t6 = 1 if test6 == 3
|
445 |
+
replace t7 = 1 if test7 == 4
|
446 |
+
replace t8 = 1 if test8 == 2
|
447 |
+
replace t9 = 1 if test9 == 3
|
448 |
+
replace t10 = 1 if test10 == 3
|
449 |
+
|
450 |
+
gen score_compounding = t1+t2+t3+t4+t5
|
451 |
+
gen score_indexing = score - score_compounding
|
452 |
+
|
453 |
+
gen fl1 = finlit1 == 1
|
454 |
+
gen fl2 = finlit2 == 1
|
455 |
+
gen fl3 = finlit3 == 3
|
456 |
+
gen fl4 = finlit4 == 1
|
457 |
+
gen fl5 = finlit5 == 2
|
458 |
+
gen fl_score = (fl1 == 1) * (fl2 == 1) * (fl3 == 1) * (fl4 == 1) * (fl5 == 1)
|
459 |
+
gen fl_sum = (fl1 == 1) + (fl2 == 1) + (fl3 == 1) + (fl4 == 1) + (fl5 == 1)
|
460 |
+
gen fl_score_compound = (fl1 == 1) * (fl2 == 1) * (fl3 == 1)
|
461 |
+
gen fl_sum_compound = (fl1 == 1) + (fl2 == 1) + (fl3 == 1)
|
462 |
+
|
463 |
+
gen size_error_simple = .
|
464 |
+
replace size_error_simple = 3.20 if treatment == 1
|
465 |
+
replace size_error_simple = 3.27 if treatment == 2
|
466 |
+
replace size_error_simple = 7.49 if treatment == 3
|
467 |
+
replace size_error_simple = 7.75 if treatment == 4
|
468 |
+
replace size_error_simple = 9.97 if treatment == 5
|
469 |
+
replace size_error_simple = 10.48 if treatment == 6
|
470 |
+
replace size_error_simple = 10.88 if treatment == 7
|
471 |
+
replace size_error_simple = 11.66 if treatment == 8
|
472 |
+
replace size_error_simple = 5.98 if treatment == 9
|
473 |
+
replace size_error_simple = 6.23 if treatment == 10
|
474 |
+
|
475 |
+
// use midpoint of the interval for analysis
|
476 |
+
replace v_framed = v_framed + 0.1
|
477 |
+
replace v_unframed = v_unframed + 0.1
|
478 |
+
|
479 |
+
replace v_framed = 0 if v_framed <= 0
|
480 |
+
replace v_unframed = 0 if v_unframed <= 0
|
481 |
+
|
482 |
+
|
483 |
+
|
484 |
+
merge m:1 id using "data/attrition.dta"
|
485 |
+
|
486 |
+
gen double startTime = clock(startDate, "YMDhms")
|
487 |
+
gen double endTime = clock(endDate, "YMDhms")
|
488 |
+
|
489 |
+
gen double duration = endTime - startTime
|
490 |
+
replace duration = duration / (1000*60) // duration in minutes
|
491 |
+
|
492 |
+
|
493 |
+
drop line1 line2 decision_index
|
494 |
+
|
495 |
+
gen fl_high = fl_score_compound == 1
|
496 |
+
|
497 |
+
gen discount_unframed = v_unframed/amount * 100
|
498 |
+
gen discount_framed = v_framed/amount_precise * 100
|
499 |
+
gen discount_framed_72 = v_framed/amount * 100
|
500 |
+
|
501 |
+
sort id delay
|
502 |
+
by id delay: egen min_discount_unframed = min(discount_unframed)
|
503 |
+
by id delay: egen max_discount_unframed = max(discount_unframed)
|
504 |
+
|
505 |
+
gen diff = discount_framed - discount_unframed
|
506 |
+
gen diff72 = discount_framed - discount_unframed
|
507 |
+
gen min_diff = discount_framed - min_discount_unframed
|
508 |
+
gen max_diff = discount_framed - max_discount_unframed
|
509 |
+
|
510 |
+
|
511 |
+
gen abs_diff = - abs(diff)
|
512 |
+
gen sq_diff = - (diff/100)^2*100
|
513 |
+
gen sq_diff72 = - (diff72/100)^2*100
|
514 |
+
gen sq_diff_up = - (diff/100)^2*100
|
515 |
+
gen sq_diff_down = - (diff/100)^2*100
|
516 |
+
replace sq_diff_up = 0 if diff > 0
|
517 |
+
replace sq_diff_down = 0 if diff < 0
|
518 |
+
|
519 |
+
sort id
|
520 |
+
by id: egen mean_diff = mean(diff)
|
521 |
+
gen sq_mean_diff = - (mean_diff/100)^2*100
|
522 |
+
gen sq_mean_diff_up = - (mean_diff/100)^2*100
|
523 |
+
gen sq_mean_diff_down = - (mean_diff/100)^2*100
|
524 |
+
replace sq_mean_diff_up = 0 if mean_diff > 0
|
525 |
+
replace sq_mean_diff_down = 0 if mean_diff < 0
|
526 |
+
|
527 |
+
gen sqrt_diff = - sqrt(abs(diff)/100)*100
|
528 |
+
|
529 |
+
gen abs_min_diff = - abs(min_diff)
|
530 |
+
gen abs_max_diff = - abs(max_diff)
|
531 |
+
gen sq_min_diff = -(min_diff/100)^2*100
|
532 |
+
gen sq_max_diff = -(max_diff/100)^2*100
|
533 |
+
|
534 |
+
gen CVa = min(sq_min_diff, sq_max_diff)
|
535 |
+
gen CVb = max(sq_min_diff, sq_max_diff)
|
536 |
+
replace CVb = 0 if discount_framed <= max_discount_unframed & discount_framed >= min_discount_unframed
|
537 |
+
|
538 |
+
gen asy_diff_up = diff
|
539 |
+
replace asy_diff_up = 0 if diff > 0
|
540 |
+
gen asy_diff_down = - diff
|
541 |
+
replace asy_diff_down = 0 if diff < 0
|
542 |
+
|
543 |
+
sort id delay
|
544 |
+
by id delay: egen mean_disc = mean(discount_unframed)
|
545 |
+
|
546 |
+
gen r72 = rule72 == 1
|
547 |
+
gen r72inv = rule72_inv == 1
|
548 |
+
|
549 |
+
|
550 |
+
// generate treatment dummies
|
551 |
+
|
552 |
+
gen Control = fined == 0 // Control
|
553 |
+
gen Full = fined == 1 // Full
|
554 |
+
gen Rule72 = fined == 2 // Substance Only
|
555 |
+
gen Rhetoric = fined == 3 // Rhetoric Only
|
556 |
+
|
557 |
+
label define treatment 0 "Control" 1 "Full Treatment" 2 "Only Rule of 72" 3 "Only Rhetoric"
|
558 |
+
label values fined treatment
|
559 |
+
|
560 |
+
|
561 |
+
// measures of noise and inattention
|
562 |
+
|
563 |
+
sort id delay
|
564 |
+
by id delay: egen sdV = sd(v_framed)
|
565 |
+
by id: egen mean_sdV = mean(sdV)
|
566 |
+
|
567 |
+
gen slope_unframed = .
|
568 |
+
gen slope_framed = .
|
569 |
+
gen corr_unframed_framed = .
|
570 |
+
gen r2_unframed_framed = .
|
571 |
+
drop if id == -1
|
572 |
+
egen id3 = group(id)
|
573 |
+
su id3
|
574 |
+
local max = r(max)
|
575 |
+
forvalues i = 1/`max' {
|
576 |
+
capture: reg discount_unframed amount if id3 == `i'
|
577 |
+
capture: replace slope_unframed = _b[amount] if id3 == `i'
|
578 |
+
capture: reg discount_framed amount_precise if id3 == `i'
|
579 |
+
capture: replace slope_framed = _b[amount_precise] if id3 == `i'
|
580 |
+
capture: reg discount_framed discount_unframed if id3 == `i'
|
581 |
+
capture: replace corr_unframed_framed = _b[discount_unframed] if id3 == `i'
|
582 |
+
capture: replace r2_unframed_framed = e(r2) if id3 == `i'
|
583 |
+
}
|
584 |
+
|
585 |
+
su slope_unframed, d
|
586 |
+
gen lowSlope25 = slope_unframed <= r(p25)
|
587 |
+
gen lowSlope50 = slope_unframed <= r(p50)
|
588 |
+
gen lowSlope75 = slope_unframed <= r(p75)
|
589 |
+
|
590 |
+
|
591 |
+
***** Demographic variables
|
592 |
+
|
593 |
+
|
594 |
+
gen afram = ethnicity == 1
|
595 |
+
gen asian = ethnicity == 2
|
596 |
+
gen caucasian = ethnicity == 3
|
597 |
+
gen hispanic = ethnicity == 4
|
598 |
+
gen other = ethnicity == 5
|
599 |
+
|
600 |
+
gen lessThanHighSchool = educ <= 2
|
601 |
+
gen highSchool = educ == 3
|
602 |
+
gen voc = educ == 4
|
603 |
+
gen someCollege = educ == 5
|
604 |
+
gen college = educ == 6
|
605 |
+
gen graduate = educ >= 7
|
606 |
+
|
607 |
+
gen rural = urban == 3
|
608 |
+
gen urbanSuburban = urban <= 2
|
609 |
+
|
610 |
+
gen fullTime = employed == 3
|
611 |
+
gen partTime = employed == 2
|
612 |
+
|
613 |
+
gen hh1 = hh_size == 1
|
614 |
+
gen hh2 = hh_size == 2
|
615 |
+
gen hh3 = hh_size == 3
|
616 |
+
gen hh4 = hh_size >= 4
|
617 |
+
|
618 |
+
gen married = marital == 3 | marital == 4
|
619 |
+
gen widowed = marital == 6
|
620 |
+
gen divorced = marital == 1
|
621 |
+
gen never_married = marital == 2 | marital == 5
|
622 |
+
|
623 |
+
gen ownStocks = stocks == 1
|
624 |
+
|
625 |
+
gen fl_high_remaining = fl4 == 1 & fl5 == 1
|
626 |
+
gen was_married = widowed == 1 | divorced == 1
|
627 |
+
gen highSchoolOrLess = highSchool == 1 | lessThanHighSchool == 1
|
628 |
+
gen vocOrSomeCollege = voc == 1 | someCollege == 1
|
629 |
+
gen hh3to5 = hh_size >= 2 & hh_size <= 5
|
630 |
+
gen hhGeq6 = hh_size >= 6
|
631 |
+
replace income = income / 1000
|
632 |
+
|
633 |
+
egen tag = tag(id)
|
634 |
+
|
635 |
+
|
636 |
+
save "data/dataExpA.dta", replace
|
637 |
+
|
638 |
+
|
639 |
+
|
640 |
+
|
26/replication_package/doFiles/dataManagementExpB.do
ADDED
@@ -0,0 +1,562 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
clear all
|
2 |
+
|
3 |
+
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
// insheet the data
|
9 |
+
if 1 {
|
10 |
+
|
11 |
+
insheet using "data/raw/expBbatch1.csv", names
|
12 |
+
drop if _n <= 2 // drop lines added by qualtrics
|
13 |
+
gen batch = 1
|
14 |
+
gen id = _n + 1000*batch
|
15 |
+
destring, replace
|
16 |
+
rename treatment fined /*DZ: fined=1 designates treated with BLB intervention.*/
|
17 |
+
|
18 |
+
drop if _n == 1 // dropping text line that qualtrics adds
|
19 |
+
destring, replace
|
20 |
+
|
21 |
+
|
22 |
+
gen attrited = finlit3 ~= . & impl111_impl11_1 == .
|
23 |
+
gen attritedLate = q182 ~= . & impl111_impl11_1 == .
|
24 |
+
|
25 |
+
save "data/batch1.dta", replace
|
26 |
+
|
27 |
+
clear
|
28 |
+
|
29 |
+
|
30 |
+
insheet using "data/raw/expBbatch2.csv", names
|
31 |
+
drop if _n <= 2 // drop lines added by qualtrics
|
32 |
+
gen batch = 2
|
33 |
+
gen id = _n + 1000*batch
|
34 |
+
destring, replace
|
35 |
+
rename treatment fined /*DZ: fined=1 designates treated with BLB intervention.*/
|
36 |
+
|
37 |
+
drop if _n == 1 // dropping text line that qualtrics adds
|
38 |
+
destring, replace
|
39 |
+
|
40 |
+
|
41 |
+
gen attrited = finlit3 ~= . & impl111_impl11_1 == .
|
42 |
+
gen attritedLate = q182 ~= . & impl111_impl11_1 == .
|
43 |
+
|
44 |
+
save "data/batch2.dta", replace
|
45 |
+
|
46 |
+
clear
|
47 |
+
|
48 |
+
use "data/batch1.dta", replace
|
49 |
+
append using "data/batch2.dta"
|
50 |
+
|
51 |
+
|
52 |
+
|
53 |
+
save "data/dataRaw.dta", replace
|
54 |
+
}
|
55 |
+
|
56 |
+
use "data/dataRaw.dta", replace
|
57 |
+
|
58 |
+
|
59 |
+
//
|
60 |
+
|
61 |
+
|
62 |
+
|
63 |
+
|
64 |
+
** find switching points
|
65 |
+
|
66 |
+
// strategy:
|
67 |
+
// 1. reshape
|
68 |
+
// 2. order
|
69 |
+
// 3. gen variable in order starting from 35, going down
|
70 |
+
// 4. gen second variable, set to missing if choice was 1, to order otherwise, egen min of these
|
71 |
+
// 5. gen third variable, set to missing if choice was 2, to order otherwise, egen max of those
|
72 |
+
// 6. check for single switch by comparing whether max + 1 == min
|
73 |
+
|
74 |
+
***************************************************************************************************************
|
75 |
+
|
76 |
+
forvalues i = 1/10 {
|
77 |
+
gen s`i' = 0
|
78 |
+
}
|
79 |
+
|
80 |
+
replace s1 = 1 if test1 == 2
|
81 |
+
replace s2 = 1 if test2 == 4
|
82 |
+
replace s3 = 1 if test3 == 4
|
83 |
+
replace s4 = 1 if test4 == 7
|
84 |
+
replace s5 = 1 if test5 == 6
|
85 |
+
replace s6 = 1 if test6 == 4
|
86 |
+
replace s7 = 1 if test7 == 5
|
87 |
+
replace s8 = 1 if test8 == 5
|
88 |
+
replace s9 = 1 if test9 == 5
|
89 |
+
replace s10 = 1 if test10 == 1
|
90 |
+
|
91 |
+
|
92 |
+
gen score = s1+s2+s3+s4+s5+s6+s7+s8+s9+s10
|
93 |
+
|
94 |
+
|
95 |
+
|
96 |
+
preserve
|
97 |
+
/*rename sc0_0 score*/
|
98 |
+
|
99 |
+
gen pay_test = payment_for_test <= 25
|
100 |
+
keep ip id amt_id gender age ethnicity educ marital urban income employed hh_size stocks rule72* calculate line1 line2 amt1 amt2 decision_index pay_test payment_for_test fined finlit* att* help_test test* startdate enddate durationinseconds time* score
|
101 |
+
save "data/dataNon_MPL.dta", replace
|
102 |
+
restore
|
103 |
+
|
104 |
+
*****************************************************************************************************************8
|
105 |
+
|
106 |
+
keep id impl*
|
107 |
+
|
108 |
+
forvalues i = 1 / 20 {
|
109 |
+
rename impl`i'11_impl`i'1_1 impl`i'_1
|
110 |
+
rename impl`i'11_impl`i'1_2 impl`i'_2
|
111 |
+
rename impl`i'11_impl`i'1_3 impl`i'_3
|
112 |
+
rename impl`i'11_impl`i'1_4 impl`i'_4
|
113 |
+
rename impl`i'11_impl`i'1_5 impl`i'_5
|
114 |
+
rename impl`i'11_impl`i'1_6 impl`i'_6
|
115 |
+
rename impl`i'11_impl`i'1_7 impl`i'_7
|
116 |
+
rename impl`i'11_impl`i'1_8 impl`i'_8
|
117 |
+
rename impl`i'11_impl`i'1_9 impl`i'_9
|
118 |
+
rename impl`i'11_impl`i'1_10 impl`i'_10
|
119 |
+
rename impl`i'11_impl`i'1_11 impl`i'_11
|
120 |
+
}
|
121 |
+
|
122 |
+
keep impl1_* impl2_* impl3_* impl4_* impl5_* impl6_* impl7_* impl8_* impl9_* impl10_* impl11_* impl12_* impl13_* impl14_* impl15_* impl16_* impl17_* impl18_* impl19_* impl20_* id
|
123 |
+
reshape long impl1_ impl2_ impl3_ impl4_ impl5_ impl6_ impl7_ impl8_ impl9_ impl10_ impl11_ impl12_ impl13_ impl14_ impl15_ impl16_ impl17_ impl18_ impl19_ impl20_, i(id) j(line 1-11)
|
124 |
+
|
125 |
+
forvalues i = 1 / 20 {
|
126 |
+
rename impl`i'_ impl`i'
|
127 |
+
}
|
128 |
+
|
129 |
+
sort id line
|
130 |
+
|
131 |
+
gen sum_multi_switch_1 = 0
|
132 |
+
|
133 |
+
local varlist impl1
|
134 |
+
forvalues i=2/20 {
|
135 |
+
local varlist `varlist' impl`i'
|
136 |
+
}
|
137 |
+
|
138 |
+
|
139 |
+
** first pricelist
|
140 |
+
|
141 |
+
foreach var in `varlist' { /*At this point varlist includes impl1, impl2, ... impl20*/
|
142 |
+
|
143 |
+
gen line_left = line
|
144 |
+
gen line_right = line
|
145 |
+
replace line_left = . if `var' == 1
|
146 |
+
replace line_right = . if `var' == 0
|
147 |
+
|
148 |
+
by id: egen switch_low = max(line_left)
|
149 |
+
by id: egen switch_high = min(line_right)
|
150 |
+
by id: egen mll = max(line_left)
|
151 |
+
by id: egen mlr = min(line_right)
|
152 |
+
|
153 |
+
gen multi_switch_`var' = 1 - (switch_high == 1 + switch_low)
|
154 |
+
replace multi_switch_`var' = 0 if switch_high == 11 | switch_high == . | switch_low == 1 | switch_low == .
|
155 |
+
|
156 |
+
gen value_`var' = switch_high
|
157 |
+
replace value_`var' = . if multi_switch_`var' == 1
|
158 |
+
replace value_`var' = 0 if mlr == 1 //case where all right selected
|
159 |
+
replace value_`var' = 12 if mll == 11 // case where all left selected
|
160 |
+
|
161 |
+
replace sum_multi_switch_1 = sum_multi_switch_1 + multi_switch_`var'
|
162 |
+
|
163 |
+
drop line_left
|
164 |
+
drop line_right
|
165 |
+
drop switch_high
|
166 |
+
drop switch_low
|
167 |
+
drop mll
|
168 |
+
drop mlr
|
169 |
+
|
170 |
+
gen value_coarse_`var' = 20 - 2*(value_`var'-1)
|
171 |
+
|
172 |
+
}
|
173 |
+
|
174 |
+
|
175 |
+
preserve
|
176 |
+
drop value_impl*
|
177 |
+
drop impl*
|
178 |
+
collapse (mean) value* sum_multi* (max) multi*, by(id)
|
179 |
+
save "data/data_Coarse.dta", replace
|
180 |
+
restore
|
181 |
+
|
182 |
+
|
183 |
+
|
184 |
+
|
185 |
+
***********************************
|
186 |
+
*** fine valuations ***************
|
187 |
+
***********************************
|
188 |
+
|
189 |
+
|
190 |
+
clear all
|
191 |
+
set more off
|
192 |
+
use "data/dataRaw.dta"
|
193 |
+
|
194 |
+
keep id impl*
|
195 |
+
|
196 |
+
|
197 |
+
forvalues i = 1 / 20 {
|
198 |
+
rename impl`i'21_impl`i'2_3 impl`i'_1
|
199 |
+
rename impl`i'21_impl`i'2_4 impl`i'_2
|
200 |
+
rename impl`i'21_impl`i'2_5 impl`i'_3
|
201 |
+
rename impl`i'21_impl`i'2_6 impl`i'_4
|
202 |
+
rename impl`i'21_impl`i'2_7 impl`i'_5
|
203 |
+
rename impl`i'21_impl`i'2_8 impl`i'_6
|
204 |
+
rename impl`i'21_impl`i'2_9 impl`i'_7
|
205 |
+
rename impl`i'21_impl`i'2_10 impl`i'_8
|
206 |
+
rename impl`i'21_impl`i'2_11 impl`i'_9
|
207 |
+
rename impl`i'21_impl`i'2_12 impl`i'_10
|
208 |
+
|
209 |
+
}
|
210 |
+
|
211 |
+
|
212 |
+
|
213 |
+
|
214 |
+
keep impl1_* impl2_* impl3_* impl4_* impl5_* impl6_* impl7_* impl8_* impl9_* impl10_* impl11_* impl12_* impl13_* impl14_* impl15_* impl16_* impl17_* impl18_* impl19_* impl20_* id
|
215 |
+
reshape long impl1_ impl2_ impl3_ impl4_ impl5_ impl6_ impl7_ impl8_ impl9_ impl10_ impl11_ impl12_ impl13_ impl14_ impl15_ impl16_ impl17_ impl18_ impl19_ impl20_ , i(id) j(line 1-10)
|
216 |
+
|
217 |
+
forvalues i = 1 / 20 {
|
218 |
+
rename impl`i'_ impl`i'
|
219 |
+
}
|
220 |
+
|
221 |
+
sort id line
|
222 |
+
|
223 |
+
gen sum_multi_switch_2 = 0
|
224 |
+
|
225 |
+
local varlist impl1
|
226 |
+
forvalues i=2/20 {
|
227 |
+
local varlist `varlist' impl`i'
|
228 |
+
}
|
229 |
+
|
230 |
+
|
231 |
+
|
232 |
+
|
233 |
+
|
234 |
+
** second pricelist
|
235 |
+
|
236 |
+
foreach var in `varlist' {
|
237 |
+
|
238 |
+
gen line_left = line
|
239 |
+
gen line_right = line
|
240 |
+
replace line_left = . if `var' == 1
|
241 |
+
replace line_right = . if `var' == 0
|
242 |
+
|
243 |
+
by id: egen switch_low = max(line_left)
|
244 |
+
by id: egen switch_high = min(line_right)
|
245 |
+
by id: egen mll = max(line_left)
|
246 |
+
by id: egen mlr = min(line_right)
|
247 |
+
|
248 |
+
|
249 |
+
|
250 |
+
gen multi_switch_`var' = 1 - (switch_high == 1 + switch_low)
|
251 |
+
replace multi_switch_`var' = 0 if (switch_high == 1 & switch_low == .) | (switch_high == . & switch_low == 10)
|
252 |
+
|
253 |
+
gen value_`var' = switch_low
|
254 |
+
replace value_`var' = . if multi_switch_`var' == 1
|
255 |
+
replace value_`var' = 0 if mlr == 1 //case where all right selected
|
256 |
+
replace value_`var' = 10 if mll == 10 // case where all left selected
|
257 |
+
|
258 |
+
replace sum_multi_switch_2 = sum_multi_switch_2 + multi_switch_`var'
|
259 |
+
|
260 |
+
drop line_left
|
261 |
+
drop line_right
|
262 |
+
drop switch_high
|
263 |
+
drop switch_low
|
264 |
+
drop mll
|
265 |
+
drop mlr
|
266 |
+
|
267 |
+
gen value_fine_`var' = 1.8 - 0.2*value_`var'
|
268 |
+
replace value_fine_`var' = 0 if value_fine_`var' < 0
|
269 |
+
}
|
270 |
+
|
271 |
+
|
272 |
+
drop value_impl*
|
273 |
+
drop impl*
|
274 |
+
|
275 |
+
collapse (mean) value* sum_multi* (max) multi*, by(id)
|
276 |
+
|
277 |
+
save "data/data_Fine.dta", replace
|
278 |
+
|
279 |
+
|
280 |
+
|
281 |
+
|
282 |
+
|
283 |
+
|
284 |
+
***********************************
|
285 |
+
*** merge datasets ***************
|
286 |
+
***********************************
|
287 |
+
|
288 |
+
clear all
|
289 |
+
use "data/data_Fine.dta"
|
290 |
+
merge 1:1 id using "data/data_Coarse.dta"
|
291 |
+
drop _merge
|
292 |
+
merge 1:1 id using "data/dataNon_MPL.dta"
|
293 |
+
drop _merge
|
294 |
+
|
295 |
+
/*DZ: Slight change in naming of variables.*/
|
296 |
+
forvalues i = 1/20 {
|
297 |
+
gen value`i' = value_coarse_impl`i' + value_fine_impl`i'
|
298 |
+
|
299 |
+
rename time`i'1_firstclick timeFirstClick`i'
|
300 |
+
rename time`i'1_lastclick timeLastClick`i'
|
301 |
+
rename time`i'1_pagesubmit timeSubmit`i'
|
302 |
+
rename time`i'1_clickcount numClicks`i'
|
303 |
+
|
304 |
+
}
|
305 |
+
|
306 |
+
|
307 |
+
|
308 |
+
***********************************
|
309 |
+
|
310 |
+
|
311 |
+
|
312 |
+
gen multi = 0
|
313 |
+
forvalues i = 1 / 20 {
|
314 |
+
replace multi = 1 if multi_switch_impl`i' == 1
|
315 |
+
replace multi = 1 if sum_multi_switch_1 == 1 | sum_multi_switch_2 == 1
|
316 |
+
}
|
317 |
+
drop multi_*
|
318 |
+
|
319 |
+
|
320 |
+
drop value_*
|
321 |
+
|
322 |
+
|
323 |
+
|
324 |
+
reshape long value timeFirstClick timeLastClick timeSubmit numClicks, i(id) j(treatment)
|
325 |
+
|
326 |
+
|
327 |
+
|
328 |
+
|
329 |
+
gen framed = treatment > 10
|
330 |
+
|
331 |
+
gen delay = 72
|
332 |
+
replace delay = 36 if treatment >=6 & treatment <= 10
|
333 |
+
replace delay = 36 if treatment == 11 | treatment == 13 | treatment == 15 | treatment == 17 | treatment == 19
|
334 |
+
|
335 |
+
|
336 |
+
gen amount = 20
|
337 |
+
replace amount = 18 if treatment == 2 | treatment == 7 | treatment == 14 | treatment == 13
|
338 |
+
replace amount = 16 if treatment == 3 | treatment == 8 | treatment == 16 | treatment == 15
|
339 |
+
replace amount = 14 if treatment == 4 | treatment == 9 | treatment == 18 | treatment == 17
|
340 |
+
replace amount = 12 if treatment == 5 | treatment == 10 | treatment == 20 | treatment == 19
|
341 |
+
|
342 |
+
gen amount_precise = amount
|
343 |
+
|
344 |
+
|
345 |
+
// rename treatments such that #framed = #unframed + 10
|
346 |
+
|
347 |
+
gen tr_new = tr
|
348 |
+
replace tr_new = 1 if treat == 6
|
349 |
+
replace tr_new = 2 if treat == 1
|
350 |
+
replace tr_new = 3 if treat == 7
|
351 |
+
replace tr_new = 4 if treat == 2
|
352 |
+
replace tr_new = 5 if treat == 8
|
353 |
+
replace tr_new = 6 if treat == 3
|
354 |
+
replace tr_new = 7 if treat == 9
|
355 |
+
replace tr_new = 8 if treat == 4
|
356 |
+
replace tr_new = 9 if treat == 10
|
357 |
+
replace tr_new = 10 if treat == 5
|
358 |
+
|
359 |
+
rename treatment tr_old
|
360 |
+
rename tr_new treatment
|
361 |
+
|
362 |
+
replace treatment = treatment - 10 if framed == 1
|
363 |
+
|
364 |
+
|
365 |
+
replace amount_precise = 20.40 if treatment == 11 | treatment == 1
|
366 |
+
replace amount_precise = 20.47 if treatment == 12 | treatment == 2
|
367 |
+
replace amount_precise = 18.47 if treatment == 13 | treatment == 3
|
368 |
+
replace amount_precise = 18.73 if treatment == 14 | treatment == 4
|
369 |
+
replace amount_precise = 16.29 if treatment == 15 | treatment == 5
|
370 |
+
replace amount_precise = 16.80 if treatment == 16 | treatment == 6
|
371 |
+
replace amount_precise = 14.37 if treatment == 17 | treatment == 7
|
372 |
+
replace amount_precise = 15.16 if treatment == 18 | treatment == 8
|
373 |
+
replace amount_precise = 11.58 if treatment == 19 | treatment == 9
|
374 |
+
replace amount_precise = 11.83 if treatment == 20 | treatment == 10
|
375 |
+
|
376 |
+
|
377 |
+
|
378 |
+
gen id_alt = 1000*id+treatment
|
379 |
+
sort id_alt
|
380 |
+
order id_alt delay treatment tr_old
|
381 |
+
|
382 |
+
drop tr_old
|
383 |
+
|
384 |
+
reshape wide value timeFirstClick timeLastClick timeSubmit numClicks, i(id_alt) j(framed)
|
385 |
+
|
386 |
+
rename value0 v_unframed
|
387 |
+
rename value1 v_framed
|
388 |
+
|
389 |
+
|
390 |
+
rename timeFirstClick0 timeFirstClickUnframed
|
391 |
+
rename timeFirstClick1 timeFirstClickFramed
|
392 |
+
rename timeLastClick0 timeLastClickUnframed
|
393 |
+
rename timeLastClick1 timeLastClickFramed
|
394 |
+
rename timeSubmit0 timeSubmitUnframed
|
395 |
+
rename timeSubmit1 timeSubmitFramed
|
396 |
+
rename numClicks0 numClicksUnframed
|
397 |
+
rename numClicks1 numClicksFramed
|
398 |
+
|
399 |
+
|
400 |
+
|
401 |
+
gen difficulty = 0
|
402 |
+
replace difficulty = 1 if treatment >= 3 & treatment <= 8
|
403 |
+
replace difficulty = 2 if treatment >= 9
|
404 |
+
|
405 |
+
gen start = 10
|
406 |
+
replace start = 4.5 if treatment == 3 | treatment == 4
|
407 |
+
replace start = 2 if treatment == 5 | treatment == 6 | treatment == 9 | treatment == 10
|
408 |
+
replace start = 0.9 if treatment == 7 | treatment == 8
|
409 |
+
|
410 |
+
gen r = .
|
411 |
+
replace r = 0.02 if treatment == 1
|
412 |
+
replace r = 0.01 if treatment == 2
|
413 |
+
replace r = 0.04 if treatment == 3
|
414 |
+
replace r = 0.02 if treatment == 4
|
415 |
+
replace r = 0.06 if treatment == 5
|
416 |
+
replace r = 0.03 if treatment == 6
|
417 |
+
replace r = 0.08 if treatment == 7
|
418 |
+
replace r = 0.04 if treatment == 8
|
419 |
+
replace r = 0.05 if treatment == 9
|
420 |
+
replace r = 0.25 if treatment == 10
|
421 |
+
|
422 |
+
|
423 |
+
gen doublings = 1
|
424 |
+
replace doublings = 2 if treatment == 3 | treatment == 4
|
425 |
+
replace doublings = 3 if treatment == 5 | treatment == 6
|
426 |
+
replace doublings = 4 if treatment == 7 | treatment == 8
|
427 |
+
replace doublings = 2.5 if treatment == 9 | treatment == 10
|
428 |
+
|
429 |
+
|
430 |
+
replace age = age + 17
|
431 |
+
|
432 |
+
forvalues i = 1/10 {
|
433 |
+
gen t`i' = 0
|
434 |
+
}
|
435 |
+
|
436 |
+
replace t1 = 1 if test1 == 2
|
437 |
+
replace t2 = 1 if test2 == 4
|
438 |
+
replace t3 = 1 if test3 == 4
|
439 |
+
replace t4 = 1 if test4 == 7
|
440 |
+
replace t5 = 1 if test5 == 6
|
441 |
+
replace t6 = 1 if test6 == 4
|
442 |
+
replace t7 = 1 if test7 == 4
|
443 |
+
replace t8 = 1 if test8 == 5
|
444 |
+
replace t9 = 1 if test9 == 5
|
445 |
+
replace t10 = 1 if test10 == 5
|
446 |
+
|
447 |
+
|
448 |
+
|
449 |
+
gen score_compounding = t1+t2+t3+t4+t5
|
450 |
+
gen score_indexing = score - score_compounding
|
451 |
+
|
452 |
+
gen fl1 = finlit1 == 1
|
453 |
+
gen fl2 = finlit2 == 1
|
454 |
+
gen fl3 = finlit3 == 3
|
455 |
+
gen fl4 = finlit4 == 1
|
456 |
+
gen fl5 = finlit5 == 2
|
457 |
+
gen fl_score = (fl1 == 1) * (fl2 == 1) * (fl3 == 1) * (fl4 == 1) * (fl5 == 1)
|
458 |
+
gen fl_sum = (fl1 == 1) + (fl2 == 1) + (fl3 == 1) + (fl4 == 1) + (fl5 == 1)
|
459 |
+
gen fl_score_compound = (fl1 == 1) * (fl2 == 1) * (fl3 == 1)
|
460 |
+
gen fl_sum_compound = (fl1 == 1) + (fl2 == 1) + (fl3 == 1)
|
461 |
+
|
462 |
+
gen size_error_simple = .
|
463 |
+
replace size_error_simple = 3.20 if treatment == 1
|
464 |
+
replace size_error_simple = 3.27 if treatment == 2
|
465 |
+
replace size_error_simple = 7.49 if treatment == 3
|
466 |
+
replace size_error_simple = 7.75 if treatment == 4
|
467 |
+
replace size_error_simple = 9.97 if treatment == 5
|
468 |
+
replace size_error_simple = 10.48 if treatment == 6
|
469 |
+
replace size_error_simple = 10.88 if treatment == 7
|
470 |
+
replace size_error_simple = 11.66 if treatment == 8
|
471 |
+
replace size_error_simple = 5.98 if treatment == 9
|
472 |
+
replace size_error_simple = 6.23 if treatment == 10
|
473 |
+
|
474 |
+
|
475 |
+
|
476 |
+
|
477 |
+
|
478 |
+
|
479 |
+
// use midpoint of the interval for analysis
|
480 |
+
replace v_framed = v_framed + 0.1
|
481 |
+
replace v_unframed = v_unframed + 0.1
|
482 |
+
|
483 |
+
replace v_framed = 0 if v_framed <= 0
|
484 |
+
replace v_unframed = 0 if v_unframed <= 0
|
485 |
+
|
486 |
+
************ monotonicity violations
|
487 |
+
sort id
|
488 |
+
gen v_u_1_i = v_unframed if amount == 12
|
489 |
+
gen v_u_2_i = v_unframed if amount == 14
|
490 |
+
gen v_u_3_i = v_unframed if amount == 16
|
491 |
+
gen v_u_4_i = v_unframed if amount == 18
|
492 |
+
gen v_u_5_i = v_unframed if amount == 20
|
493 |
+
by id: egen v_u_1 = max(v_u_1_i)
|
494 |
+
by id: egen v_u_2 = max(v_u_2_i)
|
495 |
+
by id: egen v_u_3 = max(v_u_3_i)
|
496 |
+
by id: egen v_u_4 = max(v_u_4_i)
|
497 |
+
by id: egen v_u_5 = max(v_u_5_i)
|
498 |
+
|
499 |
+
gen monotonic_u = (v_u_1 <= v_u_2 & v_u_2 <= v_u_3 & v_u_3 <= v_u_4 & v_u_4 <= v_u_5)
|
500 |
+
|
501 |
+
gen v_f_1_i = v_framed if amount == 12
|
502 |
+
gen v_f_2_i = v_framed if amount == 14
|
503 |
+
gen v_f_3_i = v_framed if amount == 16
|
504 |
+
gen v_f_4_i = v_framed if amount == 18
|
505 |
+
gen v_f_5_i = v_framed if amount == 20
|
506 |
+
by id: egen v_f_1 = max(v_f_1_i)
|
507 |
+
by id: egen v_f_2 = max(v_f_2_i)
|
508 |
+
by id: egen v_f_3 = max(v_f_3_i)
|
509 |
+
by id: egen v_f_4 = max(v_f_4_i)
|
510 |
+
by id: egen v_f_5 = max(v_f_5_i)
|
511 |
+
|
512 |
+
gen monotonic_f = (v_f_1 <= v_f_2 & v_f_2 <= v_f_3 & v_f_3 <= v_f_4 & v_f_4 <= v_f_5)
|
513 |
+
|
514 |
+
|
515 |
+
|
516 |
+
egen tag_id = tag(id)
|
517 |
+
|
518 |
+
|
519 |
+
gen duration = durationinseconds/60 /* duration in minutes */
|
520 |
+
|
521 |
+
|
522 |
+
gen afram = ethnicity == 1
|
523 |
+
gen asian = ethnicity == 2
|
524 |
+
gen caucasian = ethnicity == 3
|
525 |
+
gen hispanic = ethnicity == 4
|
526 |
+
gen other = ethnicity == 5
|
527 |
+
|
528 |
+
|
529 |
+
gen lessThanHighSchool = educ <= 2
|
530 |
+
gen highSchool = educ == 3
|
531 |
+
gen voc = educ == 4
|
532 |
+
gen someCollege = educ == 5
|
533 |
+
gen college = educ == 6
|
534 |
+
gen graduate = educ >= 7
|
535 |
+
|
536 |
+
gen rural = urban == 3
|
537 |
+
gen urbanSuburban = urban <= 2
|
538 |
+
|
539 |
+
gen fullTime = employed == 3
|
540 |
+
gen partTime = employed == 2
|
541 |
+
|
542 |
+
gen hh1 = hh_size == 1
|
543 |
+
gen hh2 = hh_size == 2
|
544 |
+
gen hh3 = hh_size == 3
|
545 |
+
gen hh4 = hh_size >= 4
|
546 |
+
|
547 |
+
gen married = marital == 3 | marital == 4
|
548 |
+
gen widowed = marital == 6
|
549 |
+
gen divorced = marital == 1
|
550 |
+
gen never_married = marital == 2 | marital == 5
|
551 |
+
|
552 |
+
gen ownStocks = stocks == 1
|
553 |
+
|
554 |
+
|
555 |
+
|
556 |
+
drop line1 line2 decision_index
|
557 |
+
drop if test10 == .
|
558 |
+
save "data/dataExpB.dta", replace
|
559 |
+
|
560 |
+
|
561 |
+
|
562 |
+
|
26/replication_package/doFiles/master.do
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
|
4 |
+
cap cd "/Users/sambuehl/Dropbox/Financial_Literacy/SUBMISSIONS/AER 2/Round 3/REPLICATION PACKAGE V2/"
|
5 |
+
|
6 |
+
set more off
|
7 |
+
|
8 |
+
run "doFiles/setup.do"
|
9 |
+
run "doFiles/dataManagementExpA.do"
|
10 |
+
run "doFiles/dataManagementExpB.do"
|
11 |
+
run "doFiles/analysis.do"
|
12 |
+
|
26/replication_package/doFiles/setup.do
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
ssc install outreg2
|
2 |
+
ssc install distplot
|
26/replication_package/readMe.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3d96b5f8fafc4d7777af8ee5bfa70d2fd7cdb9bdc80cfccdac73cfc750c53283
|
3 |
+
size 126257
|
26/should_reproduce.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1748f3ae4950ae2a45cbba8654bc943c64969988aa61211abb9d5fd4df0ba76f
|
3 |
+
size 24
|