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
Export dataset to LaTeXDear Stata Users, I have a dataset below. I want to export the data to the latex as the following t…
Type of correlation used by factorHi, I've done a factor analysis using the default settings for the factor command: factor item1-item…
Fill the . values of duplicates based on two variablesDear Stata users, I am using Stata 17. Based on two variables Code: date & urbanname I have d…
matching counties based on first two digits for finding similar stateHello, I have a data which shows distance between all counties from another county. This includes a…
Creating Dummy VariableDear Statalist Experts I need to create a dummy variable from the following variable "A" with top a…
Subscribe to:
Post Comments (Atom)
0 Response to Loop for xtline with graph combine Stata code
Post a Comment