Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: Aligning columns when appending regression tables using estout


From   Miranda Kim <mk@mrc.soton.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: Aligning columns when appending regression tables using estout
Date   Thu, 08 Apr 2010 10:40:59 +0100

Hello,
Any suggestions with the following would be of great help...
I am wanting to amend the following code, such that my regression models involving the same outcome are aligned in the same column, so in the example below weight and length would feature in the same column, and the second row would have three blank cells at the start...

sysuse auto, clear

est clear
foreach y of varlist mpg weight length {
   eststo `y': regress `y' displacement
}
esttab using test.csv, replace cells(`"b(fmt(a1) star) ci(fmt(2) par("(" "," ")")) p(fmt(3))"') ///
stats(N, fmt(2 0)) plain drop(_cons) label noobs nonum  collabels(none)

est clear
foreach y of varlist weight length {
   eststo `y': regress `y' gear_ratio
}
esttab using test.csv, append cells(`"b(fmt(a1) star) ci(fmt(2) par("(" "," ")")) p(fmt(3))"') ///
stats(N, fmt(2 0)) plain drop(_cons) label noobs nonum  collabels(none)

Many thanks,
Miranda

*
*   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   |   Site index