~dricottone/replications

replications/AS08/explore AS08 timeseries polarization measure.do -rw-r--r-- 14.6 KiB
eadd78eeDominic Ricottone Add README 2 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
clear all
cd "../data/anes"

do "anes 2004 cumulative infile.do"
svyset VCF0006A [pweight=VCF0009A], vce(linearized)

*use "08475-0001-Data.dta"
*svyset VCF0006A [pweight=VCF0009Z], vce(linearized)

*use "anes_timeseries_cdf_stata_20220916.dta"
*svyset VCF0006a [pweight=VCF0009z], vce(linearized)

/*
// Conservativism
recode VCF0803 (1 2 3 4 5 6 7 9=1 "Yes") (else=0 "No"), generate(has_VCF0803)
recode VCF0824 (1 3 5 9=1 "Yes") (else=0 "No"), generate(has_VCF0824)
egen has_VCF0803_VCF0824 = group(has_VCF0803 has_VCF0824), label(has_VCF0803_VCF0824)
tab VCF0004 has_VCF0803_VCF0824
//VCF0803 available 1972-now; VCF0824 available 1984-now
*/

/*
// Aid to blacks
recode VCF0830 (1 2 3 4 5 6 7 9=1 "Yes") (else=0 "No"), generate(has_VCF0830)
tab VCF0004 has_VCF0830
//VCF0830 available 1970-now EXCEPT 2002
*/

/*
// Defense spending
recode VCF0843 (1 2 3 4 5 6 7 9=1 "Yes") (else=0 "No"), generate(has_VCF0843)
recode VCF0828 (1 2 9=1 "Yes") (else=0 "No"), generate(has_VCF0828)
egen has_VCF0843_VCF0828 = group(has_VCF0843 has_VCF0828), label(has_VCF0843_VCF0828)
tab VCF0004 has_VCF0843_VCF0828
//VCF0843 available 1980-now EXCEPT 1998,2002,2012; VCF0828 available 1972,1976
*/

/*
// Entitlements
recode VCF0809 (1 2 3 4 5 6 7 9=1 "Yes") (else=0 "No"), generate(has_VCF0809)
recode VCF0808 (1 2 9=1 "Yes") (else=0 "No"), generate(has_VCF0808)
egen has_VCF0809_VCF0808 = group(has_VCF0809 has_VCF0808), label(has_VCF0809_VCF0808)
tab VCF0004 has_VCF0809_VCF0808
// VCF0809 available 1972-now EXCEPT 2002; VCF0808 available 1956-1960,1964,1968,2002
*/

/*
// Health insurance
recode VCF0806 (1 2 3 4 5 6 7 9=1 "Yes") (else=0 "No"), generate(has_VCF0806)
recode VCF0805 (1 2 9=1 "Yes") (else=0 "No"), generate(has_VCF0805)
egen has_VCF0806_VCF0805 = group(has_VCF0806 has_VCF0805), label(has_VCF0806_VCF0805)
tab VCF0004 has_VCF0806_VCF0805
//VCF0806 available 1970-1972,1976-1978,1984,1988,1992-1996,2000,2004-now; VCF0805 available 1956,1960-1964,1968
*/

/*
// Gov't services spending
recode VCF0839 (1 2 3 4 5 6 7 9=1 "Yes") (else=0 "No"), generate(has_VCF0839)
tab VCF0004 has_VCF0839
//VCF0839 available 1982-now EXCEPT 2002
*/

/*
// Abortion
recode VCF0838 (1 2 3 4 9=1 "Yes") (else=0 "No"), generate(has_VCF0838)
recode VCF0837 (1 2 3 4 9=1 "Yes") (else=0 "No"), generate(has_VCF0837)
egen has_VCF0838_VCF0837 = group(has_VCF0838 has_VCF0837), label(has_VCF0838_VCF0837)
tab VCF0004 has_VCF0838_VCF0837
//VCF0838 available 1980-now EXCEPT 2002; VCF0837 available 1972,1976-1980
*/

