Ben,
Thanks very much! You were right, my version of -estout- needed to be updated. Sorry - I should've checked that before posting. The -titles- suboption on the -mlabel- option seems to be just what I needed.
Thanks also to Martin. Your work around would have done the trick, albeit with a bit of extra coding.
Again, I appreciate the help very much!
Take care,
Howie
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ben Jann
Sent: Tuesday, September 30, 2008 5:25 PM
To: [email protected]
Subject: Re: st: Re: labeling estout models with titles from eststo
Howie, if you specify -label- then -estout- should use the titles
instead of the names of the stored estimates. Example:
. sysuse auto
(1978 Automobile Data)
. qui reg price mpg
. eststo model1, title("title1")
. qui reg price mpg rep78
. eststo model2, title("title2")
. estout model*, label
----------------------------------------------
title1 title2
b b
----------------------------------------------
Mileage (mpg) -238.8943 -271.6425
Repair Record 1978 666.9568
_cons 11253.06 9657.754
----------------------------------------------
If this does not work on your system then you probably have an old
-estout- version and need to update (-ssc install estout, replace-).
If you want to use the titles but not the variable labels, then type
. estout model*, mlabels(,titles)
--------------------------------------
title1 title2
b b
--------------------------------------
mpg -238.8943 -271.6425
rep78 666.9568
_cons 11253.06 9657.754
--------------------------------------
Furthermore, if you want labels but no titles, type
. estout model*, label mlabels(,notitles)
----------------------------------------------
model1 model2
b b
----------------------------------------------
Mileage (mpg) -238.8943 -271.6425
Repair Record 1978 666.9568
_cons 11253.06 9657.754
----------------------------------------------
To get model titles in -esttab- type
. esttab model*, mtitle
--------------------------------------------
(1) (2)
title1 title2
--------------------------------------------
mpg -238.9*** -271.6***
(-4.50) (-4.70)
rep78 667.0
(1.95)
_cons 11253.1*** 9657.8***
(9.61) (7.17)
--------------------------------------------
N 74 69
--------------------------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001
Best,
ben
On Tue, Sep 30, 2008 at 11:03 PM, Martin Weiss <[email protected]> wrote:
> The -estout- is one of the most brilliant packages on record, but titling is
> somewhat difficult. You can, as a crude solution, accumulate your titles in
> a -local- and pass it to the mtitles option.
>
> ********
> sysuse auto, clear
> eststo clear
> levelsof rep78, loc(levrep)
>
> loc i 0
> loc titl ""
>
> foreach lev of loc levrep{
> loc ++i
> reg price we mpg if rep78==`lev'
> eststo
> loc titl `"`titl' "Regr. `i'""'
> }
>
> esttab *, mtitles(`titl')
> ***********
>
> HTH
> Martin
> _______________________
> ----- Original Message ----- From: "Howard Lempel" <[email protected]>
> To: <[email protected]>
> Sent: Tuesday, September 30, 2008 9:50 PM
> Subject: st: labeling estout models with titles from eststo
>
>
>> Hello all,
>>
>> I have a question on the use of the -estout- command, which is available
>> from both SSC and SJ. I have a do file that runs many regressions and
>> stores each of them using -eststo, title("MyTitle")-. I would then like to
>> use -estout- to make tables of my results. I would like each model to be
>> labeled using that model's title.
>>
*
* 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/