Dear Sirs,
I have a panel of 21 countries over 45 years.
I am trying to graph this:
foreach i of num 1/21 {
twoway qfit y x if country == `i', name(y_`i')
}
The problem is that Stata names each graph as y_`i' , where `i' is the number associated to each country.
Instead of y_`i' I need STATA to name the graph y_"country" , where "country" is the name of the country associated to each `i' .
I really appreciate any help on this.
Best,
Lorenzo
Related Posts with looping twoway graph on panel dataset
making loop with the values within the variableHello, I have one of the variables G1 which has values from 1 to 17. Then I want to make a loop as …
Generating categorical dummy variableHi all, I need some help with this. I would like to generate a new binomial variable EDUCATION equ…
Splitting a data set into four data sets over all observations but keepin all variables for each splitted data setHi All, I am using a data set which contains more than 50 variables and 0.36 observations. I need to…
Indicator for more than one marital changeDear Stata Users, I have a panel dataset and I would like to identify marital changes (var marital)…
Any way to recover results after a crash?Hi, This might sound silly as I had no idea about the -preserve- command until I started looking fo…
Subscribe to:
Post Comments (Atom)
0 Response to looping twoway graph on panel dataset
Post a Comment