Statalist


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

st: arranging columns in estout


From   Richard Hiscock <rhiscock@netspace.net.au>
To   statalist@hsphsun2.harvard.edu
Subject   st: arranging columns in estout
Date   Tue, 24 Nov 2009 22:28:07 +1100

Hi everyone,

I am trying to automate results from univariable logistic regression into table using estout package,
my command lines are:

****Unadjusted
local tablist arm asa antib_proph act_lab antib_24 cs_type
set more off
foreach v of varlist `mylist' {
			eststo: logistic  infection_any `v'
}
estout * , eform cells("b(fmt(1)) p(fmt(2)) ci(fmt(1)) " se(par fmt (2))) style(fixed) drop(_cons) modelwidth(10)

this produces output as desired except that variables are stacked/ staggered across table (see below). the staggering is not corrected
by saving as a txt file.
Is it possible to arrange est1-est6 in a vertical stack like:

arm 		b/se   p   ci95
asa     	b/se   p   ci95
antib_proph	...


I have searched the estout help file and can't identify a solution.
thanks Richard Hiscock


. estout * , eform cells("b(fmt(1)) p(fmt(2)) ci(fmt(1)) " se(par fmt (2))) style(fixed) drop(_cons) modelwidth(10)

est1 est2 est3 e
> st4                             est5                             est6
b/se p ci95 b/se p ci95 b/se p ci95 b > /se p ci95 b/se p ci95 b/ se p ci95
arm                 0.6       0.37    0.2,1.7
>
                 (0.33)
>
asa 1.0 0.96 0.5,1.9
>
                                                  (0.33)
>
antib_proph 1.3 0.73 0.3,6.6
>
(1.09 )
>
act_lab
> 1.1       0.89    0.4,2.8
(0 .
> 52)
antib_24
>                                  3.6       0.37   0.2,59.8

>                               (5.15)
cs_type
> 1.0 0.94 0.4,2.6

>                                                                (0.49)

*
*   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   |   What's new   |   Site index