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: RE: Why is stata ignoring ctitle in the outreg command?


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Why is stata ignoring ctitle in the outreg command?
Date   Wed, 5 May 2010 17:32:28 +0100

I count four versions of this post today! (One repost only is the recommendation.) 

-outreg- is a user-written command from SSC. It is extremely popular, but evidently none of its users feels like offering you support. Nor is anyone offering alternative solutions using alternative programs. 

I've never used it, but offer two comments: 

1. The question is really that -outreg- is ignoring your -ctitle()- when it is in -append- mode. Stata is indifferent. But that corrected point of view doesn't help solve your problem. 

2. A wild guess is that you must lay down _all_ your column titles at the outset. -outreg- is evidently accumulating extra rows, but it won't go back and change column titles once they have been set up. 

Nick 
n.j.cox@durham.ac.uk 

Natalie Trapp

I would like to export my regression results for several regressions
with the "outreg" command. The problem is that stata ignores my ctitle
command for the second and third regression results. So in my textfile
only the first column is labeled with "fertilisers", the second and
third columns are without labels. I don't understand why.

Stata Commands:

.reg fertilisers x1 x2
.outreg using "stata_regressionresults_nolog.txt", se bracket nolabel
title (Table1: Regression Results) ctitle(fertilisers) replace
.reg energy  x1 x2
.outreg using "stata_regressionresults_nolog.txt", se bracket nolabel
ctitle(energy) append
reg electricity x1 x2
.outreg using "stata_regressionresults_nolog.txt", se bracket nolabel
ctitle(electricity) append

Textfile Results:

Table1: Regression Results
      (1)    (2)    (3)
      fertilisers
x1  -156.419    -17.878    36.106
      [7.909]**    [16.596]    [5.617]**
x2    10.373    30.433    10.341
      [2.244]**    [4.710]**    [1.594]**


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