Statalist


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

RE: st: Adding variables not in the coefficients for outreg2 or estout


From   Roy Wada <roywada@hotmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Adding variables not in the coefficients for outreg2 or estout
Date   Mon, 2 Feb 2009 21:15:48 -0800

> Stepwise drops different variables in each regression which 
> causes for me a problem in presenting a neat table at the 
> end with all the variables in the order that I want them. 
> I would like to have all the variables in the table, in the 
> order in which I have put them in the regression.
>
> I am currently tricking outreg2 into keeping all the variables
> by running a regression first in the order that I want, compiling
> all regressions and with the intention of deleting the first 
> column at the end. No idea how to add "Group1"-type rows (addnote 
> does not do that in outreg2).
 
Anna apparently wants to insert empty spaces, but what she really
needs is to be able to sort on variable names. I have a version of 
-outreg2- that will do this. Whoever wants it now can get it from me.
 
Unless there is a strong demand, I have no plan to add options for 
inserting Group-type rows. I don't think I'll need that one.
 
-outreg2- is relatively easy to upgrade. It does matter how much 
original planning went into a program.
 
For the future reference, the -sortvar( )- option can be invoked at
any time. Like -keep( )- option, it is forgiving. You will need at
least a version 2.1.0 Feb2009 or better to do this.
 
prog drop _all
sysuse auto, clear
cd c:\
 
* single equation
reg mpg rep head trunk weight
outreg2 using myfile, replace sortvar(trunk turn)
reg mpg rep head weight turn disp gear
outreg2 using myfile, sortvar(trunk turn) see
 
* multiple equations
reg3 (mpg rep head trunk weight) (head trunk weight rep gear)
outreg2 using myfile, replace long
reg3 (mpg rep head weight turn disp ) (mpg rep head trunk weight gear)
outreg2 using myfile,  sortvar(trunk turn) see long
_________________________________________________________________
Hotmail® goes where you go. On a PC, on the Web, on your phone. 
http://www.windowslive-hotmail.com/learnmore/versatility.aspx#mobile?ocid=TXT_TAGHM_WL_HM_versatility_121208 
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index