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
Time DummiesHello! Quick question regarding time dummies. I have data from 4 quarters of the Labour Force Surv…
Effective Reproductive NumberHello! Is there a way to calculate Effective Reproductive Number (Rt) in STATA? Thank you very muc…
Tobit with vce(robust) or notHi, When I run tobit model specifying vce(robust), it does F test to test the hypothesis that the co…
Non-normal distribution of latent variable in structural equations modelling - transformation?I have a simple path model with several latent variables that are ostensibly well enough indicated b…
Constrained optimization in StataDear Stata uses, I am having a constant optimization problem to solve in Stata I am having three var…
Subscribe to:
Post Comments (Atom)
0 Response to looping twoway graph on panel dataset
Post a Comment