recode VCF0803 (1 2 3=1 "Liberal")   (4 9=2 "Moderate") (5 6 7=3 "Conservative") (else=.), generate(conserv)
recode VCF0830 (1 2 3=1 "Aid")       (4 9=2 "Moderate") (5 6 7=3 "Help self")    (else=.), generate(blackaid)
recode VCF0843 (1 2 3=1 "Decrease")  (4 9=2 "Moderate") (5 6 7=3 "Increase")     (else=.), generate(defspend)
recode VCF0809 (1 2 3=1 "Guarantee") (4 9=2 "Moderate") (5 6 7=3 "Help self")    (else=.), generate(entitlement)
recode VCF0806 (1 2 3=1 "Public")    (4 9=2 "Moderate") (5 6 7=3 "Private")      (else=.), generate(healthins)
recode VCF0839 (1 2 3=3 "Decrease")  (4 9=2 "Moderate") (5 6 7=1 "Increase")     (else=.), generate(govtspend) //NOTE: 'liberal' position is high instead of low
recode VCF0838 (1 2=3 "Illegal")     (3 9=2 "Moderate") (4=1 "Legal")            (else=.), generate(abortlegal) //NOTE: 'liberal' position is high instead of low

label variable conserv "Liberal-conservative identification"
label variable blackaid "Should improve socioeconomic position of blacks?"
label variable defspend "Should increase defense spending?"
label variable entitlement "Should guarantee jobs and std. of living?"
label variable healthins "Should provide health insurance?"
label variable govtspend "Should increase gov't services spending?"
label variable abortlegal "Should abortion be legal?"

/*
table VCF0803 conserv, missing
table VCF0830 blackaid, missing
table VCF0843 defspend, missing
table VCF0809 entitlement, missing
table VCF0806 healthins, missing
table VCF0839 govtspend, missing
table VCF0838 abortlegal, missing
*/

generate coll = 7
replace coll = 6 if VCF0004==1982 | VCF0004==1986 | VCF0004==1990 | VCF0004==2012
replace coll = 5 if VCF0004==1980 | VCF0004==1998
replace coll = 4 if VCF0004==1972 | VCF0004==1976 | VCF0004==1978
replace coll = 3 if VCF0004==1974
replace coll = 2 if VCF0004==1970
replace coll = 1 if VCF0004==2002
replace coll = 0 if VCF0004<1970

label variable coll "Collected count"

/*
tab VCF0004 coll
*/

egen miss = rowmiss(conserv blackaid defspend entitlement healthins govtspend abortlegal)
egen dk = anycount(VCF0803 VCF0830 VCF0843 VCF0809 VCF0806 VCF0839 VCF0838), values(9)

label variable miss "Missing count"
label variable dk "Don't know count"

/*
tab VCF0004 miss
tab VCF0004 dk
table VCF0803 dk, missing
table VCF0830 dk, missing
table VCF0843 dk, missing
table VCF0809 dk, missing
table VCF0806 dk, missing
table VCF0839 dk, missing
table VCF0838 dk, missing
*/

recode VCF0004 (1982 1984 1986 1988 1990=1 "80s") (1992 1994 1996 1998 2000=2 "90s") (2002 2004=3 "00s") (else=.), generate(decades)

label variable decades "Decade bins"

/*
tab VCF0004 decades
*/

egen libpos = anycount(conserv blackaid defspend entitlement healthins govtspend abortlegal), values(1)
egen conspos = anycount(conserv blackaid defspend entitlement healthins govtspend abortlegal), values(3)
generate polar = abs(libpos - conspos)

label variable libpos "Liberal positions count"
label variable conspos "Conservative positions count"
label variable polar "Polarization scale"

/*
tab libpos conspos
tab polar if miss<6
//At minimum, need two data points for there to be 'distance' or 'variance'
*/

