Hello,
I have a very simple question but I can't find a working solution in the Stata help section.
I have a dataset and I want to draw a graph for all regions of my country.
I managed to get a graph using twoway line var year, sort for the entire country. Now I'd like to do the same thing for each region. The variable region has codes, like 001,A1, R3,... as region identifiers.
I could to that with
preserve
keep if region="A1"
twoway line ....
restore
And repeat this for all region,
However, I was wondering: is there a code to do that more easily?
Thanks a lot!
I have a very simple question but I can't find a working solution in the Stata help section.
I have a dataset and I want to draw a graph for all regions of my country.
I managed to get a graph using twoway line var year, sort for the entire country. Now I'd like to do the same thing for each region. The variable region has codes, like 001,A1, R3,... as region identifiers.
I could to that with
preserve
keep if region="A1"
twoway line ....
restore
And repeat this for all region,
However, I was wondering: is there a code to do that more easily?
Thanks a lot!
Comment