* PASTE THIS INTO STATA AS A DO FILE

* This do-file was used to generate the results published in 

*        Andreas Wimmer, Lars-Erik Cederman and Brian Min. 
*        "Ethnic politics and armed conflict. A configurational analysis of a new global dataset", 
*        in American Sociological Review 74(2):316-337, 2009

* Note that to reproduce the published results you will need the Ethnic Power Relations Data Set Version 1, 1946-2005

********************************************************************************
* T A B L E   O N E
* ALL CIVIL WARS
* 1=Civil war onset, 2=No onset
********************************************************************************

*** TABLE 1t - Version 1t (CONTROL FOR ONGOING WAR AND TIME; NO REGION CONTROLS)

* MODEL 1 REDUCED MODEL
* ALL CIVIL WARS
* 1=Civil war onset, 2=No onset
logit newonset lrexclpop  egipgrps pimppast  gdpcapl lpopl ongoingwarl year npeaceyears nspline*, nolog cluster(cowcode)
outreg2 using RESULTS_12112007_1, bd(4) 2aster excel label replace

* MODEL 2 FULL MODEL 
* ALL CIVIL WARS
logit newonset lrexclpop  egipgrps pimppast  ethfrac  gdpcapl lpopl lmtnest  regchg3 anocl oilpcl ongoingwarl year npeaceyears nspline*,  nolog cluster(cowcode)
outreg2 using RESULTS_12112007_1, bd(4) 2aster excel label append

* MODEL 3 FULL MODEL HIGH INTENSITY WARS
* ALL CIVIL WARS
logit newhionset lrexclpop  egipgrps pimppast  ethfrac  gdpcapl lpopl lmtnest  regchg3 anocl oilpcl ongoinghiwarl year hpeaceyears hspline*,   nolog cluster(cowcode)
outreg2 using RESULTS_12112007_1, bd(4) 2aster excel label append

* MODEL 4 REPLICATION FL ONSETS 
* ALL CIVIL WARS
logit onsetfl lrexclpop  egipgrps pimppast  ethfrac gdpcapl lpopl lmtnest  regchg3 anocl oilpcl warlfl year fpeaceyears fspline*,   nolog cluster(cowcode)
outreg2 using RESULTS_12112007_1, bd(4) 2aster excel label append

* MODEL 5 REPLICATION SAMBANIS ONSETS 
* ALL CIVIL WARS
logit warstns1 lrexclpop  egipgrps pimppast ethfrac  gdpcapl lpopl lmtnest  regchg3 anocl oilpcl atwarnsl year speaceyears sspline*, nolog cluster(cowcode)
outreg2 using RESULTS_12112007_1, bd(4) 2aster excel label append

*** TABLE 1t - Version 2t (DROP ONGOING WAR; CONTROL FOR TIME; NO REGION CONTROLS)

* MODEL 1 REDUCED MODEL
* ALL CIVIL WARS
* 1=Civil war onset, 2=No onset
logit newonset2 lrexclpop  egipgrps pimppast gdpcapl lpopl year npeaceyears nspline*, nolog cluster(cowcode)
outreg2 using RESULTS_12112007_1, bd(4) 2aster excel label append

* MODEL 2 FULL MODEL 
* ALL CIVIL WARS
logit newonset2 lrexclpop  egipgrps pimppast ethfrac  gdpcapl lpopl lmtnest  regchg3 anocl oilpcl  year npeaceyears nspline*, nolog cluster(cowcode)
outreg2 using RESULTS_12112007_1, bd(4) 2aster excel label append

* MODEL 3 FULL MODEL HIGH INTENSITY WARS
* ALL CIVIL WARS
logit newhionset2 lrexclpop  egipgrps pimppast  ethfrac gdpcapl lpopl lmtnest  regchg3 anocl oilpcl year hpeaceyears hspline*,  nolog cluster(cowcode)
outreg2 using RESULTS_12112007_1, bd(4) 2aster excel label append

* MODEL 4 REPLICATION FL ONSETS 
* ALL CIVIL WARS
logit onsetfl2 lrexclpop  egipgrps pimppast  ethfrac gdpcapl lpopl lmtnest  regchg3 anocl oilpcl year fpeaceyears fspline*,  nolog cluster(cowcode)
outreg2 using RESULTS_12112007_1, bd(4) 2aster excel label append

* MODEL 5 REPLICATION SAMBANIS ONSETS 
* ALL CIVIL WARS
logit warstns2 lrexclpop  egipgrps pimppast ethfrac  gdpcapl lpopl lmtnest  regchg3 anocl oilpcl year speaceyears sspline*,  nolog cluster(cowcode)
outreg2 using RESULTS_12112007_1, bd(4) 2aster excel label append

********************************************************************************
* T A B L E   T W O
* ALL ETHNIC WARS
* 1=Ethnic war onset, 2=No onset
********************************************************************************

*** TABLE 2t - Version 1t (CONTROL FOR ONGOING WAR AND TIME; NO REGION CONTROLS)

* MODEL 1 REDUCED MODEL
logit newethonset lrexclpop  egipgrps pimppast gdpcapl lpopl ongoingwarl year npeaceyears nspline*, nolog cluster(cowcode)
outreg2 using RESULTS_12112007_2, bd(4) 2aster excel label replace

* MODEL 2 FULL MODEL 
logit newethonset lrexclpop  egipgrps  pimppast  ethfrac gdpcapl lpopl lmtnest  regchg3 anocl oilpcl ongoingwarl year npeaceyears nspline*,  nolog cluster(cowcode)
outreg2 using RESULTS_12112007_2, bd(4) 2aster excel label append

