Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: identifying titles in estout after foreach
From
Rodrigo Briceño <[email protected]>
To
[email protected]
Subject
st: identifying titles in estout after foreach
Date
Tue, 16 Nov 2010 15:27:16 -0600
Dear users. I'm starting lo learn by myself the advantages that
programming language in Stata provides me. Just to remember I'm using
Stata 9.2 and Windows XP. I'm doing a repetitive task for 15 bonds. I
wrote the following command:
loc X = "sap liqmk m2-m12 mes pprom"
loc X1= "sap liqmk m2-m12 mes pprom dv"
local isin "6 63 121 246 248 127"
local isin2 "144 192 311 312 313 314 315 319 320"
foreach i of local isin {
quietly regress liq `X' if isin2==`i'
predict ehat if e(sample), res
............................................... (more stuff here)
estimates store m`i', title(`i')
}
foreach i of local isin2 {
quietly regress liq `X1' if isin2==`i'
predict ehat if e(sample), res
............................................... (more stuff here)
estimates store m`i', title(`i')
}
As you may notice the title option of estout is referring to the
number established in the local `i'. I need names of bonds instead of
numbers here. If I define a new local, let's say: local name1 "id1
id2, etc." can I call that local into title option of estout? I don't
know how.
Thanks.
--
Rodrigo Briceño
Economist
[email protected]
MSN: [email protected]
SKYPE: rbriceno1087
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/