recode polar (0 1=1 "Low") (2 3=2 "Moderate") (4 5 6 7=3 "High"), generate(r_polar)
recode r_polar (1 2=0 "Low to Moderate") (3=1 "High"), generate(hipolar)

label variable r_polar "Polarization bins"
label variable hipolar "High polarization"

/*
tab libpos hipolar
tab conspos hipolar
tab hipolar
tab hipolar if miss<6
tab hipolar if miss<4
//At minimum, need 4 data points for there to be 'high polarization' by this definition
*/

recode VCF0702 (1 0 .=0 "Non") (2=1 "Voter") (else=.), generate(voter) //0 in 2020 cumulative file, missing in 2004 cumulative file
capture rename VCF0140a VCF0140A //for 2020 cumulative file
recode VCF0140A (1 2 3 4=1 "No college") (5=2 "Some college") (6 7=3 "College") (else=.), generate(educ)

label variable voter "Voter?"
label variable educ "Educational attainment"

/*
table VCF0702 voter, missing
table VCF0140A educ, missing
//VCF0140 is a 6-level measure, but there is an undocumented 7th level in the 2004 cumulative file for 2004 data. For levels 1-5, counts match between this and later cumulative files. Seems fair to assume that the 7th level should have been collapsed into the 6th level. So: use the 7-level measure (VCF0140A) instead.
*/

generate elig = miss==0

/*
tab VCF0004 elig
//This is an effective removal of all data from 1982, 1986, 1990, 1998, and 2002
*/

//All Respondents
mean hipolar if elig, over(decades)

//Nonvoters
mean hipolar if elig & voter==0, over(decades)
//Voters
mean hipolar if elig & voter==1, over(decades)

//No College
mean hipolar if elig & educ==1, over(decades)
//Some College
mean hipolar if elig & educ==2, over(decades)
//College Grads
mean hipolar if elig & educ==3, over(decades)

