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

st: Re: -stsum- vs -stci-


From   Weihua Guan <[email protected]>
To   [email protected]
Subject   st: Re: -stsum- vs -stci-
Date   Tue, 19 Nov 2002 11:43:51 -0600

--Constantine Daskalakis <[email protected]> wrote,

> [...]
> I have noticed a slight discrepancy in the results from -stsum- and -stci- 
> in failure-time data.
> [...]

The problem rises in the second part of the data:

. list if group == 2

         group          t       fail
  7.         2         11          1
  8.         2         12          1
  9.         2         12          1
 10.         2         14          1
 11.         2         15          1
 12.         2         16          1

Constantine finds -stsum- returns 14 as median survial time while -stci- gives
12.  This discrepancy is due to numeric precision in the methods used to
generate the baseline survival function.  -stsum- calls -stcox- to fit a
constant-only model and specifies -basesurv()- to obtain the baseline survival
function.  Let's see what happens:

. qui stcox if group==2, estimate bases(S1)

. format %20.16f S1

. list t S1 if group==2

             t                    S1
  7.        11    0.8333333333333334
  8.        12    0.5000000198682150
  9.        12    0.5000000198682150
 10.        14    0.3333333465788100
 11.        15    0.1666666732894050
 12.        16    0.0000000000000000

Note that "S1" is slightly greater than 0.5 at time 12, and the median
survival time is defined as the largest value of time having S1<=0.5.  So
-stsum- goes to the next observation, which is t=14, to get the median
survival time.

We will look into this problem for fix.


Weihua Guan <[email protected]>
Stata Corp.

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