I was referring to the coefplot trying to make subgraphs like this (below are example codes from http://repec.sowi.unibe.ch/stata/coe...started.html):
Code:
sysuse auto, clear
forv i = 3/5 {
quietly regress price mpg headroom weight turn if rep78==`i'
estimate store rep78_`i' }
coefplot rep78_3 || rep78_4 || rep78_5, drop(_cons) xline(0) ///
bycoefs byopts(xrescale)For the last line of command, "coefplot rep78_3 || rep78_4 || rep78_5, XXX", I wonder how I can write a loop over consecutive numbers (in this case, looping 3, 4, 5 for rep78_). I tried multiple ways and could not get it work, including using wildcards (*) or something like this (which did not work):
Code:
coefplot ///
forvalues i=3/5 {
rep78_`i' || ///
}Yingyi
No comments:
Post a Comment