/* With 2004 cumulative file
. mean hipolar if elig, over(decades)

Mean estimation                              Number of obs = 10,345

-------------------------------------------------------------------
                  |       Mean   Std. err.     [95% conf. interval]
------------------+------------------------------------------------
c.hipolar@decades |
             80s  |   .2443163   .0079164      .2287985     .259834
             90s  |    .290683   .0056969       .279516    .3018501
             00s  |   .3323755   .0145861      .3037839     .360967
-------------------------------------------------------------------

. 
. //Nonvoters
. mean hipolar if elig & voter==0, over(decades)

Mean estimation                               Number of obs = 3,432

-------------------------------------------------------------------
                  |       Mean   Std. err.     [95% conf. interval]
------------------+------------------------------------------------
c.hipolar@decades |
             80s  |   .1761252   .0119214      .1527514    .1994991
             90s  |   .1965186   .0085067      .1798398    .2131973
             00s  |   .1982379   .0265193      .1462427    .2502331
-------------------------------------------------------------------

. //Voters
. mean hipolar if elig & voter==1, over(decades)

Mean estimation                               Number of obs = 6,913

-------------------------------------------------------------------
                  |       Mean   Std. err.     [95% conf. interval]
------------------+------------------------------------------------
c.hipolar@decades |
             80s  |   .2805195   .0102421      .2604418    .3005971
             90s  |   .3399664   .0073356      .3255865    .3543464
             00s  |    .369645   .0168982      .3365194    .4027707
-------------------------------------------------------------------

. 
. //No College
. mean hipolar if elig & educ==1, over(decades)

Mean estimation                               Number of obs = 5,212

-------------------------------------------------------------------
                  |       Mean   Std. err.     [95% conf. interval]
------------------+------------------------------------------------
c.hipolar@decades |
             80s  |   .1863501   .0094888      .1677481    .2049522
             90s  |   .2044728   .0072101       .190338    .2186077
             00s  |   .2141058   .0206134       .173695    .2545166
-------------------------------------------------------------------

. //Some College
. mean hipolar if elig & educ==2, over(decades)

Mean estimation                               Number of obs = 2,517

-------------------------------------------------------------------
                  |       Mean   Std. err.     [95% conf. interval]
------------------+------------------------------------------------
c.hipolar@decades |
             80s  |   .2914201   .0174905      .2571229    .3257174
             90s  |   .3187831   .0119883      .2952751     .342291
             00s  |    .331307   .0259891      .2803447    .3822693
-------------------------------------------------------------------

. //College Grads
. mean hipolar if elig & educ==3, over(decades)

Mean estimation                               Number of obs = 2,473

-------------------------------------------------------------------
                  |       Mean   Std. err.     [95% conf. interval]
------------------+------------------------------------------------
c.hipolar@decades |
             80s  |    .369287   .0206539      .3287863    .4097877
             90s  |   .4421642    .012389      .4178702    .4664581
             00s  |   .4811321   .0280628      .4261031    .5361611
-------------------------------------------------------------------
*/
/* With 2020 cumulative file
. //All Respondents
. mean hipolar if elig, over(decades)

Mean estimation                              Number of obs = 10,345

-------------------------------------------------------------------
                  |       Mean   Std. err.     [95% conf. interval]
------------------+------------------------------------------------
c.hipolar@decades |
             80s  |   .2443163   .0079164      .2287985     .259834
             90s  |    .290683   .0056969       .279516    .3018501
             00s  |   .3256705   .0145105      .2972271    .3541139
-------------------------------------------------------------------

. 
. //Nonvoters
. mean hipolar if elig & voter==0, over(decades)

Mean estimation                               Number of obs = 3,432

-------------------------------------------------------------------
                  |       Mean   Std. err.     [95% conf. interval]
------------------+------------------------------------------------
c.hipolar@decades |
             80s  |   .1761252   .0119214      .1527514    .1994991
             90s  |   .1965186   .0085067      .1798398    .2131973
             00s  |   .1894273   .0260653      .1383222    .2405324
-------------------------------------------------------------------

. //Voters
. mean hipolar if elig & voter==1, over(decades)

Mean estimation                               Number of obs = 6,913

-------------------------------------------------------------------
                  |       Mean   Std. err.     [95% conf. interval]
------------------+------------------------------------------------
c.hipolar@decades |
             80s  |   .2805195   .0102421      .2604418    .3005971
             90s  |   .3399664   .0073356      .3255865    .3543464
             00s  |   .3635251   .0168389      .3305157    .3965344
-------------------------------------------------------------------

. 
. //No College
. mean hipolar if elig & educ==1, over(decades)

Mean estimation                               Number of obs = 5,116

-------------------------------------------------------------------
                  |       Mean   Std. err.     [95% conf. interval]
------------------+------------------------------------------------
c.hipolar@decades |
             80s  |   .1863501   .0094888       .167748    .2049523
             90s  |   .1990115   .0072484      .1848015    .2132216
             00s  |    .209596   .0204794      .1694475    .2497444
-------------------------------------------------------------------

. //Some College
. mean hipolar if elig & educ==2, over(decades)

Mean estimation                               Number of obs = 2,613

-------------------------------------------------------------------
                  |       Mean   Std. err.     [95% conf. interval]
------------------+------------------------------------------------
c.hipolar@decades |
             80s  |   .2914201   .0174905      .2571235    .3257168
             90s  |   .3223398   .0116625      .2994712    .3452084
             00s  |   .3151515   .0256129      .2649279    .3653752
-------------------------------------------------------------------

. //College Grads
. mean hipolar if elig & educ==3, over(decades)

Mean estimation                               Number of obs = 2,473

-------------------------------------------------------------------
                  |       Mean   Std. err.     [95% conf. interval]
------------------+------------------------------------------------
c.hipolar@decades |
             80s  |    .369287   .0206539      .3287863    .4097877
             90s  |   .4421642    .012389      .4178702    .4664581
             00s  |   .4811321   .0280628      .4261031    .5361611
-------------------------------------------------------------------
*/