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
Weighted least squares (WLS) with wls0 and regwlsDear Statalist, I am conducting a long-run event study with the use of the Fama French 3 Factors mod…
Generate variables with forvalsHello Statalist, I have a dataset which contains the following variables: firm (every firm has an as…
Interaction between variables changes the results fundamentally!Dear All, I would appreciate your help on the following please: The correlation between y and x1 x2 …
Dipendent Double-Sorting 25 PortfoliosDear all, I am struggling to replicate the FF-25 portfolios with a variant, I should employ a depend…
Which Flavor of ADF Estimation Does Stata Use?Hey Everyone, with WLS/ADF estimation there are different flavors out there that are being used in …
Subscribe to:
Post Comments (Atom)
0 Response to Loop for xtline with graph combine Stata code
Post a Comment