log using analysis.log, replace * * a n a l y s i s . d o * * Stata .do file to conduct analysis in FPC monograph. * * do: analysis.do * log: analysis.log * input: fpc.dta * * * week 116 is start of Iraq War * set more off use fpc desc summ corr * * code Iraq approval as 0 if before start of war * gen iraq2 = iraq replace iraq2 = 0 if(week <= 115) label variable iraq2 "Bush Iraq War approval" * * code dummy; 1 from start of Iraq war * gen dirqwar = (week >= 116) * * convert rally variables so range from 0 to 1 * foreach var of varlist wtc-karzai { egen m`var' = max(`var') gen p`var' = `var'/m`var' drop m`var' } * * convention bounce for Bush (month of September) * gen repcon = ((week >= 192) & (week <= 196)) ********************************** * Table 2. Bush approval on Iraq * ********************************** * * "regular" approval equation * arima iraq totbd piraqwar-pprisoner if(week >= 116), ar(1) * * add impact of Republican Convention * arima iraq totbd piraqwar-pprisoner repcon if(week >= 116), ar(1) **************************************************** * Table 3. Bush overall job approval: pre-Iraq War * **************************************************** * * include rdi per capits * arima approve rdpipcly totbd pwtc-ppowell if (week < 116), ar(1) * * exclude rdi per capita * arima approve totbd pwtc-ppowell if (week < 116), ar(1) *************************************************************** * Table 4. Bush overall job approval: since start of Iraq War * *************************************************************** * * include rdi per capita * arima approve rdpipcly totbd piraqwar-pkarzai if(week >= 116), ar(1 12) * * exclude rdi per capita * arima approve totbd piraqwar-pkarzai if(week >= 116), ar(1 12) * * exclude rdi per capita, include Republican convention * arima approve totbd piraqwar-pkarzai repcon if(week >= 116), ar(1 12) * * create log10 of battle deaths * gen l10totbd = log10(totbd) label variable l10totbd "Log of Total Battle Deaths" ************************* * Bush approval on Iraq * ************************* * * "regular" equation with log10 bd * arima iraq l10totbd piraqwar-pprisoner if(week >= 116), ar(1) * * add Republican Convention with log10 bd * arima iraq l10totbd piraqwar-pprisoner repcon if(week >= 116), ar(1) ****************************************************** * Bush overall job approval: since start of Iraq War * ****************************************************** * * include rdi per capita * arima approve rdpipcly l10totbd piraqwar-pkarzai if(week >= 116), ar(1 12) * * exclude rdi per capita * arima approve l10totbd piraqwar-pkarzai if(week >= 116), ar(1 12) * * exclude rdi per capita, include Republican convention * arima approve l10totbd piraqwar-pkarzai repcon if(week >= 116), ar(1 12) *