[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: labeling estout models with titles from eststo

From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: Re: labeling estout models with titles from eststo
Date   Tue, 30 Sep 2008 23:03:00 +0200

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'
loc titl `"`titl' "Regr. `i'""'

esttab *, mtitles(`titl')

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

An example using the auto dataset:

sysuse auto
reg price mpg
eststo model1, title("title1")

reg price mpg rep78
eststo model2, title("title2")

estout model*

Here is my output:

model1 model2
b b
mpg -238.8943 -271.6425
rep78 666.9568
_cons 11253.06 9657.754

I would like to find a way to replace "model1" and "model2" with "title1" and "title2." Because I have many models, I would like to be able to do this without specifying a string for each model in -estout-'s -mlabel()- option if at all possible.

Thanks for your consideration.

Howie Lempel
Research Assistant
The Brookings Institution | Economic Studies

1775 Massachusetts Ave NW | Washington DC 20036
[email protected] | p: (202) 238-3576

* For searches and help try:

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index