Loop in Stata
Budget: $10 – $30 USD
I have a dataset of all alliances in the international system going back to 1816. I need a loop run over the dataset to create two new dummy variables for if a state ("member" in attached dataset) ever had a previous secret alliance ("1" in "publicanysec" variable in the attached dataset) and then another variable for if the state made a secret alliance in the past five years ("startdate" in the attached dataset). I really need the code more than anything. I know it will use the foreach command. Need quick turn around, though it is not a hard loop to run.