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: Multi-column Excel tables with 1 line after my regressions: esttab, outreg2, or another?
From
Jen Zhen <[email protected]>
To
[email protected]
Subject
Re: st: Multi-column Excel tables with 1 line after my regressions: esttab, outreg2, or another?
Date
Fri, 18 Oct 2013 16:29:54 +0200
Hi Nick,
thanks so much for your answer. I also got that idea from example 2 of
the outreg2 help file , but somehow it's not working for me.
I try to reproduce all of my steps in the following, maybe that will
enable someone to see where I'm going wrong:
log using logfile.log, replace
use dataset.dta, replace
...
capture erase logfile.log
eststo: reg depvar1 x1 x2 x3
eststo: reg depvar2 x1 x2 x3
eststo: reg depvar3 x1 x2 x3
outreg2 x1 x2 [est1 est2 est3] using outputfile, excel
log close
Can anyone see how I could change this so as to ensure that I outreg2
only those 3 regressions and not other regressions estimated earlier?
Thanks so much,
JZ
On Fri, Oct 18, 2013 at 4:07 PM, Nick Winter <[email protected]> wrote:
> on the replace / append question, I just include the following line at the
> beginning of my do file:
>
> capture erase -logfilename-
>
> then -append- all results
>
> - Nick Winter
>
>
> On 10/18/2013 8:43 AM, Jen Zhen wrote:
>>
>> Dear listers,
>>
>> I'm looking for way to produce a readily-formatted Excel table (or at
>> least one in which the results of each regression are displayed in a
>> separate column, without requiring further adjustments in Excel) with
>> a single one-line command to be run after my set of regressions. I've
>> tried this both with Ben's -esttab- and with Roy's -outreg2-m but
>> could not get either to do exactly what I wanted:
>>
>> On -esttab ... file.csv-:
>> When open the CSV file in Excel, either by clicking on the
>> hyperlink with its name right in the Stata results window or by
>> opening the saved file in Windows Explorer, I see all data in a single
>> column and first need to tell Excel that at each comma the data are to
>> be split into separate columns. It would be convenient if I could
>> -esttab- into a format which Excel does then directly display in
>> separate columns, but I have not been able to find such an output
>> format for esttab. I am still running Stata 11 and currently have no
>> financial resources to upgrade to a later version.
>>
>> On -outreg2-:
>> I have thus been considering to switch from -esttab- to Roy's
>> -outreg2-. However, here I find it disadvantageous that I cannot just
>> compile the table with one line after all the regressions but must
>> instead use a separate -outreg2 ..., append- after each regression. I
>> can build that into a loop.
>> But it seems that to prevent -outreg2- from adding all earlier
>> regression results run in that Stata session, I need to separately
>> -outreg2- my first regression with the replace option and then all
>> others with the append option. But that looks very inelegant in my
>> dofile. Do people know any more elegant way of doing this?
>>
>> Thank you so much and kind regards,
>> JZ
>> *
>> * For searches and help try:
>> * http://www.stata.com/help.cgi?search
>> * http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/