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

RE: st: Cox-Model - Predicted time of failure


From   "Galdo, Virgilio" <[email protected]>
To   <[email protected]>
Subject   RE: st: Cox-Model - Predicted time of failure
Date   Tue, 13 Jul 2004 18:17:25 -0400

Thanks May and Marcello!!

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Marcello
Pagano
Sent: Friday, July 09, 2004 6:28 PM
To: [email protected]
Subject: Re: st: Cox-Model - Predicted time of failure


This method is fine as far as it goes, but it does have a negative bias. 
  One, ad hoc, way to compensate for the bias is to add an exponential 
tail to the survival curve after the last censored observation.  The 
area under this addition to the curve can be evaluated theoretically and 
thus tacked on to the area calculated by May.  This estimator appears in 
a number of places.  Do not ask me for statistical properties of this 
estimator.

Just a suggestion.

m.p.

May Boggess wrote:

> On Friday, Virgilio asked:
> 
> 
>>How can I get the predicted time of failure using the Cox Model.
>>I would really appreciate any help.
>>
> 
> 
> The suggestion put forward by Roy, to compute the area under the
> survival curve, is also what I would say. Here is some code for a very
> simple example:
> 
>  clear
>  set obs 3
>  gen t=_n
>  gen f=1
>  stset t, f(f)
>  sts list
>  stcox, estimate basesurv(s)
>  sts graph
>  sort _t
> 
>  local N1=_N+1
>  set obs `N1'
>  replace _t=0 in `N1'
>  replace s=1 in `N1'
>  sort _t 
>  twoway line s _t, connect(stairstep) yscale(r(0 1))
> 
>  gen box=s*(_t[_n+1]-_t) 
>  egen area = sum(box)
>  list  area in 1
> 
> In the case where the survivor function eventually reaches zero, as in
> my easy example, the area under the curve is finite. But if the last
> time in the dataset is a censored time, then the survivor function
> remains positive for all t. So, in that case, it isn't clear to me what
> you can say about the area. If you run the above code anyway, the area
> you get is as if the last time is a failure.
> 
> In my last example, I have avoided this problem by making certian the
> survival function goes to zero. I am estimating the expected survival
> time for a subject of mean age:
> 
>  clear
>  sysuse cancer
>  replace di=1 if st==39 
>  stset st, f(di)
>  sum age
>  replace age=age-r(mean)
>  stcox age,  basesurv(s)
>  stcurve, surv 
>  sort _t
>  
>  local N1=_N+1
>  set obs `N1'
>  replace _t=0 in `N1'
>  replace s=1 in `N1'
>  sort _t
>  twoway line s _t, connect(stairstep)
> 
>  gen box=s*(_t[_n+1]-_t)
>  egen area = sum(box)
>  list  area in 1
> 
> --May
>  [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/
*
*   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