Statalist


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

st: stcox: negative HR when used in bootstrap


From   Michael McCulloch <[email protected]>
To   Statalist <[email protected]>
Subject   st: stcox: negative HR when used in bootstrap
Date   Tue, 7 Aug 2007 11:39:34 -0700

Hello,
I'm puzzling over why the same stcox argument would return a negative HR value when bootstrapped. Any comments or critique would be welcomed!

*--------------- begin code in question -----------------------

sysuse cancer, clear
stset studytim, failure(died)
stcox drug

sysuse cancer, clear
stset studytim, failure(died)
capture program drop boot_hr
program define boot_hr, rclass

* cox
stcox drug
indeplist, local
foreach var of varlist `X' {
return scalar `var' = exp(_b[`var'])
}

end
set seed 12358
bootstrap, reps(100): boot_hr
*--------------- end code in question -----------------------

--

Michael McCulloch
Pine Street Foundation
124 Pine St., San Anselmo, CA 94960-2674
Tel: (415) 407-1357
Fax: (415) 485-1065
[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/




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