~dricottone/replications

ref: eadd78ee3d07aba2f81377effb0387743b8c414f replications/AS04/Table 1.do -rw-r--r-- 2.5 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
clear all
cd "../data/anes"

use "anes_timeseries_cdf_stata_20220916.dta"
keep if inlist(VCF0004,1994,1996,1998,2000)
svyset VCF0006a [pweight=VCF0009z], vce(linearized)

recode VCF0302 (5=1 "Dem") (2 3 4 8 9=2 "Indep") (1=3 "Rep") (else=.), generate(party)

label variable party "Party ID"

/*
table VCF0302 party, missing
*/

recode VCF0702 (0 1=0 "Non") (2=1 "Voter") (else=.), generate(voter)
recode VCF0717 (0 1=0 "Non") (2=1 "Influencer") (else=.), generate(influencer)
recode VCF0720 (0 1=0 "Non") (2=1 "Influencer") (else=.), generate(displayer)
recode VCF0718 (0 1=0 "Non") (2=1 "Influencer") (else=.), generate(attender)
recode VCF0719 (0 1=0 "Non") (2=1 "Influencer") (else=.), generate(worker)
recode VCF0721 (0 1=0 "Non") (2=1 "Influencer") (else=.), generate(donor)

label variable voter "Voter?"
label variable influencer "(Try to) Influence others?"
label variable displayer "Display buttons/stickers?"
label variable attender "Attend rally/meeting?"
label variable worker "Work on campaign?"
label variable donor "Donate to campaign?"

/*
table VCF0702 voter, missing
table VCF0717 influencer, missing
table VCF0720 displayer, missing
table VCF0718 attender, missing
table VCF0719 worker, missing
table VCF0721 donor, missing
*/

egen activity = rowtotal(voter influencer displayer attender worker donor)
recode activity (0=0) (1=1) (2=2) (3 4 5 6=3 "3+"), generate(r_activity)

label variable activity "Count of activities"
label variable r_activity "Levels of activities"

/*
tab activity r_activity, missing
*/

generate partisan = voter & (influencer | displayer | attender | worker | donor)

label variable partisan "Partisan: voter and engaged in an activity"

/*
tab voter activity, missing
tab partisan voter, missing
tab partisan activity, missing
*/

// Activity - Voting
mean voter, over(party)
// Activity - Persuading others
mean influencer, over(party)
// Activity - Displaying button/stickers
mean displayer, over(party)
// Activity - Attending rally/meeting
mean attender, over(party)
// Activity - Working for party/candidate
mean worker, over(party)
// Activity - Contributing money
mean donor, over(party)

// Overall Activity Score
tab r_activity party, nofreq col
// Republican/3+ is off - 13.6 displayed as 13 instead of 14; probably to force percentages totaling to 100

// Active partisans
mean partisan, over(party)
// Independent is off - 21.0 displayed as 22 instead of 21

// Valid N
tab party