******************************************************************************************************************************* ******************************************************************************************************************************* * Documentation for * Monkey Cage post: Southern white support for the Confederate flag reflects Southern heritage, not just racial hate * Southern Focus Poll, South Survey, Fall 1994. See here: http://www.thearda.com/Archive/Files/Descriptions/SFPS94F.asp * L.J Zigerell * Stata version 11 ******************************************************************************************************************************* ******************************************************************************************************************************* * open the dataset * open dataset use "Southern Focus Poll, South Survey, Fall 1994.DTA", clear set more off ******************************************************************************************************************************* *** Keep only white respondents ******************************************************************************************************************************* tab race tab race, nol gen white = race recode white (2/5=0) tab race white keep if white==1 tab race white ******************************************************************************************************************************* *** Outcome variables ******************************************************************************************************************************* tab statecf tab statecf, nol gen official = statecf recode official (1=-2) (2=-1) (5=0) (3=1) (4=2) tab statecf official tab statecf di (123+106)/742 di (171+240)/742 tab displayf gen private = displayf recode private (1=-2) (2=-1) (5=0) (3=1) (4=2) tab displayf private ******************************************************************************************************************************* *** Heritage measures ******************************************************************************************************************************* tab battles tab battles, nol gen knowbat = battles recode knowbat (4=1) (3=2) tab battles knowbat tab civfight tab civfight, nol gen confedfam01 = 0 replace confedfam01 = 1 if civfight == 2 tab civfight confedfam01 gen confedfam01_incNorth = 0 replace confedfam01_incNorth = 1 if civfight == 2 | civfight == 4 tab civfight confedfam01_incNorth tab cwdmm tab cwdmm, nol gen history = cwdmm recode history (1=-2) (2=-1) (5=0) (3=1) (4=2) tab cwdmm history ******************************************************************************************************************************* *** Hate measure ******************************************************************************************************************************* tab segregat tab segregat, nol gen separ = segregat recode separ (1=-1) (2=1) (3=0) (4=0) tab segregat separ ******************************************************************************************************************************* *** Place variables on 0-to-1 scale ******************************************************************************************************************************* sum official gen official01 = (official+2)/4 sum official01 sum private gen private01 = (private+2)/4 sum private01 sum history gen history01 = (history+2)/4 sum history01 sum knowbat gen knowbat01 = (knowbat-1) sum knowbat01 sum separ gen separ01 = (separ+1)/2 sum separ01 sum official01 private01 history01 knowbat01 separ01 ******************************************************************************************************************************* *** Factor analysis ******************************************************************************************************************************* factor history01 knowbat01 confedfam01 separ01, pcf rotate ******************************************************************************************************************************* *** Regressions ******************************************************************************************************************************* svyset [pw=wtvars] svy, subpop(white): reg official01 history01 separ01 svy, subpop(white): reg official01 knowbat01 separ01 svy, subpop(white): reg official01 confedfam01 separ01 svy, subpop(white): reg official01 confedfam01_incNorth separ01 svy, subpop(white): reg official01 history01 knowbat01 confedfam01 separ01 svy, subpop(white): reg private01 history01 separ01 svy, subpop(white): reg private01 knowbat01 separ01 svy, subpop(white): reg private01 confedfam01 separ01 svy, subpop(white): reg private01 confedfam01_incNorth separ01 svy, subpop(white): reg private01 history01 knowbat01 confedfam01 separ01 tab southern gen southerner = 0 replace southerner = 1 if southern==1 tab southern southerner svy, subpop(southerner): reg official01 history01 confedfam01 knowbat01 separ01 svy, subpop(southerner): reg private01 history01 confedfam01 knowbat01 separ01 * predicting the heritage variables tab1 official01 private01 history01 knowbat01 separ01 confedfam01 svy, subpop(white): reg history01 knowbat01 confedfam01 separ01 svy, subpop(white): reg knowbat01 history01 confedfam01 separ01 svy, subpop(white): logit confedfam01 knowbat01 history01 separ01 * revised hate tab segregat tab segregat, nol gen separ2 = segregat recode separ2 (1=0) (2=1) (3=1) (4=.) tab segregat separ2 svyset [pw=wtvars] svy, subpop(white): reg official01 history01 separ2 svy, subpop(white): reg official01 knowbat01 separ2 svy, subpop(white): reg official01 confedfam01 separ2 svy, subpop(white): reg official01 history01 knowbat01 confedfam01 separ2 svy, subpop(white): reg private01 history01 separ2 svy, subpop(white): reg private01 knowbat01 separ2 svy, subpop(white): reg private01 confedfam01 separ2 svy, subpop(white): reg private01 history01 knowbat01 confedfam01 separ2 * extra heritage measure: remind tab flag gen remind = flag recode remind (1=-1) (2=1) (3=0) tab flag remind svy, subpop(white): reg official01 remind separ2 svy, subpop(white): reg private01 remind separ2