[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: stcox: negative HR when used in bootstrap
From
Michael McCulloch <[email protected]>
To
[email protected]
Subject
Re: st: stcox: negative HR when used in bootstrap
Date
Tue, 7 Aug 2007 16:14:49 -0700
Works just fine!
Thank you kindly.
Michael
bootstrap, reps(100): boot_hr
should be
bootstrap drug=r(drug), reps(100): boot_hr
Hope this helps,
Maarten
--- Michael McCulloch <[email protected]> wrote:
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/
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
___________________________________________________________
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today
http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html
*
* 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/
*
* 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 |