* MODEL 3 FULL MODEL HIGH INTENSITY WARS
logit newethhionset lrexclpop  egipgrps  pimppast  ethfrac gdpcapl lpopl lmtnest  regchg3 anocl oilpcl ongoinghiwarl year hpeaceyears hspline*,   nolog cluster(cowcode)
outreg2 using RESULTS_12112007_2, bd(4) 2aster excel label append

* MODEL 4 REPLICATION FL ONSETS 
logit ethonsetfl lrexclpop  egipgrps  pimppast ethfrac  gdpcapl lpopl lmtnest  regchg3 anocl oilpcl warlfl year fpeaceyears fspline*,   nolog cluster(cowcode)
outreg2 using RESULTS_12112007_2, bd(4) 2aster excel label append

*** TABLE 2t - Version 2t (DROP ONGOING WAR; CONTROL FOR TIME; NO REGION CONTROLS)

* MODEL 1 REDUCED MODEL
logit newethonset2 lrexclpop  egipgrps pimppast  gdpcapl lpopl year npeaceyears nspline*, nolog cluster(cowcode)
outreg2 using RESULTS_12112007_2, bd(4) 2aster excel label append

* MODEL 2 FULL MODEL 
logit newethonset2 lrexclpop  egipgrps  pimppast ethfrac  gdpcapl lpopl lmtnest  regchg3 anocl oilpcl  year npeaceyears nspline*, nolog cluster(cowcode)
outreg2 using RESULTS_12112007_2, bd(4) 2aster excel label append

* MODEL 3 FULL MODEL HIGH INTENSITY WARS
logit newethhionset2 lrexclpop  egipgrps  pimppast  ethfrac gdpcapl lpopl lmtnest  regchg3 anocl oilpcl year hpeaceyears hspline*,  nolog cluster(cowcode)
outreg2 using RESULTS_12112007_2, bd(4) 2aster excel label append

* MODEL 4 REPLICATION FL ONSETS 
logit ethonsetfl2 lrexclpop  egipgrps  pimppast ethfrac  gdpcapl lpopl lmtnest  regchg3 anocl oilpcl year fpeaceyears fspline*,  nolog cluster(cowcode)
outreg2 using RESULTS_12112007_2, bd(4) 2aster excel label append

********************************************************************************
* T A B L E   T H R EE
* All Ethnic Wars
* 1=Infighting 
* 2=Rebellion
********************************************************************************

*** TABLE 3t - Version 3t (CONTROL FOR ONGOING WAR AND TIME; NO REGION CONTROLS)

* MODEL 1 REDUCED MODEL
mlogit onsetstatus lrexclpop  egipgrps pimppast   ethfrac gdpcapl lpopl ongoingwarl year npeaceyears nspline*, nolog cluster(cowcode)
outreg2 using RESULTS_12112007_3, bd(4) 2aster excel label replace

* MODEL 2 FULL MODEL 
mlogit onsetstatus lrexclpop  egipgrps pimppast   ethfrac gdpcapl lpopl lmtnest  regchg3 anocl oilpcl ongoingwarl year npeaceyears nspline*,  nolog cluster(cowcode)
outreg2 using RESULTS_12112007_3, bd(4) 2aster excel label append

*** TABLE 3t - Version 3t (DROP ONGOING WAR; CONTROL FOR TIME; NO REGION CONTROLS)

* MODEL 1 REDUCED MODEL
mlogit onsetstatus2 lrexclpop  egipgrps pimppast   ethfrac gdpcapl lpopl year npeaceyears nspline*, nolog cluster(cowcode)
outreg2 using RESULTS_12112007_3, bd(4) 2aster excel label append

* MODEL 2 FULL MODEL 
mlogit onsetstatus2 lrexclpop  egipgrps pimppast   ethfrac gdpcapl lpopl lmtnest  regchg3 anocl oilpcl  year npeaceyears nspline*, nolog cluster(cowcode)
outreg2 using RESULTS_12112007_3, bd(4) 2aster excel label append

 

********************************************************************************
* T A B L E   F O U R
* All Ethnic Wars
* 1=Secessionist infighting 
* 2=Secessionist rebellion
* 3=Non-secessionist infighting
* 4=Non-secessionist rebellion
********************************************************************************

*** TABLE 1t - Version 1t (CONTROL FOR ONGOING WAR AND TIME; NO REGION CONTROLS)

* MODEL 1 REDUCED MODEL
mlogit actoraim lrexclpop  egipgrps pimppast   ethfrac gdpcapl lpopl ongoingwarl year npeaceyears nspline*, nolog cluster(cowcode)
outreg2 using RESULTS_12112007_4, bd(4) 2aster excel label replace

* MODEL 2 FULL MODEL 
mlogit actoraim lrexclpop  egipgrps pimppast   ethfrac gdpcapl lpopl lmtnest  regchg3 anocl oilpcl ongoingwarl year npeaceyears nspline*,  nolog cluster(cowcode)
outreg2 using RESULTS_12112007_4, bd(4) 2aster excel label append

*** TABLE 4t - Version 2t (DROP ONGOING WAR; CONTROL FOR TIME; NO REGION CONTROLS)

* MODEL 1 REDUCED MODEL
mlogit actoraim2 lrexclpop  egipgrps pimppast   ethfrac gdpcapl lpopl year npeaceyears nspline*, nolog cluster(cowcode)
outreg2 using RESULTS_12112007_4, bd(4) 2aster excel label append

* MODEL 2 FULL MODEL 
mlogit actoraim2 lrexclpop  egipgrps pimppast   ethfrac gdpcapl lpopl lmtnest  regchg3 anocl oilpcl  year npeaceyears nspline*, nolog cluster(cowcode)
outreg2 using RESULTS_12112007_4, bd(4) 2aster excel label append