/* DOUGLAS HIBBS THE FOLLOWING "DO" FILE GENERATES ALL RESULS REPORTED IN MY FEBRUARY 29 2012 WEB POST ON THE 'BREAD AND PEACE' MODEL'S IMPLICATIONS FOR THE 2012 PRESIDENTIAL ELECTION. clear clear matrix */ version 11.2 cd "/Users/douglashibbs/Documents/myfiles2011/presvoteUS-2011-2008/PresElection2012" use hibbs-pres-election2012-webpost-29February2012.dta save hibbs-pres-election2012-webpost-29February2012_temp.dta describe, fullnames sort qdates tsset qdates, quarterly gen cpi = cpi_u_8284 gen r = dpi_pc/(cpi/100) gen lnr = log(r) gen dlnr = (lnr-L1.lnr)*400 /* BREAD AND PEACE MODEL analysis, nonlinear ("nl") estimation. Note that in the case of wars inherited from the oppoistion pary, the model assumes Presidents get a full term (4 year - 16 quarter) "grace period" before Fatalities begin to depress votes for the incumbent party, which mainly affects the 1972 election (Nixon having inherited Vietnam from Johnson). See Hibbs, Public Choice 2000, 104:149Ð180, Appendix, for evidence. */ nl ( presvote = {b0} + {bdlnr}*( (1.0*wtq16*dlnr+{g}*L1.dlnr /// +{g}^2*L2.dlnr+{g}^3*L3.dlnr+{g}^4*L4.dlnr+{g}^5*L5.dlnr /// +{g}^6*L6.dlnr +{g}^7*L7.dlnr+{g}^8*L8.dlnr+{g}^9*L9.dlnr /// +{g}^10*L10.dlnr+{g}^11*L11.dlnr /// +{g}^12*L12.dlnr+{g}^13*L13.dlnr+{g}^14*L14.dlnr) / (1.0*wtq16+{g} /// +{g}^2+{g}^3+{g}^4+{g}^5+{g}^6+{g}^7+{g}^8+{g}^9+{g}^10+{g}^11 /// +{g}^12+{g}^13+{g}^14) ) + {bkia}*Fatalities ) /// if year>1948,variables(presvote dlnr wtq16 Fatalities) /// initial(b0 45 g 0.95 bdlnr 4 bkia -0.1) iterate(500) nolog predict vhat if e(sample), yhat predict error if e(sample), residuals matrix list e(b) matrix b_BP = e(b) gen b0 = b_BP[1,1] display b0 gen bdlnr = b_BP[1,2] display bdlnr gen g = b_BP[1,3] display g gen bkia = b_BP[1,4] display bkia /* generate regression input and output variables for graph. Rbar is the weighted average of per capita real income growth rates using the weight parameter estimate "g"~0.9 obtained above. */ gen Rbar = (1.0*wtq16*dlnr+g*L1.dlnr+g^2*L2.dlnr+g^3*L3.dlnr+g^4*L4.dlnr+g^5*L5.dlnr+g^6*L6.dlnr+g^7*L7.dlnr+g^8*L8.dlnr+g^9*L9.dlnr /// +g^10*L10.dlnr+g^11*L11.dlnr+g^12*L12.dlnr+g^13*L13.dlnr+g^14*L14.dlnr) / (1.0*wtq16+g+g^2+g^3+g^4+g^5+g^6+g^7+g^8+g^9+g^10+g^11+g^12+g^13+g^14) /// if preselectq==1 gen Rbar_effect = bdlnr*Rbar if preselectq==1 gen Fatalities_effect = bkia*Fatalities if preselectq==1 format presvote vhat error Rbar Rbar_effect Fatalities Fatalities_effect %9.1f list candidates year presvote vhat error Rbar Rbar_effect Fatalities Fatalities_effect if preselectq==1&year!=2012, clean noobs /* Note that OLS estimation of the Bread and Peace Model using the Rbar variable created above and the Fatalities variable returns the estimates equivalend to nl estimates of bread and peace effects: */ reg presvote Rbar Fatalities /* BREAD AND PEACE GRAPH COMBINING REAL INCOME GROWTH AND FATALITIES TO 1 DIMENSION, 1952-2008 */ gen RbarKia = bdlnr*Rbar+bkia*Fatalities gen vote_no526808 = presvote - bkia*Fatalities replace vote_no526808 =. if year==1952 | year==1968 | year==2008 gen vhat_no526808 = vhat - bkia*Fatalities replace vhat_no526808 =. if year==1952 | year==1968 | year==2008 gen year_no526808 = year replace year_no526808 =. if year==1952 | year==1968 | year==2008 gen vote526808 = presvote if year==1952 | year==1968 | year==2008 gen pos = 3 replace pos = 2 if year==1956 replace pos = 4 if year==1996 replace pos = 1 if year==2000 replace pos = 11 if year==1988 replace pos = 12 if year==1960 replace pos = 12 if year==2008 replace pos = 1 if year==1980 replace pos = 12 if year==1964 replace pos = 2 if year==2004 sort qdates graph twoway connected vote_no526808 vhat vote526808 RbarKia, /// msymbol(O i O) /// connect(i l i) lcolor(white blue) lwidth(none vthick) /// mlabel(year_no526808) xsize(6.2) ysize(4.5) mlabvposition(pos) /// title("{bf:Bread and Peace Voting in US Presidential Elections 1952-2008}" , /// tstyle(size(medlarge)) ) /// ytitle("Incumbent share of two-party vote (%)", /// margin(medsmall) size(medium) ) /// xtitle("Real income growth and military fatalities combined", /// margin(small) size(medium) ) /// xlabel(-2(1)16) msize(large large large) /// ylabel(40(5)65, glwidth(thin) gstyle(dot) glcolor(gs1) ) /// legend(off) /// mfcolor(black black red) mcolor(black black red) msize(3 3 3) /// text(44.7 -.95 "1952", place(s) size(small) ) /// text(49.3 3.4 " " "1968", place(s) size(small) ) /// text(46.3 1.2 "2008", place(s) size(small) ) /// graphregion(fcolor(white) margin(zero) ) /// note("Combination of real growth and fatalities weights each variable by its estimated coefficient." /// "Estimated effects of fatalities on vote shares: -0.7% in 2008 (Iraq), -7.4% in 1968 (Vietnam)," /// "-9.7% in 1952 (Korea); negligible in 1964,1976, 2004, and null in other years." /// "{it:Source: www.douglas-hibbs.com October 27 2011}", /// size(small) margin(medsmall) justification(left) ) /* BREAD AND PEACE GRAPH SHOWING THE MAIN FATLALITIES-INDUCED DEVIATIONS FROM THE REAL INCOME GROWTH PREDICTION LINE, 1952-2008 */ gen presvote_nowar = presvote - bkia*Fatalities replace presvote_nowar=. if year==1952 | year==1968 | year==2008 gen pvhat_nowar = vhat - bkia*Fatalities replace pvhat_nowar=. if year==1952 | year==1968 | year==2008 gen year_nowar = year replace year_nowar = . if year==1952 | year==1968 | year==2008 replace pos = 1 if year==1956 replace pos = 4 if year ==1996 replace pos = 1 if year==2000 replace pos = 12 if year==1960 replace pos = 12 if year==1964 replace pos=3 if year==1988 replace pos=2 if year==2004 replace pos=2 if year==1976 replace pos=1 if year==1980 replace pos=1 if year==1992 graph twoway connected presvote_nowar pvhat_nowar vote526808 Rbar, /// msymbol(O i O) /// connect(i l i) lcolor(white blue) lwidth(none vthick) /// mlabel(year_nowar) xsize(6.2) ysize(4.5) mlabvposition(pos) /// title("{bf:Bread and Peace Voting in US Presidential Elections 1952-2008}" , /// tstyle(size(medlarge)) ) /// ytitle("Incumbent share of two-party vote (%)", /// margin(small) size(medium)) /// xtitle("Weighted-average per capita real income growth over the term (%)", /// margin(small) size(medium)) /// xlabel(-.5(.5)4.5) msize(large large large) /// ylabel(40(5)65, glwidth(thin) gstyle(dot) glcolor(gs1) ) /// legend(off) /// mfcolor(black black red) mcolor(black black red) msize(3 3 3) /// text(44.6 2.4 " 1952 Korea", place(se) size(small)) /// text(49.6 3.0 " 1968 Vietnam", place(se) size(small)) /// text(46.3 0.4 " " " 2008 Iraq", place(se) size(small)) /// graphregion(fcolor(white) margin(zero) ) /// note("Regression line and war effects computed from Bread and Peace equation estimates." /// "{it:Source: www.douglas-hibbs.com October 27 2011}", /// size(small) margin(medsmall) justification(left) ) * OBAMA STATS AND 'NOTIONAL' VOTE PREDICTION AS OF 2012:Q4 USING THE BEA NOMINAL PER CAPITA DISPOSABLE PERSONAL INCOME DATA POSTED FEB. 29 2012. gen kiaafghan_permil = (kia_afghan/pop1000s)*1000 if qcount>248 gen cum_kia_Obama = sum(kia_afghan) if qcount>248 gen cum_kiaafghan_permil = sum(kiaafghan_permil) if qcount>248 list qcount year quarter kia_afghan cum_kia_Obama cum_kiaafghan_permil if qcount>248 gen Fatalities11q4 = 3.980764 if qcount==260 gen Rbar11q4 = /// (1.0*dlnr+g*L1.dlnr /// +g^2*L2.dlnr+g^3*L3.dlnr+g^4*L4.dlnr /// +g^5*L5.dlnr+g^6*L6.dlnr /// +g^7*L7.dlnr+g^8*L8.dlnr+g^9*L9.dlnr) / (1.0+g /// +g^2+g^3+g^4+g^5+g^6+ g^7+g^8+g^9) list qcount year quarter Rbar11q4 Fatalities11q4 if qcount>260 replace Rbar11q4 = -.0015143 if qcount==264 replace Fatalities11q4 = 3.980764 if qcount==264 gen vhat11q4 = b0 + bdlnr*Rbar11q4 + bkia*Fatalities11q4 list vhat11q4 if qcount==264 gen RbarKia11q4 = bdlnr*Rbar11q4 + bkia*Fatalities11q4 list qcount year quarter RbarKia11q4 vhat11q4 if qcount>248 list qcount qdates RbarKia Rbar Fatalities Rbar11q4 Fatalities11q4 RbarKia11q4 vhat11q4 if preselectq==1 replace RbarKia = -.2062369 if qcount==264 display (45.7 + 3.6*(0) - 0.05*4.0 ) display (b0+bdlnr*(-.0015143) +bkia*( 3.980764) ) /* GRAPH OF NOTIONAL PREDICTION OF OBAMA VOTE SHARE AT CONDITIONS AS OF 2011:q4 GIVEN BEA OCT. 27 2011 DATA */ replace pos = 2 if year==1956 replace pos = 4 if year==1996 replace pos = 12 if year==2000 replace pos = 11 if year==1988 replace pos = 12 if year==1960 replace pos = 11 if year==2008 replace pos = 11 if year==1980 replace pos = 6 if year==1968 replace pos = 12 if year==1952 replace pos = 1 if year==1964 replace pos = 3 if year==1992 sort qdates graph twoway connected presvote vhat vhat11q4 RbarKia, /// msymbol(O i ) /// connect(i l ) lcolor(white blue) lwidth(none vthick) /// mlabel(year) mlabvposition(pos) aspectratio(.5 ) /// title("{bf:Bread and Peace Voting in Presidential Elections 1952-2012}",tstyle(size(medlarge)) ) /// subtitle("{bf:2012 Obama prediction based on conditions through 2011:q4}" " ",tstyle(size(medsmall)) ) /// ytitle("Incumbent share of two-party vote (%)", /// margin(medsmall) size(medium) ) /// xtitle("Real income growth and military fatalities combined", /// margin(small) size(medium) ) /// xlabel(-2(1)16) msize(large) /// ylabel(40(5)65, glwidth(thin) gstyle(dot) glcolor(gs1) ) /// legend(off) /// mfcolor(black black red) mcolor(black black red) msize(3 3 3 ) /// text(45.52 -.2062369 " ""{it: 2012 notional prediction for Obama: 45.5%}", /// place(s) size(small) ) /// graphregion(fcolor(white) margin(zero) ) /// note("Combination of real growth and fatalities weights each variable by its estimated coefficient." /// "Estimated effects of fatalities on vote shares: -0.7% in 2008 (Iraq), -7.4% in 1968 (Vietnam)," /// "-9.7% in 1952 (Korea); negligible in 1964,1976, 2004, 2012 (so far), and null in other years." /// "{it:Source: www.douglas-hibbs.com February 29 2012}", /// size(small) margin(medsmall) justification(left) ) /* FORECASTS OF OBAMA'S 2012 VOTE UNDER VARIOUS HYPOTHETICAL REAL INCOME GROWTH RATE SCENARIOS 2012:Q1 => 2012:Q4 */ * ELECTION DAY FATALITIES ASSUMING FATALITIES RUN AT AVG OF PAST 2 YRS (115 OR .37 PER MILLION PER QUARTER) from 2012:q1 to 2012:q3; 3 quarters. summarize kia_afghan kiaafghan_permil if qcount>252 & qcount<261 list qcount year quarter kia_afghan cum_kia_Obama kiaafghan_permil cum_kiaafghan_permil if qcount==260 /* CUMULATIVE TOTAL FATALITIES AT 2012 ELECTION IF FATALITIES RUN AT AT 115, 0.37 PER MILLION POPULATON, PER QUARTER (I neglect 2012:q4) FROM 2012Q1 THRU 2012Q3 */ * PROJECTED TOTAL FATALITIES display (1234+3*115) * PROJECTED FATALITES PER MILLION POPUATION gen Fatalities2012 = ( 3.980764 + 3*.368737) if qcount==264 list qcount year quarter Fatalities2012 if qcount==264 * EFFECT OF FATALITIES ON 2012 VOTE (I neglect 2012:q4): display bkia gen afghan_effect = bkia*Fatalities2012 list afghan_effect if qcount==264 * EXPECTED 2012 OBAMA VOTE SHARES GIVEN FATALITIES ASSUMPTION UNDER DIFFERENT PER CAPITA REAL INCOME GROWTH RATES AFTER 2011:Q3 * DLNR = -4 replace dlnr = -4 if qcount>260 gen Rbar_min4 = /// (1.0*wtq16*dlnr+g*L1.dlnr /// +g^2*L2.dlnr+g^3*L3.dlnr+g^4*L4.dlnr /// +g^5*L5.dlnr+g^6*L6.dlnr /// +g^7*L7.dlnr+g^8*L8.dlnr+g^9*L9.dlnr /// +g^10*L10.dlnr+g^11*L11.dlnr /// +g^12*L12.dlnr+g^13*L13.dlnr /// +g^14*L14.dlnr) / (1.0*wtq16+g /// +g^2+g^3+g^4+g^5+g^6+ /// g^7+g^8+g^9+g^10+g^11 /// +g^12+g^13+g^14) if qcount==264 gen v_min4 = b0 + bdlnr*Rbar_min4 + bkia*Fatalities2012 * DLNR = -3 replace dlnr = -3 if qcount>260 gen Rbar_min3 = /// (1.0*wtq16*dlnr+g*L1.dlnr /// +g^2*L2.dlnr+g^3*L3.dlnr+g^4*L4.dlnr /// +g^5*L5.dlnr+g^6*L6.dlnr /// +g^7*L7.dlnr+g^8*L8.dlnr+g^9*L9.dlnr /// +g^10*L10.dlnr+g^11*L11.dlnr /// +g^12*L12.dlnr+g^13*L13.dlnr /// +g^14*L14.dlnr) / (1.0*wtq16+g /// +g^2+g^3+g^4+g^5+g^6+ /// g^7+g^8+g^9+g^10+g^11 /// +g^12+g^13+g^14) if qcount==264 gen v_min3 = b0 + bdlnr*Rbar_min3 + bkia*Fatalities2012 * DLNR = -2 replace dlnr = -2 if qcount>260 gen Rbar_min2 = /// (1.0*wtq16*dlnr+g*L1.dlnr /// +g^2*L2.dlnr+g^3*L3.dlnr+g^4*L4.dlnr /// +g^5*L5.dlnr+g^6*L6.dlnr /// +g^7*L7.dlnr+g^8*L8.dlnr+g^9*L9.dlnr /// +g^10*L10.dlnr+g^11*L11.dlnr /// +g^12*L12.dlnr+g^13*L13.dlnr /// +g^14*L14.dlnr) / (1.0*wtq16+g /// +g^2+g^3+g^4+g^5+g^6+ /// g^7+g^8+g^9+g^10+g^11 /// +g^12+g^13+g^14) if qcount==264 gen v_min2 = b0 + bdlnr*Rbar_min2 + bkia*Fatalities2012 * DLNR = 0 replace dlnr = 0 if qcount>260 gen Rbar_0 = /// (1.0*wtq16*dlnr+g*L1.dlnr /// +g^2*L2.dlnr+g^3*L3.dlnr+g^4*L4.dlnr /// +g^5*L5.dlnr+g^6*L6.dlnr /// +g^7*L7.dlnr+g^8*L8.dlnr+g^9*L9.dlnr /// +g^10*L10.dlnr+g^11*L11.dlnr /// +g^12*L12.dlnr+g^13*L13.dlnr /// +g^14*L14.dlnr) / (1.0*wtq16+g /// +g^2+g^3+g^4+g^5+g^6+ /// g^7+g^8+g^9+g^10+g^11 /// +g^12+g^13+g^14) if qcount==264 gen v_0 = b0 + bdlnr*Rbar_0 + bkia*Fatalities2012 summarize dlnr if qcount>8 & qcount<261 summarize dlnr if qcount>9 & qcount<261 * DLNR = +2 replace dlnr = 2 if qcount>260 gen Rbar_pls2 = /// (1.0*wtq16*dlnr+g*L1.dlnr /// +g^2*L2.dlnr+g^3*L3.dlnr+g^4*L4.dlnr /// +g^5*L5.dlnr+g^6*L6.dlnr /// +g^7*L7.dlnr+g^8*L8.dlnr+g^9*L9.dlnr /// +g^10*L10.dlnr+g^11*L11.dlnr /// +g^12*L12.dlnr+g^13*L13.dlnr /// +g^14*L14.dlnr) / (1.0*wtq16+g /// +g^2+g^3+g^4+g^5+g^6+ /// g^7+g^8+g^9+g^10+g^11 /// +g^12+g^13+g^14) if qcount==264 gen v_pls2 = b0 + bdlnr*Rbar_pls2 + bkia*Fatalities2012 * DLNR = +4 replace dlnr = 4 if qcount>260 gen Rbar_pls4 = /// (1.0*wtq16*dlnr+g*L1.dlnr /// +g^2*L2.dlnr+g^3*L3.dlnr+g^4*L4.dlnr /// +g^5*L5.dlnr+g^6*L6.dlnr /// +g^7*L7.dlnr+g^8*L8.dlnr+g^9*L9.dlnr /// +g^10*L10.dlnr+g^11*L11.dlnr /// +g^12*L12.dlnr+g^13*L13.dlnr /// +g^14*L14.dlnr) / (1.0*wtq16+g /// +g^2+g^3+g^4+g^5+g^6+ /// g^7+g^8+g^9+g^10+g^11 /// +g^12+g^13+g^14) if qcount==264 gen v_pls4 = b0 + bdlnr*Rbar_pls4 + bkia*Fatalities2012 * DLNR = +6 replace dlnr = 6 if qcount>260 gen Rbar_pls6 = /// (1.0*wtq16*dlnr+g*L1.dlnr /// +g^2*L2.dlnr+g^3*L3.dlnr+g^4*L4.dlnr /// +g^5*L5.dlnr+g^6*L6.dlnr /// +g^7*L7.dlnr+g^8*L8.dlnr+g^9*L9.dlnr /// +g^10*L10.dlnr+g^11*L11.dlnr /// +g^12*L12.dlnr+g^13*L13.dlnr /// +g^14*L14.dlnr) / (1.0*wtq16+g /// +g^2+g^3+g^4+g^5+g^6+ /// g^7+g^8+g^9+g^10+g^11 /// +g^12+g^13+g^14) if qcount==264 gen v_pls6 = b0 + bdlnr*Rbar_pls6 + bkia*Fatalities2012 format Rbar_min4 Rbar_min2 Rbar_0 Rbar_pls2 Rbar_pls4 Rbar_pls6 %9.1f format v_min4 v_min2 v_0 v_pls2 v_pls4 v_pls6 %9.1f list v_min4 v_min2 v_0 v_pls2 v_pls4 v_pls6 if qcount==264, noobs clean list Rbar_min4 Rbar_min2 Rbar_0 Rbar_pls2 Rbar_pls4 Rbar_pls6 if qcount==264, noobs clean * SOME DATA ON LIKLIHOOD THAT 2012 PER CAPITA REAL INCOME GROWTH RATES WILL BE HIGH ENOUGH TO WIN ELECTION gen R4 = (dlnr+L1.dlnr+L2.dlnr+L3.dlnr)/4 if qcount>9 & qcount<261 summarize R4 if qcount>9 & qcount<261, detail centile R4, centile(50 (1) 100)