~dricottone/replications

ref: 59da47fa9c6a18cc9250376127ad0d2c071ec6fb replications/data/anes/anes 2004 2012 2020 comparison.do -rw-r--r-- 4.5 KiB
59da47faDominic Ricottone ANES updates 7 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
// ANES 2004 cumulative file
clear all

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

keep if inlist(VCF0004,1982,1984,1998,1992,1996,2000,2002,2004)
recode VCF0803 (1/3=1 "Lib") (4 9=2 "Mod") (5/7=3 "Cons") (else=.), gen(conserv)
svy: tab conserv VCF0004, col
/*
(running tabulate on estimation sample)

Number of strata =      1                         Number of obs   =     12,528
Number of PSUs   = 11,368                         Population size = 12,501.836
                                                  Design df       =     11,367

-------------------------------------------------------------------------
RECODE of |
VCF0803   |
(Liberal- |
Conservat |
ive 7pt   |                         Year of Study                        
Scale)    |  1982   1984   1992   1996   1998   2000   2002   2004  Total
----------+--------------------------------------------------------------
      Lib | .1464  .1786  .2022  .1813  .1837  .1963  .2199  .2221  .1904
      Mod | .5829  .5357  .4975  .4929  .5134  .5016  .4362  .4591  .5046
     Cons | .2707  .2858  .3003  .3258  .3029  .3021  .3439  .3188   .305
          | 
    Total |     1      1      1      1      1      1      1      1      1
-------------------------------------------------------------------------
Key: Column proportion

  Pearson:
    Uncorrected   chi2(14)        =   90.6470
    Design-based  F(13.60,  1.5e+05)=    5.6565   P = 0.0000
*/

*******************************************************************************

// ANES 2012 cumulative file
clear all

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

keep if inlist(VCF0004,1982,1984,1998,1992,1996,2000,2002,2004)
recode VCF0803 (1/3=1 "Lib") (4 9=2 "Mod") (5/7=3 "Cons") (else=.), gen(conserv)
svy: tab conserv VCF0004, col

/*
(running tabulate on estimation sample)

Number of strata =      1                         Number of obs   =     12,675
Number of PSUs   = 11,515                         Population size = 12,653.846
                                                  Design df       =     11,514

-------------------------------------------------------------------------
RECODE of |
VCF0803   |
(IDEOLOGY |
:         |
Liberal-C |
onservati |                 STUDY VARIABLE: Year of Study                
ve Scale) |  1982   1984   1992   1996   1998   2000   2002   2004  Total
----------+--------------------------------------------------------------
      Lib | .1464  .1786  .2022  .1813  .1837  .1963  .2199  .1877  .1875
      Mod | .5829  .5357  .4975  .4929  .5134  .5016  .4362  .5017  .5081
     Cons | .2707  .2858  .3003  .3258  .3029  .3021  .3439  .3106  .3044
          | 
    Total |     1      1      1      1      1      1      1      1      1
-------------------------------------------------------------------------
Key: Column proportion

  Pearson:
    Uncorrected   chi2(14)        =   79.4757
    Design-based  F(13.60,  1.6e+05)=    4.9729   P = 0.0000
*/

*******************************************************************************

//ANES 2020 cumulative file
clear all
use "anes_timeseries_cdf_stata_20220916.dta"
svyset VCF0006a [pweight=VCF0009z], vce(linearized)

keep if inlist(VCF0004,1982,1984,1998,1992,1996,2000,2002,2004)
recode VCF0803 (1/3=1 "Lib") (4 9=2 "Mod") (5/7=3 "Cons") (else=.), gen(conserv)
svy: tab conserv VCF0004, col

/*
(running tabulate on estimation sample)

Number of strata =      1                         Number of obs   =     12,675
Number of PSUs   = 11,515                         Population size = 12,653.846
                                                  Design df       =     11,514

-------------------------------------------------------------------------
RECODE of |
VCF0803   |
(Liberal- |
Conservat |
ive       |                         Year of Study                        
Scale)    |  1982   1984   1992   1996   1998   2000   2002   2004  Total
----------+--------------------------------------------------------------
      Lib | .1464  .1786  .2022  .1813  .1837  .1963  .2199  .1877  .1875
      Mod | .5829  .5357  .4975  .4929  .5134  .5016  .4362  .5017  .5081
     Cons | .2707  .2858  .3003  .3258  .3029  .3021  .3439  .3106  .3044
          | 
    Total |     1      1      1      1      1      1      1      1      1
-------------------------------------------------------------------------
Key: Column proportion

  Pearson:
    Uncorrected   chi2(14)        =   79.4757
    Design-based  F(13.60,  1.6e+05)=    4.9729   P = 0.0000
*/