*This do file requires the cumulative NES 1948-2002 File. *Extract Variables of Interest keep VCF0809 VCF0808 VCF0004 VCF0102 VCF0106 VCF0114 VCF0140 VCF0301 VCF0656 VCF0104 VCF0113 *Rename some of the variables rename VCF0004 year rename VCF0102 age rename VCF0106 race rename VCF0114 income rename VCF0140 educ rename VCF0301 pid rename VCF0656 tindex rename VCF0104 gender rename VCF0113 south *Call to Merge Aggregate Data with Cross Sectional Data *Note merge.dta must also be sorted by year sort year merge year using e:\merge.dta tab _merge *Generate Ideology Proxy Measure drop if VCF0808==9 drop if VCF0809==9 egen jobs1=std(VCF0808) egen jobs2=std(VCF0809) gen jobs3=jobs2 replace jobs3=jobs1 if year==1956 replace jobs3=jobs1 if year==1958 replace jobs3=jobs1 if year==1960 replace jobs3=jobs1 if year==1964 replace jobs3=jobs1 if year==1968 tabstat jobs3,by(year) drop jobs1 jobs2 rename south south1 recode south1 (1=1 "South") (2=0 "Non-south"), into(south) drop south1 rename gender gender1 recode gender1 (1=1 "Male") (2=0 "Female"), into(gender) drop gender1 rename race race1 recode race1 (1=0 "White") (2=1 "Black") (3=.), into(race) drop race1 drop if pid==9 *Party Identification Dummies For OLS Models recode pid (1=1 "Strong Dem") (2/7=0 "Other"), into(str_dem) recode pid (2=1 "Weak Dem") (else=0 "Other"), into(wk_dem) recode pid (3=1 "Ind Dem") (else=0 "Other"), into(ind_dem) recode pid (4=1 "Ind") (else=0 "Other"), into(ind) recode pid (5=1 "Ind Rep") (else=0 "Other"), into(ind_rep) recode pid (6=1 "Weak Rep") (else=0 "Other"), into(wk_rep) recode pid (7=1 "Strong Rep") (else=0 "Other"), into(str_rep) *Party Identification Dummy For Difference of Means Test recode pid (1=1/3 "Democrats") (0=5/7 "Republicans") (4=.), into(dems_rep) *Presidential Party Measure * 1 equals your party controls that institution. gen prez=. replace prez=1 if pid>=4 & year==1958 replace prez=0 if pid<=3 & year==1958 replace prez=0 if pid>=4 & year==1960 replace prez=1 if pid<=3 & year>=1960 & year<=1968 replace prez=1 if pid>=4 & year>=1970 & year<=1976 replace prez=0 if pid<=3 & year>=1970 & year<=1976 replace prez=0 if pid>=4 & year>=1978 & year<=1980 replace prez=1 if pid<=3 & year>=1978 & year<=1980 replace prez=1 if pid>=4 & year>=1982 & year<=1992 replace prez=0 if pid<=3 & year>=1982 & year<=1992 replace prez=0 if pid>=4 & year>=1994 & year<2000 replace prez=1 if pid<=3 & year>=1994 & year<2000 replace prez=1 if pid>=4 & year==2000 replace prez=0 if pid<=3 & year==2000 *Senate gen senate=. replace senate=1 if pid<=3 & year>=1958 & year<=1980 replace senate=0 if pid>=4 & year>=1958 & year<=1980 replace senate=0 if pid<=3 & year>=1982 & year<=1984 replace senate=1 if pid>=4 & year>=1982 & year<=1984 replace senate=1 if pid<=3 & year>=1986 & year<=1994 replace senate=0 if pid>=4 & year>=1986 & year<=1994 replace senate=0 if pid<=3 & year>=1996 replace senate=1 if pid>=4 & year>=1996 *House gen house=. replace house=1 if pid<=3 & year>=1958 & year<=1994 replace house=0 if pid>=4 & year>=1958 & year<=1994 replace house=0 if pid<=3 & year>=1996 replace house=1 if pid>=4 & year>=1996 *Difference of Means Tests of Table 1 ttest tindex, by(dems_rep) *Democratic (Expected Negative Difference) ttest tindex if year<=1968, by(dems_rep) *Republican (Expected Positive Difference) ttest tindex if year>=1970 & year<=1976, by(dems_rep) *Democratic (Expected Negative Difference) ttest tindex if year>=1978 & year<=1980, by(dems_rep) *Republican (Expected Positive Difference) ttest tindex if year>=1982 & year<=1992, by(dems_rep) *Democratic (Expected Negative Difference) ttest tindex if year>=1994, by(dems_rep) *Models in Table 2 regress tindex prez senate house regress tindex prez senate house ics prap, ro regress tindex prez senate house str_dem wk_dem ind_dem ind_rep wk_rep str_rep jobs3 age educ income race south ics prap, ro