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

Re: st: Survival Analysis Issue (Again)


From   Allen Buxton <[email protected]>
To   [email protected]
Subject   Re: st: Survival Analysis Issue (Again)
Date   Thu, 25 Nov 2004 06:09:19 -0800 (PST)

Without having checked Dr. Jenkin's code you might try
restricting your streg to a subset of your dataset
where there are about 270 thousand non-missing
observations. Something is causing the 'specification'
problem? ta drug age if _d==1 ... where _d==1, n=1343?

-Allen

--- Yaseen Ghulam <[email protected]> wrote:

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

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