Wednesday, June 23, 2010

Stata: stset and missing values

If a censoring indicator variable has missing values (but the actual time variable does not), one would expect Stata to omit that observation from subsequent survival analyses, or at least to give a warning that values are missing. However, it treats these observations as censored! For example: 

. tab ios, miss

        ios |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         53       46.09       46.09
          1 |         55       47.83       93.91
          . |          7        6.09      100.00
------------+-----------------------------------
      Total |        115      100.00 


. count if osmo==. 
    0 

. stset osmo, fail(ios)

     failure event:  ios != 0 & ios < .
obs. time interval:  (0, osmo]
 exit on or before:  failure

------------------------------------------------------------------------------
      115  total obs.
        0  exclusions
------------------------------------------------------------------------------
      115  obs. remaining, representing
       55  failures in single record/single failure data
 2609.162  total analysis time at risk, at risk from t =         0
                             earliest observed entry t =         0
                                  last observed exit t =  93.92876 


. stci

         failure _d:  ios
   analysis time _t:  osmo

             |    no. of 
             |  subjects         50%     Std. Err.     [95% Conf. Interval]
-------------+-------------------------------------------------------------
       total |       115    29.42466      3.419791       22.126    35.9014


. tab  ios _d, miss

           |          _d
       ios |         0          1 |     Total
-----------+----------------------+----------
         0 |        53          0 |        53
         1 |         0         55 |        55
         . |         7          0 |         7
-----------+----------------------+----------
     Total |        60         55 |       115

 

No comments:

Post a Comment

Subscribe via email

Enter your email address:

Delivered by FeedBurner

Followers

Blog Archive

google analytics