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)
}
Related Posts with Loop for xtline with graph combine Stata code
Deleting entire Firm based on condition from panel data setHello Stata community, I have a panel dataset consisting of many firms over 20 years. Firms are iden…
Reshaping Data and Variables for a Dynamic Panel Data AnalysisHi there, I am happy to be new in this forum and currently writing on a Panel Data Analysis for a co…
Decomposing Wagstaff Concentration IndexDear All, I'm using Stata 16 and I'm trying to decompose my concentration index using the following…
Graphic with graphs for sub catvars and overall graphHello, I want to create a graphic with multiple graphs for each sub catvar and also a graph that is…
Convert Scientific Notations (e-07) into Decimal NotationHi All, I have various observations in my dataset like- 1.40e+09, 1.57e-07. How to convert these s…
Subscribe to:
Post Comments (Atom)
0 Response to Loop for xtline with graph combine Stata code
Post a Comment