Dear all, I want to plot calories for the each panel id over the year. Here I have written the loop code, however, there is some error. The error is "graph combine" is not working. Please suggest.
sysuse xtline1.dta
egen id=group( person)
forval i=1(1)2 {
xtline calories if id==`i', overlay legend (off) saving (id_`i', replace)
graph combine id_`i'.gph, r(2) iscale (1)
}
0 Response to Loop for xtline with graph combine Stata code
Post a Comment