Ah, you are using -estout-'s screen output. As most Stata commands,
-estout- inserts an empty line at the beginning of the output for
aesthetical reasons. If you want to get rid of that line, you have to
write the output to a file and then -type- the file. In your case:
tempfile foo
foreach sample of local samples {
if `sample'==1 local s "a"
if `sample'==2 local s "b"
estout est`sample'`s' est`sample'0 using "`foo'", append ///
keep(var1 var2) style(fixed) cells(b (star fmt(3)) se(fmt(3))) ///
varwidth(16) modelwidth(20) mlabels(none) collabels(none) ///
starlevels(* 0.1 ** 0.05 *** 0.01)
}
type "`foo'"
ben
On Mon, Mar 24, 2008 at 11:13 PM, Vladimir Vakhitov <[email protected]> wrote:
> It's pretty much the same (except append), but within the cycle:
> (I use mocked variable names and sample names, but the commands are
> absolutely the same)
>
> foreach sample of local samples {
>
> if `sample'==1 local s "a"
> if `sample'==2 local s "b"
>
> noi estout est`sample'`s' est`sample'0, keep(var1 var2) style(fixed)
> cells(b (star fmt(3)) se(fmt(3))) ///
> varwidth(16) modelwidth(20) mlabels(none) collabels(none)
> starlevels(* 0.1 ** 0.05 *** 0.01)
> }
>
> Output:
>
> var1 .2343*** .2134***
> var2 .1295* .1024
> <Here is an empty line>
> var1 .9453** .8712***
> var2 .2341* .2342**
>
> I don't see any reason for this line to be there, unless there are
> some lines added by -foreach- or "local" assignments.
>
> Vladimir
>
>
> 2008/3/24, Ben Jann <[email protected]>:
>
>
> > In general, -estout- should not add such a blank line:
> >
> > . sysuse auto
> > . reg price weight foreign
> > . tempfile foo
> > . estout using "`foo'", keep(weight) mlabels(none) collabels(none)
> > . estout using "`foo'", keep(weight) mlabels(none) collabels(none) append
> > . estout using "`foo'", keep(weight) mlabels(none) collabels(none) append
> > . type "`foo'"
> > weight 3.320737
> > weight 3.320737
> > weight 3.320737
> >
> > Show me your exact command and maybe I can help.
> >
> > ben
> >
> >
> >
> >
> >
> > On Mon, Mar 24, 2008 at 7:14 AM, Vladimir Vakhitov <[email protected]> wrote:
> > > Thank you, Ben,
> > >
> > > I used collabels(none), but not mlabels(none). The problem is almost
> > > solved: the model headers disappeared. However, there is still an
> > > empty line between different regression results. I can't figure it out
> > > which default value is responsible for it. Do you happen to know if
> > > this is a feature of -estout-, or it is possible to remove it as well?
> > >
> > > Vladimir.
> > >
> > > 2008/3/23, Ben Jann <[email protected]>:
> > >
> > >
> > > > The -estout- header has different elements, depending on context.
> > > >
> > > > . estout, mlabels(none) collabels(none)
> > > >
> > > > will probably do the job in your case.
> > > >
> > > > ben
> > > >
> > > >
> > > > On Sun, Mar 23, 2008 at 10:42 AM, Vladimir Vakhitov <[email protected]> wrote:
> > > > > Dear Statalisters,
> > > > >
> > > > > I have to run about a dozen regressions with the same variables, but
> > > > > on different samples. My major interest is only one coefficient (let's
> > > > > call it be b_ZZ) in all these regressions, and I want to stack values
> > > > > of these coefficients into one meta-table, something like this:
> > > > > Sample b_ZZ
> > > > > 1 .23***
> > > > > 2 .93*
> > > > > 3 .32**
> > > > > 4 .002
> > > > >
> > > > > In principle, I could use e(b) and e(V) results to do that, but I need
> > > > > the result with "significance stars", and in this case I will have to
> > > > > program this manually, which I am not very strong at yet.
> > > > >
> > > > > I tried to use -estout- with -keep(ZZ)- option. It works almost OK,
> > > > > but I still have to copy the result into an Excel file to remove the
> > > > > headers of each regression. Once the number of samples increases this
> > > > > task becomes quite cumbersome. I tried to remove the headers from
> > > > > within -estout- command, but I coudn't find an option like, for
> > > > > example, [nomodelhead]. Is that still possible to exclude model
> > > > > headers from -estout output?
> > > > >
> > > > > Any other ideas how to preserve only coefficients for required -est-
> > > > > results with significance stars?
> > > > >
> > > > > Thank you.
> > > > >
> > > > > --
> > > > > __________________
> > > > > Volodymyr Vakhitov
> > > > > [email protected]
> > > > > *
> > > > > * 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/
> > > >
> > >
> > >
> > > --
> > >
> > >
> > > __________________
> > > Volodymyr Vakhitov
> > > [email protected]
> > > *
> > > * 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/
> >
>
>
> --
> __________________
> Volodymyr Vakhitov
> [email protected]
> *
> * 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/