|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: stcox output: p-value and CI don't agree
At 10:26 PM 8/7/2007, Michael McCulloch wrote:
*--------------- begin code in question -----------------------
*************
* plain cox
*************
* load data and define as survival data
sysuse cancer, clear
stset studytim, failure(died)
* run cox
stcox drug
Could you show us this part of the output using your own data? Also
show the results for
stcox drug, nohr
I believe the z value is based on the coefficient and its standard
error, whether nohr is specified or not.
* cox
stcox drug
indeplist, local
Note that -indeplist- needs to be installed; you can get it from SSC.
* run program
bootstrap drug=r(drug), reps(100): boot_hr
I wonder if there is some bug in Stata here? Even though Stata
labels it as the "Observed coefficient" it is indeed the hazard ratio
that is being reported. But, unlike the non-bootstrapped results,
the z-value seems to be based on the hazard ratio rather than the
coefficient. It looks to me like Stata thinks the hazard ratio
really is the coefficient and is doing its calculations of z, etc. incorrectly.
In short, my theory is that, when bootstrapping, Stata is getting
confused and reporting incorrect results. Alas, the alternative
hypothesis, that I am the one getting confused, may be equally
plausible. But, the results from the bootstrapped and
non-bootstrapped runs do not seem consistent; the labeling of results
is different and the calculations of the z values also seem to be different.
-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME: (574)289-5227
EMAIL: [email protected]
WWW: http://www.nd.edu/~rwilliam
*
* 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/