Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: AW: st: -outreg2- for nonlinear regressions? and -esttab-


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   AW: AW: st: -outreg2- for nonlinear regressions? and -esttab-
Date   Fri, 12 Feb 2010 17:04:00 +0100

<> 

Well, the limits are the same in any version, as you can see in - help
limits-, "estimates store". Which makes the question why you need so many
more estimation results all the more urgent: Apparently there is no market
pressure to allow more, and I do not recall an instance on the list where
this problem cropped up.

If you do need that many results, I would -esttab- after each "300 results"
chunk, and later on paste all these gigantic tables into one big spread
sheet. (Make sure you do not hit the limits of your spreadsheet program in
terms of columns, though...)



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Cindy Gao
Gesendet: Freitag, 12. Februar 2010 16:57
An: [email protected]
Betreff: Re: AW: st: -outreg2- for nonlinear regressions? and -esttab-

No this cannot work for a large number of regressions, Stata (at least Stata
SE note sure about other edition) can only handle up to 300 estimates. On
the 301st regression you get error message about "system limit exceeded" and
following the links from error message (r(1000) confirms that Stata can only
hold up to 300 estimates. 

What I try to explain is that this is the reason why after every 300 you
have to use -esttab-,  -eststo clear- and start again. But then there is the
appending problem that the results are not appended side-by-side. Any way of
getting around this would be very valuable to me.

Thank you


Cindy Gao



----- Original Message ----
From: Martin Weiss <[email protected]>
To: [email protected]
Sent: Fri, 12 February, 2010 17:48:19
Subject: AW: st: -outreg2- for nonlinear regressions? and -esttab-


<> 

Just -eststo- them and -esttab- them in one fell swoop:


*************
sysuse auto, clear
eststo clear

forv i=2/5{
    eststo:reg price length weight if rep==`i'
}

esttab using myfile, replace
!start myfile.txt
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Cindy Gao
Gesendet: Freitag, 12. Februar 2010 16:41
An: [email protected]
Betreff: Re: st: -outreg2- for nonlinear regressions? and -esttab-

Thank you for the very helpful suggestion. It partly solves
my problem. However, it is not working that well where there is a large
number of regressions that I want to export results from. Stata (I use SE)
can only handle up to 300 estimates. So I must export these and then say
-eststo clear- and then run more regressions. But, when I append the other
results to the same file (using esttab using myfile, append) it puts the new
results UNDER the original ones. Whereas I need them all side by side in
excel. Is there any way to -append- in -esttab- to get results side-by-side?
Or an alternative way of achieving same the result?

Thank you again!!

Cindy Gao



----- Original Message ----
From: Maarten buis <[email protected]>
To: [email protected]
Sent: Fri, 12 February, 2010 10:29:01
Subject: Re: st: -outreg2- for nonlinear regressions?

--- On Fri, 12/2/10, Cindy Gao wrote:
> PS I also try use estout for the same thing, it works fine
> and exports the results, the problem is that when I append
> (as I run many regressions that I want to compare) it lists
> them one below the other but I need them side by side like
> in outreg2, and I don't know how to store estimates and all
> that to have them side by side in the table using estout.

The simplest way is to use the -eststo:- prefix, like in the
example below

*---------------------- begin example -------------------
sysuse auto, clear
eststo clear
eststo : nl (mpg = {b0} + {b1}*price + {b1}*weight + ///
                   {b1}*displ + {b0}/20*gear_ratio - ///
                   {b0}/20*foreign + {b1}*length)    ///
                   if foreign == 1

eststo : nl (mpg = {b0} + {b1}*price + {b1}*weight + ///
                   {b1}*displ + {b0}/20*gear_ratio - ///
                   {b0}/20*foreign + {b1}*length)    ///
                   if foreign == 0

esttab
*--------------------- end example ----------------------
( For more on how to use examples I sent to statalist see:
http://www.maartenbuis.nl/stata/exampleFAQ.html )

Also see the wide variety of examples on:
http://repec.org/bocode/e/estout/

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

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


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


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index