-
Notifications
You must be signed in to change notification settings - Fork 1
/
recode_thermos
90 lines (65 loc) · 2.35 KB
/
recode_thermos
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
*** run scales_2020_3Qs.do before this file
*** creating affective polarization scales using thermometers. Hopefully.
***
*** pid3 | 3-point party ID
*** 1=Dem, 2=Rep, 3=Ind, 4=Other, 5=Not Sure
*** pid7 | 7-point party ID
*** 1-7=Strong Dem to Strong Rep, 4=Independent, 8=Not Sure
*** Q44 | rate Dems thermometer
*** Q45 | rate Reps thermometer
tab1 Q44 Q45
generate demfeelth = .
replace demfeelth = Q44
replace demfeelth = . if (Q44 == 999)
tab demfeelth
generate demfeelth_scale=demfeelth/100
tab demfeelth_scale
generate repfeelth = .
replace repfeelth = Q45
replace repfeelth = . if (Q45 == 999)
tab repfeelth
generate repfeelth_scale=repfeelth/100
tab repfeelth_scale
*** subtracting thermometers for Standard Affective Polarization
generate AP_th = demfeelth_scale - repfeelth_scale
tab AP_th
histogram AP_th
*** create out-party thermometers by pid7
*** Dems = 1,2,3
*** Reps = 5,6,7
*** Ind + Not Sure = 4,8
tab pid7
*** how Dems rate Reps
generate dem_AP_repth = .
replace dem_AP_repth = repfeelth_scale if (pid7 == 1)|(pid7 == 2)|(pid7 == 3)
tab dem_AP_repth
histogram dem_AP_repth
*** how Reps rate Dems
generate rep_AP_demth = .
replace rep_AP_demth = demfeelth_scale if (pid7 == 5)|(pid7 == 6)|(pid7 == 7)
tab rep_AP_demth
histogram rep_AP_demth
*** how Independent / Not Sure rate Dems
generate ind_AP_demth = .
replace ind_AP_demth = demfeelth_scale if (pid7 == 4)|(pid7 == 8)
tab ind_AP_demth
histogram ind_AP_demth
*** how Independent / Not Sure rate Reps
generate ind_AP_repth = .
replace ind_AP_repth = repfeelth_scale if (pid7 == 4)|(pid7 == 8)
tab ind_AP_repth
histogram ind_AP_repth
*** how Independent / Not Sure rate the parties
generate ind_AP_partyth = .
replace ind_AP_partyth = (ind_AP_demth + ind_AP_repth)/2
tab ind_AP_partyth
histogram ind_AP_partyth
***
*** MAKE SURE TO RUN scales_2020_3Qs.do before this file
***
pwcorr threeQs AP_th dem_AP_repth rep_AP_demth ind_AP_partyth ind_AP_demth ind_AP_repth, sig
*** running correlations for each individual Q has some interesting stuff:
pwcorr unpatriotic_scale AP_th dem_AP_repth rep_AP_demth ind_AP_partyth ind_AP_demth ind_AP_repth, sig
pwcorr openminded_scale AP_th dem_AP_repth rep_AP_demth ind_AP_partyth ind_AP_demth ind_AP_repth, sig
pwcorr smart_scale AP_th dem_AP_repth rep_AP_demth ind_AP_partyth ind_AP_demth ind_AP_repth, sig
alpha AP_th threeQs unpatriotic_scale, std item detail