Oh, sorry, what I meant was to use "{hline @width}" within, e.g.,
postfoot(), not in -hlinechar()-. That is, your example should be:
sysuse auto, clear
qui: reg price mpg rep78
est store reg1
qui: reg price mpg rep78 foreign
est store reg2
estout *, style(smcl) cells(b(fmt(%9.2f)) t(par abs)) label ///
stats(N rmse r2, fmt(%9.0g %9.1f %9.4f) ///
labels("Sample size" "RMSE" "R-squared")) collabels(, none) ///
varlabels(_cons Constant) ///
postfoot("{hline @width}" "t-statistics in parentheses" ///
"{hline @width}" "Source: Auto database")
It would also work if you specify -hlinechar({hline 1})- and then use
@hline in postfoot(), i.e.
estout *, ... ///
hlinechar({hline 1}) ///
postfoot(@hline "t-statistics in parentheses" ///
@hline "Source: Auto database")
but this would write the horizontal line as
{hline 1}{hline 1}{hline 1}{hline 1}{hline 1}{hline 1}...
causing problems in large tables. The first solution is much superior,
since the line is coded using a single hline directive
{hline #}
where # specifies the width of the line.
ben
On 4/3/07, Michael S. Hanson <[email protected]> wrote:
On Apr 2, 2007, at 7:00 PM, Ben Jann wrote:
> Michael, -hlinechar("{hline @width}")- will work. The quotes are
> necessary to keep the smcl hline directive on one line.
Thanks for your reply, Ben. Unfortunately, I cannot get that option
to display as expected. Here is a short example:
// -- begin sample code -- //
sysuse auto, clear
qui: reg price mpg rep78
est store reg1
qui: reg price mpg rep78 foreign
est store reg2
estout *, style(smcl) cells(b(fmt(%9.2f)) t(par abs)) label ///
stats(N rmse r2, fmt(%9.0g %9.1f %9.4f) ///
labels("Sample size" "RMSE" "R-squared")) collabels(, none) ///
varlabels(_cons Constant) hlinechar("{hline @width}") ///
postfoot(@hline "t-statistics in parentheses" ///
@hline "Source: Auto database")
// -- end sample code -- //
Rather then seeing two horizontal lines, I just see the text "@hline"
twice in the displayed table. If I use -hlinechar({hline})-, I do see
the horizontal lines, but each has the width of the Results window.
Do you see what am I doing incorrectly in the above code? Thanks
again.
-- Mike
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/