Bookmark and Share

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]

Re: st: identifying titles in estout after foreach


From   Rodrigo Briceño <[email protected]>
To   [email protected]
Subject   Re: st: identifying titles in estout after foreach
Date   Wed, 17 Nov 2010 09:45:28 -0600

Thanks Richard. You are right, my issue to solve is with estimates
store. Your solution worked as I wanted!

2010/11/17 Richard Ochmann <[email protected]>:
> ...
> note: you are slightly confusing -estout- with -estimates store- here.
> i assume, you didnt mean to talk about -estout- here.
>
> ***
> #delimit;
> local b1 "myfirstbond";
> local b2 "mysecondbond";
> local b3 "mythirdbond";
> local b4 "myfourthbond";
>
> forvalues i = 1/4 {;
> quietly reg price foreign weight rep78 length;
> estimates store m`i', title(`b`i'');
> };
> estimates dir;
> ***
>
> best, rich
>
>
> [email protected] schrieb am 16.11.2010 22:27:16:
>
>> 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/
>
>
> *
> *   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/
>



-- 
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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index