-
Notifications
You must be signed in to change notification settings - Fork 1
/
recode_id_scales
112 lines (79 loc) · 2.65 KB
/
recode_id_scales
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
*** importance of identity scales:
*** Q97 | Importance of race
*** Q98 | Importance of gender
*** Q99 | Importance of party id
*** Q100 | Importance of religious group
*** Q101 | Importance of geo region
*** Q102 | Importance of sexual orientation
tab1 Q97 Q98 Q99 Q100 Q101 Q102
generate id_race = .
replace id_race = 4 if (Q97==1)
replace id_race = 3 if (Q97==2)
replace id_race = 2 if (Q97==3)
replace id_race = 1 if (Q97==4)
replace id_race = 0 if (Q97==5)
tab id_race
generate id_race_scale = id_race/4
tab id_race_scale
generate id_gender = .
replace id_gender = 4 if (Q98==1)
replace id_gender = 3 if (Q98==2)
replace id_gender = 2 if (Q98==3)
replace id_gender = 1 if (Q98==4)
replace id_gender = 0 if (Q98==5)
tab id_gender
generate id_gender_scale = id_gender/4
tab id_gender_scale
generate id_PID = .
replace id_PID = 4 if (Q99==1)
replace id_PID = 3 if (Q99==2)
replace id_PID = 2 if (Q99==3)
replace id_PID = 1 if (Q99==4)
replace id_PID = 0 if (Q99==5)
tab id_PID
generate id_PID_scale = id_PID/4
tab id_PID_scale
generate id_religion = .
replace id_religion = 4 if (Q100==1)
replace id_religion = 3 if (Q100==2)
replace id_religion = 2 if (Q100==3)
replace id_religion = 1 if (Q100==4)
replace id_religion = 0 if (Q100==5)
tab id_religion
generate id_religion_scale = id_religion/4
tab id_religion_scale
generate id_geo = .
replace id_geo = 4 if (Q101==1)
replace id_geo = 3 if (Q101==2)
replace id_geo = 2 if (Q101==3)
replace id_geo = 1 if (Q101==4)
replace id_geo = 0 if (Q101==5)
tab id_geo
generate id_geo_scale = id_geo/4
tab id_geo_scale
generate id_orientation = .
replace id_orientation = 4 if (Q102==1)
replace id_orientation = 3 if (Q102==2)
replace id_orientation = 2 if (Q102==3)
replace id_orientation = 1 if (Q102==4)
replace id_orientation = 0 if (Q102==5)
tab id_orientation
generate id_orientation_scale = id_orientation/4
tab id_orientation_scale
generate id_religimp = .
replace id_religimp = 3 if (pew_religimp==1)
replace id_religimp = 2 if (pew_religimp==2)
replace id_religimp = 1 if (pew_religimp==3)
replace id_religimp = 0 if (pew_religimp==4)
tab id_religimp
generate id_religimp_scale = id_religimp/3
tab id_religimp_scale
*** Check correlation between our religion Q and the PEW religion Q:
pwcorr id_religion id_religimp, sig
********** Grouping the ID Qs together for no real reason:
*** Check all our own id Qs:
alpha id_race_scale id_gender_scale id_PID_scale id_religion_scale id_geo_scale id_orientation_scale, std item detail
*** generating the ID_SCALE
generate ID_SCALE=(id_race_scale + id_gender_scale + id_PID_scale + id_religion_scale + id_geo_scale + id_orientation_scale)/6
tab ID_SCALE
histogram ID_SCALE, percent