![Statalist](/includes/images/head_statalist.jpg) |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: different stcox output when used in a program
Using the same simple stcox command, Stata 9.2 outputs the hazard
ratio when I issue the command, but the coefficient when I use it
within a program. I'd like to learn how to obtain the hazard ratio
within my simple program.
FROM COMMAND LINE:
. stcox tcm if stage==1
------------------------------------------------------------------------------
_t | Haz. Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
tcm | .7800136 .2798863 -0.69 0.489 .3860754 1.575913
------------------------------------------------------------------------------
FROM PROGRAM:
. program define bootgcomp
1. stcox tcm if stage==1
2. end
. set seed 12358
. bootstrap, reps(1000): msmcox_stageII
------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
_t | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
tcm | -.2484439 .351693 -0.71 0.480 -.9377495 .4408616
------------------------------------------------------------------------------
*
* 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/