/* This Do-file creates a country-year data set using the Uppsala Armed Conflict Data Project's "List of System Members Since 1946" from their codebook: http://www.pcr.uu.se/digitalAssets/124/124920_1codebook_ucdp_prio-armed-conflict-dataset-v4_2015.pdf */ version 12.1 clear all set more off * Set up an overall structure: set obs 950 gen statenum=_n label var statenum "ACD State Number" gen stateab="" label var stateab "ACD State Abbreviation" gen statename="" label var statename "ACD State Name" gen startyear=. label var startyear "ACD Membership Start Year" gen endyear=. label var endyear "ACD Membership End Year" * For each country listed in the table, fill in its information: replace stateab="USA" if statenum==2 replace statename="United States of America" if statenum==2 expand 2012-1946+1 if statenum==2 egen year = seq() if statenum==2, from(1946) to(2012) * ... exit // Delete this exit statement once all changes are made. /* When done going through each country listing, drop the observations for which there is no information: */ drop if stateab==.