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
Setting a dummy if names appear in the previous year!Dear All, Suppose that I have data Code: * Example generated by -dataex-. To install: ssc install …
How to create an indicator of total vocabulary score for bilingual childrenHi all, I am using a dataset with vocabulary data for 5585 children who are 2 years old. We have a…
Nesting an Iv in Diff-in-DiffHello everyone, I would like to ask one question that I am struggling on. I would like to estimate …
How i can see only interesting for me models.For example i have 100 columns named var... I wrote code for them like this: Code: xtmixed Y X1 X2…
Inter rater reliability with missing observationsHi everyone, I am trying to calculate inter rater reliability for my data but am struggling due to …
Subscribe to:
Post Comments (Atom)
0 Response to Loop for xtline with graph combine Stata code
Post a Comment