Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: problem with -bca- option with bootstrapping a user-written program


From   "Smith, Paul Bradley" <[email protected]>
To   <[email protected]>
Subject   st: problem with -bca- option with bootstrapping a user-written program
Date   Fri, 2 Dec 2005 12:51:22 -0600

I have a user written program that computes the difference between two
mean survival times.  It's been running quite well in a variety of
incarnations.  Today I decided to add the -bca- option to the
-bootstrap- command, but it bombs.


	. bootstrap r(difference), nodrop reps(200) bca : myDifference
	(running myDifference on estimation sample)

	last estimates not found
	r(301);


I searched StataList and found a late October reference to a bug in
bootstrap, so I updated my ADO files but still get the same problem.
I'm guessing that this has something to do with my user-written program
being unfriendly to jknife.  Anyone have any suggestions that might
enable the -bca- option?

Thanks,


Brad Smith


-------------------------
	use bootdata, clear
	set seed 12345

	capture program drop myDifference
	program myDifference, rclass
		version 9 
	
		*compute restricted mean survival times
		stset duration_haddeath, f(haddeath=1)

		stci if experimental==0 , rmean 
		local contime=r(rmean)
		stci if experimental==1 , rmean 
		local exptime=r(rmean)
	
		return scalar difference = `exptime'-`contime'
	
	end

   bootstrap difference=r(difference), nodrop reps(2000) bca:
myDifference
   estat bootstrap, all


-------------------------

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