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

From |
Michael McCulloch <mm@pinest.org> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: R: Estimating the probability of censoring |

Date |
Thu, 25 Sep 2008 18:06:21 -0700 |

Antoine, I believe you are correct that the predicted baseline survival function method is better, and the reason I think so is that only with this approach using does the probability of being censored arrive at zero after the last subject!

using predicted baseline survival function sounds like a better idea (from http://www.ats.ucla.edu/stat/stata/seminars/stata_survival/default.htm#graphs) :

stcox drug age, nohr bases(surv0)

gen cens_adj2=surv0^(exp(coeff_cens))

list id drug age died cens p_cens cens_adj2 in 40/48, clean noobs

id drug age died cens p_cens cens_a~2

40 3 50 0 .58476475 .8601028 .6717925

41 3 55 1 .58476475 .9429854 .6465274

42 3 57 1 .51166915 .9783332 .5577559

43 3 48 0 .51166915 .8290267 .6097336

44 3 56 0 .34111277 .9604967 .3796235

45 3 60 1 .34111277 1.033855 .3525544

46 3 62 0 .22740851 1.072609 .2088839

47 3 48 0 .11370426 .8290267 .1545282

48 3 52 0 0 .8923438 0

Antoine

Antoine Terracol wrote:

Hello _all

I might be missing something, but isn't the correct way to do this more like (the part where I generate cens_adj):

sysuse cancer.dta, clear

gen id = _n // generate individual IDs

stset studytime, failure(died==0) // note that total person-time is 744

*estimate the unadjusted probability of censoring

sts gen cens = s

*estimate the adjusted probability of censoring

stcox drug age, nohr basec(cum)

predict coeff_cens, xb // predicts linear coefficients of censoring

gen p_cens = exp(coeff_cens) // adjusted probability of time-to-censoring

gen cens_adj=exp(-cum*exp(coeff_cens))

*lists the results

list id drug age died cens p_cens cens_adj in 40/48, clean noobs

id drug age died cens p_cens cens_adj

40 3 50 0 .58476475 .8601028 .6811302

41 3 55 1 .58476475 .9429854 .6563864

42 3 57 1 .51166915 .9783332 .5705886

43 3 48 0 .51166915 .8290267 .6216006

44 3 56 0 .34111277 .9604967 .4199265

45 3 60 1 .34111277 1.033855 .3930005

46 3 62 0 .22740851 1.072609 .2585016

47 3 48 0 .11370426 .8290267 .2171345

48 3 52 0 0 .8923438 .0710848

Antoine

* * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

* * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: R: Estimating the probability of censoring***From:*"Carlo Lazzaro" <carlo.lazzaro@tin.it>

**Re: st: R: Estimating the probability of censoring***From:*Michael McCulloch <mm@pinest.org>

**Re: st: R: Estimating the probability of censoring***From:*Antoine Terracol <terracol@univ-paris1.fr>

**Re: st: R: Estimating the probability of censoring***From:*Antoine Terracol <terracol@univ-paris1.fr>

- Prev by Date:
**Re: st: Re: Probit, Tobit Diagnostics** - Next by Date:
**st: what does Stata do when I type "var1==var2==0"?** - Previous by thread:
**Re: st: R: Estimating the probability of censoring** - Next by thread:
**Re: st: R: Estimating the probability of censoring** - Index(es):

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