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

st: Survival Analysis Issue (Again)


From   "Yaseen Ghulam" <Yaseen.Ghulam@port.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: Survival Analysis Issue (Again)
Date   Thu, 25 Nov 2004 10:56:45 -0000

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?  

Here are the results I am getting. 

    Variable |       Obs        Mean    Std. Dev.       Min        Max 
-------------+-------------------------------------------------------- 
          _d |    269512    .0049831     .070415          0          1 
         _t0 |    269512    10.33649    6.762769          0   28.32854 
          _t |    269512    10.41994    6.762693   .0629706   28.41342 
     mediand | 269512    40.65339     63.9578    .142106   1261.704 
       meand | 269512    69.90463    109.9772   .2443553   2169.535 

Help Appreciatd.


Yaseen 
University of Portsmouth
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index