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]
st: Adding white space between sets of parameters with -estout-
From
Bert Jung <[email protected]>
To
[email protected]
Subject
st: Adding white space between sets of parameters with -estout-
Date
Fri, 20 May 2011 21:04:13 -0400
Dear Statalisters,
I use the fabulous -estout- to produce Latex tables. To improve
legibility I would like to add white space between each set of two
parameters, the coefficient and standard error.
I can add the Latex "\addlinespace" manually after each set of
parameters using the -varlabels( , elist( ) )- option. But this is
tedious for long models. The -end( )- option will add the string to
every table row, but that creates unwanted white space between the
coefficient and standard error.
Is there any way to automatically add a string below each set of parameters?
Thanks Bert
/* Example */
sysuse auto, clear
eststo clear
qui eststo: reg mpg weight turn foreign
* Using -varlabels(, elist() )- to add string -> works but is tedious
estout, cells( b(f(2)) se(f(2)) ) varlabels( , elist(weight
\addlinespace turn \addlinespace foreign \addlinespace) )
* Using -end( )- to add string -> adds after every row, not just after
each set of parameters
estout, cells( b(f(2)) se(f(2)) ) end(\addlinespace)
/* Example output
. sysuse auto, clear
(1978 Automobile Data)
. eststo clear
.
. qui eststo: reg mpg weight turn foreign
.
. * Using -varlabels(, elist() )- to add string -> works but is tedious
. estout, cells( b(f(2)) se(f(2)) ) varlabels( , elist(weight
\addlinespace turn \addlinespace foreign \addlinespace) )
-------------------------
est1
b/se
-------------------------
weight -0.01
0.00\addlinespace
turn -0.24
0.18\addlinespace
foreign -2.08
1.12\addlinespace
_cons 48.13
5.48
-------------------------
.
. * Using -end( )- to add string -> adds after every row, not just
after each set of parameters
. estout, cells( b(f(2)) se(f(2)) ) end(\addlinespace)
-------------------------
est1\addlinespace
b/se\addlinespace
-------------------------
weight -0.01\addlinespace
0.00\addlinespace
turn -0.24\addlinespace
0.18\addlinespace
foreign -2.08\addlinespace
1.12\addlinespace
_cons 48.13\addlinespace
5.48\addlinespace
-------------------------
*/
*
* 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/