Dear all,
I have a eu dummy variable that takes value 1 since the year of incorporation in the EU. I would like to generate a new dummy variable that takes value 1 if eu equals 1 for any year of the period, that is, a variable that indicates if the country is or not in the EU. I do not know how to indicate stata the "for any year of the period" issue.
I tried with the following code but got exactly the same eu variable.
Thanks for any suggestions.
Best regards,
Laura
I have a eu dummy variable that takes value 1 since the year of incorporation in the EU. I would like to generate a new dummy variable that takes value 1 if eu equals 1 for any year of the period, that is, a variable that indicates if the country is or not in the EU. I do not know how to indicate stata the "for any year of the period" issue.
I tried with the following code but got exactly the same eu variable.
Code:
gen EU_new_d=0 replace EU_new_d=1 if eu_d==1&year==1995|eu_d==1&year==1996|eu_d==1&year==1997|eu_d==1&year==1998|eu_d==1&year==1999|eu_d==1&year==2000|eu_d==1&year==2001|eu_d==1&year==2002|eu_d==1&year==2003|eu_d==1&year==2004|eu_d==1&year==2005|eu_d==1&year==2006|eu_d==1&year==2007|eu_d==1&year==2008|eu_d==1&year==2009|eu_d==1&year==2010|eu_d==1&year==2011|eu_d==1&year==2012|eu_d==1&year==2013|eu_d==1&year
Thanks for any suggestions.
Best regards,
Laura
Comment