STATA code for RELTRAD
* The following codes Jacobite Apostolics as Orthodox-Christian in GSS categorization*
replace relig=10 if other==183
* The following code breaks down religious groups by Protestant, Catholic,*
* etc.*
gen xaffil=0
recode xaffil 0=1 if inlist(relig, 1,11,13)
recode xaffil 0=4 if relig==2
recode xaffil 0=5 if relig==3
recode xaffil 0=9 if relig==4
recode xaffil 0=6 if inlist(relig,5, 6,7,8,9,10,12)
label def xaffil 1 prot 4 cath 5 jew 6 other 9 nonaf
label values xaffil xaffil
* The following code breaks down religious groups by evangelicals, black*
* Protestants, mainline, liberal and conservative nontraditional, *
* and Protestant nondenomination/no denomination.*
* Black Protestants*
gen xbp=other
recode xbp 7 14 15 21 37 38 56 78 79 85 86 87 88 98 103 104 /*
*/128 133 151 168 169 175 179 186=1 *=0
recode xbp 0=1 if denom==12
recode xbp 0=1 if denom==13
recode xbp 0=1 if denom==20
recode xbp 0=1 if denom==21
gen bl=race
recode bl 2=1 *=0
gen bldenom=denom*bl
recode xbp 0=1 if bldenom==23
recode xbp 0=1 if bldenom==28
recode xbp 0=1 if bldenom==18
recode xbp 0=1 if bldenom==15
recode xbp 0=1 if bldenom==10
recode xbp 0=1 if bldenom==11
recode xbp 0=1 if bldenom==14
gen blother=other*bl
recode xbp 0=1 if blother==93
* Evangelical Protestants*
gen xev=other
recode xev 2 3 5 6 9 10 12 13 16 18 20 22 24 26 27 28 31 32 34 35 36 /*
*/39 41 42 43 45 47 51 52 53 55 57 63 65 66 67 68 69 76 77 83 84 90 /*
*/91 92 94 97 100 101 102 106 107 108 109 110 111 112 115 117 /*
*/118 120 121 122 124 125 127 129 131 132 134 135 137 138 139 /*
*/140 143 144 146 154 155 156 158 159 165 167 170 171 172 /*
*/173 174 176 177 178 180 181 182 184 185 187 191 198 /*
*/201 205 207=1 *=0
replace xev=1 if denom==32
replace xev=1 if denom==33
replace xev=1 if denom==34
replace xev=1 if denom==42
gen wh=race
recode wh 1=1 2=0 3=1
gen whdenom=denom*wh
replace xev=1 if whdenom==23
replace xev=1 if whdenom==18
replace xev=1 if whdenom==15
replace xev=1 if whdenom==10
replace xev=1 if whdenom==14
gen whother=other*wh
replace xev=1 if whother==93
replace xev=0 if xbp==1
* Mainline Protestants*
gen xml=other
recode xml 1 8 19 23 25 40 44 46 48 49 50 54 70 71 72 73 81 89 96 /*
*/ 99 105 119 148 150 153 160 166 188=1 *=0
recode xml 0=1 if denom==22
recode xml 0=1 if denom==30
recode xml 0=1 if denom==31
recode xml 0=1 if denom==35
recode xml 0=1 if denom==38
recode xml 0=1 if denom==40
recode xml 0=1 if denom==41
recode xml 0=1 if denom==43
recode xml 0=1 if denom==48
recode xml 0=1 if denom==50
recode xml 0=1 if whdenom==11
recode xml 0=1 if whdenom==28
* Catholics*
gen xcath=other
recode xcath 123 126 149=1 *=0
recode xcath 0=1 if xaffil==4
* Jews*
gen xjew=0
recode xjew 0=1 if xaffil==5
* Adherents of other religions.*
gen xother=other
*following puts conservative and liberal nontraditionals into other*
recode xother 33 58 59 60 61 62 64 113 114 116 130 145 157 162 /*
*/ 206 11 17 29 30 74 75 80 82 95 136 141 142 152 163 164 =1 *=0
recode xother 0=1 if xaffil==6 & xev~=1
* Unaffiliateds/Nonaffiliateds.*
gen xnonaff=xaffil
recode xnonaff 9=1 *=0
* NOTE: THE FOLLOWING DEALS WITH NO-DENOM AND *
* NON-DENOM PROTESTANTS.*
gen xprotdk=0
recode xprotdk 0=1 if denom==70 & inlist(attend,4,5,6,7,8)
recode xev 0=1 if xprotdk==1
* Following does RELTRAD.*
gen reltrad=0
replace reltrad=1 if xev==1
replace reltrad=2 if xml==1
replace reltrad=3 if xbp==1
replace reltrad=4 if xcath==1
replace reltrad=5 if xjew==1
replace reltrad=6 if xother==1
replace reltrad=7 if xnonaf==1
recode reltrad 0=.
*Following drops responses that could not be accurately placed according to information in the GSS*
replace reltrad=. if other==161
replace reltrad=. if other==185
replace reltrad=. if other==191
replace reltrad=. if other==198
replace reltrad=. if other==205