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

st: RE: Survival Analysis Issue


From   "Stephen P. Jenkins" <[email protected]>
To   <[email protected]>
Subject   st: RE: Survival Analysis Issue
Date   Fri, 26 Nov 2004 10:04:37 -0000

> Date: Thu, 25 Nov 2004 10:56:45 -0000
> From: "Yaseen Ghulam" <[email protected]>
> Subject: st: Survival Analysis Issue (Again)
> 
> Dear Stata Users, 
> I posted this request yesterday and have not got any 
> response. I am posting it again.
> I am using stata routines to do survival analysis. I am 
> interested in estimating expected 
> and  median survival time for each person in the sample data. 
> By following Professor 
> Stephen P. Jenkins notes and codes and using duration data I 
> got the following results. 
> 
> streg drug age, dist(weibull) nolog nohr 
> predict xb, xb 
> * median duration for each person in sample 
> ge mediand = (ln(2)*exp(-xb))^(1/e(aux_p)) 
> * expected (mean) duration for each person in sample 
> ge meand = exp(-xb/e(aux_p))*exp(lngamma(1+1/e(aux_p))) 
> 
>  Variable |       Obs        Mean    Std. Dev.       Min        Max 
> - 
> -------------+------------------------------------------------
> -------- 
>           _d |        22    .8181818     .394771          0   
>        1 
>          _t0 |        22           0           0          0   
>        0 
>           _t |        22    12.77273    8.123639          1   
>       32 
>      mediand |  22     13.0186    3.276344   8.531759    19.7746 
>        meand |  22    14.97909    3.769734   9.816569   22.75249 
> This makes sense to me because median and mean duration min 
> and max values are  
> within the range of actual max value (_t).  
> 
> But when I am using exactly these codes on my data I am 
> getting some values which  
> are quite extreme. Am I making some mistake?  

First note that the estimated mean and median can be derived directly
using -predict-. (As I recall, my Lessons showed derivations by hand for
didactic reasons.)

It is quite possible for the estimated mean and median to lie outside
the sample ranges. (Imagine hazard rates of exit from the current state
decline sharply with survival time.)  Checks using -sts- may be
informative about this sort of issue.  

[If you have discrete time survival time data, the same messages apply.]


Stephen
-------------------------------------------------------------
Professor Stephen P. Jenkins <[email protected]>
Institute for Social and Economic Research
University of Essex, Colchester CO4 3SQ, U.K.
Tel: +44 1206 873374.  Fax: +44 1206 873151.
http://www.iser.essex.ac.uk   

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