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
fractional probit with sample selection using CMPHello everyone! I am planning to run a fractional response model with sample selection. I wonder if …
difference between predcit and predict, xbSorry for the multiple posts, please delete this. …
How to drop duplicates under certain conditions for a subset of observations?Hi all, I am trying to drop duplicate observations under certain conditions. My data looks something…
Reshaping data for tabplotArray Hello, How do I reshape the following data to be able to use the tabplot command? Basically I…
difference between predictand predict, xbHi, i know that predict yh, xb gives you a linear prediction using X'b. But how does the command pre…
Subscribe to:
Post Comments (Atom)
0 Response to Loop for xtline with graph combine Stata code
Post a Comment