Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Esta: possible to keep/inherit dummie-labels?


From   "Jannik Helweg-larsen" <[email protected]>
To   [email protected]
Subject   st: Esta: possible to keep/inherit dummie-labels?
Date   Mon, 11 Jun 2007 10:23:48 +0200

( Stata 9.2+ estout- fully updated:)

Just discovered Benn Janns extremely  useful commands esto/esta.One
question for esta:

Is it somehow possible to make esta keep/inherit the  variable/value
labels after using xi e.g in line with what " reformat" (by Tony
Brady) does?

Example (needs estout and reformat installed from ssc):

sysuse cancer
label define drug 1 "Placebo" 2 "Tadalafil" 3 "Sildenafil"
label val drug drug

stset studytime, failure(died)

esto: xi: stcox i.drug

estadd expb

esta, main(expb) wide ci nostar

--------------------------------------
                     (1)
                      _t
--------------------------------------
_Idrug_2            0.231 [-2.415,-0.518]
_Idrug_3           0.0707 [-3.849,-1.449]
--------------------------------------
N                      48
--------------------------------------
expb coefficients; 95% confidence intervals in brackets

I would prefer to get the following type of output, in which the
original labels for drug are inherited:

xi: stcox i.drug
reformat

-----------------------------------------------------------------------------
Covariate               Haz. Ratio  Std. Err.     P>|z|    95% Conf. Interval
-----------------------------------------------------------------------------
Drug type (1=placebo)
Placebo*                       1
Tadalafil                  0.231      0.112     0.002      (0.089 to 0.596)
Sildenafil                 0.071      0.043    <0.001      (0.021 to 0.235)
-----------------------------------------------------------------------------
* Baseline category

bw

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



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index