I have a database in Stata by country and the regions these belong to. I want to create graphs with one variable (varA) by year for each region. In each graph I want the line of varA of every country belonging to that region.
I want to do it automatically because there are a lot of countries (however only five regions). Any help to do this?
The database is like this: region varA country 1 year 1 1 country 1 year 2 1 country 2 year 1 2 country 2 year 2 2 country 3 year 1 2 country 3 year 2 3
I tried using foreach command to loop the creation of the graphs but I can not figure out how to put in each region graph all the varA line series of each country in the region.