-
Notifications
You must be signed in to change notification settings - Fork 1
/
variate_checks
69 lines (51 loc) · 1.5 KB
/
variate_checks
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
*** Comparing means on your key variable among various demographic groups
*** the ID Scales:
* id_race_scale
* id_gender_scale
* id_PID_scale
* id_religion_scale and/or id_religimp_scale
* id_geo_scale
* id_orientation_scale
*** We need to check to see if demographics influence Strength of ID response:
*** race | Race
tab race
oneway id_race_scale race, t
*** Q8 | gender * 1=women 0=men
tab Q8
generate women = .
replace women = 1 if (Q8 == 2)
replace women = 1 if (Q8 == 4)
replace women = 0 if (Q8 == 1)
replace women = 0 if (Q8 == 3)
tab women
ttest id_gender_scale, by (women)
*** pid7 | Party ID * 1=Dems 2=Reps 3=Ind+Not Sure
tab pid7
generate pidsimple = .
replace pidsimple = 1 if (pid7==1)|(pid7==2)|(pid7==3)
replace pidsimple = 2 if (pid7==5)|(pid7==6)|(pid7==7)
replace pidsimple = 3 if (pid7==4)|(pid7==8)
tab pidsimple
oneway id_PID_scale pidsimple, t bon sid sch
*** religpew | Religion
tab religpew
oneway id_religion_scale religpew, t
*** Q7 | Urban density
tab Q7
generate geo = Q7
oneway id_geo_scale geo, t
*** Q9 | Sexual Orientation
tab Q9
generate orientation = Q9
replace orientation = . if (Q9==4)|(Q9==5)|(Q9==8)
tab orientation
oneway id_orientation_scale orientation, t
*** Then we can check to see if the same demographics affect Affective Polarization
oneway AP_th race, tab
oneway AP_th women, tab
oneway AP_th pidsimple, tab
oneway AP_th religpew, tab
oneway AP_th geo, tab
oneway AP_th orientation, tab
*** this is the fine details:
twoway lfitci id_PID_scale women, by(pidsimple)