*******************************************************************************************************************************

* Documentation for Reproduction of

* Predicting sex differences in white supremacist beliefs [ANES]

* L.J Zigerell

* Stata

*******************************************************************************************************************************

*******************************************************************************************************************************

set mem 500m

use13 "anes_timeseries_cdf.dta", clear

set more off

*******************************************************************************************************************************

*** Racial groups

*******************************************************************************************************************************

tab VCF0105a

gen white = VCF0105a

recode white (2/17=0) (9=.)

tab VCF0105a white

*******************************************************************************************************************************

*** White and black affect

*******************************************************************************************************************************

tab VCF0207

gen thermoW = VCF0207

recode thermoW (98 99=.)

sum thermoW

tab VCF0206

gen thermoB = VCF0206

recode thermoB (98 99=.)

sum thermoB

tab VCF0217

gen thermoH = VCF0217

recode thermoH (98 99=.)

sum thermoH

tab VCF0227

gen thermoA = VCF0227

recode thermoA (98 99=.)

sum thermoA

gen prowhite = 0 if thermoW !=. & thermoB !=. & thermoH !=. & thermoA !=.

replace prowhite = 1 if (thermoWthermoB) & (thermoWthermoH) & (thermoWthermoA) & thermoW !=. & thermoB !=. & thermoH !=. & thermoA !=.

tab prowhite if white==1

tab prowhite VCF0004 if white==1

gen superprowhite = 0 if thermoW !=. & thermoB !=. & thermoH !=. & thermoA !=.

replace superprowhite = 1 if thermoW > 50 & thermoB < 50 & thermoH < 50 & thermoA < 50 & thermoW !=. & thermoB !=. & thermoH !=. & thermoA !=.

tab superprowhite if white==1

tab superprowhite VCF0004 if white==1

*******************************************************************************************************************************

*** Female

*******************************************************************************************************************************

tab VCF0104

gen female = VCF0104

recode female (0=.) (1=0) (2=1)

tab VCF0104 female

*******************************************************************************************************************************

*** Regressions

*******************************************************************************************************************************

tab prowhite female if white==1, column

tab superprowhite female if white==1, column

gen weight = VCF0009z

svyset [pw=weight]

svy, subpop(white): tab prowhite female, column

svy, subpop(white): reg prowhite female

svy, subpop(white): tab superprowhite female, column

svy, subpop(white): reg superprowhite female

*******************************************************************************************************************************

* Documentation for Reproduction of

* Predicting sex differences in white supremacist beliefs [GSS]

* L.J Zigerell

* Stata

*******************************************************************************************************************************

*******************************************************************************************************************************

set mem 500m

set maxvar 6000

use "GSS7214_R1.DTA", clear

set more off

* drop black oversample cases

tab sample

drop if sample==4 | sample==5 | sample==7

*************************************************************************************************

*************************************************************************************************

* race

tab race, nol

gen white = race

recode white (2 3=0)

tab race white

*************************************************************************************************

*************************************************************************************************

* female

tab sex

tab sex, nol

gen female = sex - 1

tab sex female

*************************************************************************************************

*************************************************************************************************

* weighting

svyset vpsu [pw=wtssall], strata(vstrat) singleunit(centered)

*************************************************************************************************

*************************************************************************************************

* inborn race differences

tab racdif2

tab racdif2, nol mi

gen rd_inborn = racdif2

recode rd_inborn (2 .d .n =0) (.i = .)

tab racdif2 rd_inborn, mi

tab rd_inborn if white==1

tab year if rd_inborn!=., mi

tab year racdif2, mi

tab rd_inborn female if white==1, column

svy: tab rd_inborn female if white==1, column

svy, subpop(white): reg rd_inborn female

*************************************************************************************************

*************************************************************************************************

* interracial marriage

tab1 marwht marblk marhisp marasian

recode marwht marblk marhisp marasian (.i =.)

gen imarriage = 0 if marwht !=. & marblk !=. & marhisp !=. & marasian !=.

replace imarriage = 1 if (marwht>=1 & marwht<=2) & (marblk==4 | marblk==5) & (marhisp==4 | marblk==5) & (marasian==4 | marasian==5)

tab imarriage year if white==1

tab imarriage if white==1

tab imarriage female if white==1, column

svy: tab imarriage female if white==1, column

svy, subpop(white): reg imarriage female

*************************************************************************************************

*************************************************************************************************

* interracial marriage + closeness to whites

tab closewht

tab closewht imarriage, mi nol

gen closewhite01 = closewht

recode closewhite01 (1/8 .d .n=0) (9=1) (.i=.)

gen imcw = 0 if imarriage !=. & closewhite01 !=.

replace imcw = 1 if imarriage==1 & closewhite01==1

tab imcw if white==1

tab imcw year if white==1

tab imcw female if white==1, column

svy: tab imcw female if white==1, column

svy, subpop(white): reg imcw female

*************************************************************************************************

*************************************************************************************************

* whites first in jobs

tab racjob

tab year racjob

gen wf = racjob - 1

tab wf if white==1

tab wf female if white==1

tab wf female if white==1, column

* svy, subpop(white): reg wf female // Doesn't work

reg wf female if white==1

*************************************************************************************************

*************************************************************************************************

* not integrate

tab racchng

tab year racchng

gen notintegrate = racchng

tab notintegrate

recode notintegrate (1 3=0) (2=1)

tab notintegrate racchng

tab notintegrate female if white==1, column

svy: tab notintegrate female if white==1, column

svy, subpop(white): reg notintegrate female

*************************************************************************************************

*************************************************************************************************

* housing

tab1 neieth1-neieth14

tab1 neieth1-neieth14, mi

tab neieth1, nol mi

tab neieth1 neieth14 if white==1, mi

di 48240-47132

gen nei_wa = 0 if neieth1!=.i & neieth2!=.i & neieth3!=.i & neieth4!=.i & neieth5!=.i & neieth6!=.i & neieth7!=.i & neieth8!=.i & neieth9!=.i & neieth10!=.i & neieth11!=.i & neieth12!=.i & neieth13!=.i & neieth14!=.i

tab nei_wa if white==1

replace nei_wa = 1 if neieth1==4 & neieth2==4 & neieth3==4 & neieth4==4 & neieth5==4 & neieth6==4 & neieth7==4 & neieth8==4 & neieth9==4 & neieth10==4 & neieth11==4 & neieth12==4 & neieth13==4 & neieth14==4

tab nei_wa if white==1

tab nei_wa year if white==1

tab nei_wa female if white==1, column

svy: tab nei_wa female if white==1, column

svy, subpop(white): reg nei_wa female