Creating Dummy Variable in Panel
Posted: Mon Feb 02, 2015 4:53 pm
Hi there,
I have a panel dataset with two cross-section identifiers (country, industry) and would like to create a dummy variable for country-year pairs (e.g. USA-1990 = 1, FRA-2000 = 1, etc ...). Could you please suggest a way to create this variable (e.g. using @expand or @recode)? I have 20 countries over 30 years in the data. Thanks in advance.
I have a panel dataset with two cross-section identifiers (country, industry) and would like to create a dummy variable for country-year pairs (e.g. USA-1990 = 1, FRA-2000 = 1, etc ...). Could you please suggest a way to create this variable (e.g. using @expand or @recode)? I have 20 countries over 30 years in the data. Thanks in advance.