Dear All,
I'm trying to run something like this:
Such that I don't have to use the "if" option. Looking for a code to generate a variable that will give me: (i) the total export from country A to all the countries in region1 at year1.
I have regions 1 to 5 and countries A to Z.
Please note: the set of countries under the regions are different from the set of countries in which am taking sum.
Thank you,
Dapel
I'm trying to run something like this:
Code:
bysort country: egen var1 = total(x_gdp) if region=="region1" & year==year1
I have regions 1 to 5 and countries A to Z.
Please note: the set of countries under the regions are different from the set of countries in which am taking sum.
Thank you,
Dapel

Comment