Hi...
I have created a code that titles the graphs by their "id". I want to title the graphs by their names.
Here is the code:

Code:
foreach i of numlist 1/5{
use wdi_fhp, clear
keep if id==`i'
tab id if id==`i'
tab country
tsset year, yearly
mswitch dr gcf, switch(gds) varswitch states(2) nolog vsquish
estat transition
estat duration
predict fprob, pr smethod(filter)
line gcf gds year || line fprob year, lpattern(longdash) yaxis(2) title("`i'") saving(`i')
}
*
The above code works fine. The title of the graph is saved according to their id. But I want it to be titled by their country names.
I appreciate your help.