Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • estimating 5 year survival

    Hi,
    I have a dataset with survival months and event (dead/alive). I have been able to stset it and calculate various survival statistics from STATA menu. However, I could not find out how to estimate 5 year survival rate in my data set? Seems simple on the face of it but just cannot figure this out. Many thanks Arnaud

  • #2
    You can read that of the survivor function. If you type sts list, the survivor function gets displayed on screen. You then look up the survivor function for 60 months (5 years). If no event happend at exactly 60 months, then that will not appear in your table, but this function is a step function, so the time point immediatly preceding 60 is the estimate you are looking for. For example:

    Code:
    . sysuse cancer
    (Patient survival in drug trial)
    
    . sts list
    
            Failure _d: died
      Analysis time _t: studytime
    
    Kaplan–Meier survivor function
    
                 At                  Survivor      Std.
      Time     risk   Fail   Lost    function     error     [95% conf. int.]
    ------------------------------------------------------------------------
         1       48      2      0      0.9583    0.0288     0.8435    0.9894
         2       46      1      0      0.9375    0.0349     0.8186    0.9794
         3       45      1      0      0.9167    0.0399     0.7930    0.9679
         4       44      2      0      0.8750    0.0477     0.7427    0.9418
         5       42      2      0      0.8333    0.0538     0.6943    0.9129
         6       40      2      1      0.7917    0.0586     0.6474    0.8820
         7       37      1      0      0.7703    0.0608     0.6236    0.8656
         8       36      3      1      0.7061    0.0661     0.5546    0.8143
         9       32      0      1      0.7061    0.0661     0.5546    0.8143
        10       31      1      1      0.6833    0.0678     0.5302    0.7957
        11       29      2      1      0.6362    0.0708     0.4807    0.7564
        12       26      2      0      0.5872    0.0733     0.4304    0.7145
        13       24      1      0      0.5628    0.0742     0.4060    0.6931
        15       23      1      1      0.5383    0.0749     0.3821    0.6712
        16       21      1      0      0.5127    0.0756     0.3570    0.6483
        17       20      1      1      0.4870    0.0761     0.3326    0.6249
        19       18      0      2      0.4870    0.0761     0.3326    0.6249
        20       16      0      1      0.4870    0.0761     0.3326    0.6249
        22       15      2      0      0.4221    0.0786     0.2680    0.5684
        23       13      2      0      0.3572    0.0788     0.2087    0.5083
        24       11      1      0      0.3247    0.0780     0.1809    0.4771
        25       10      1      1      0.2922    0.0767     0.1543    0.4449
        28        8      1      1      0.2557    0.0753     0.1247    0.4093
        32        6      0      2      0.2557    0.0753     0.1247    0.4093
        33        4      1      0      0.1918    0.0791     0.0676    0.3634
        34        3      0      1      0.1918    0.0791     0.0676    0.3634
        35        2      0      1      0.1918    0.0791     0.0676    0.3634
        39        1      0      1      0.1918    0.0791     0.0676    0.3634
    ------------------------------------------------------------------------
    If we want to know the one year survival rate then that is 0.5872 (we can read that in the table at 12 months), and if we want to know the 1.5 year survival rate then that is 0.4870 (18 months is not in the table, but it is a step function so the closest month below 18 months is the row we want to look at, in this case 17 months).
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      thank you Maarten

      Comment


      • #4
        Hi, a quick follow-up question: is there a way to automate this across many variables and create a nice table in Stata vs having to stlist each covariate, manually look and having to assemble table manually?

        Comment


        • #5
          I don't understand: you don't stlist a covariate; the time is till event is not a covariate/explanatory/independent/x-variable but the explained/dependent/y-variable.

          Maybe you want to know the 5-year survival rates for different groups?
          ---------------------------------
          Maarten L. Buis
          University of Konstanz
          Department of history and sociology
          box 40
          78457 Konstanz
          Germany
          http://www.maartenbuis.nl
          ---------------------------------

          Comment


          • #6
            Here is an example for the one-year survival rate

            Code:
            tempfile temp
            sysuse cancer, clear
            sts list, by(drug) saving(`temp')
            frame create tab
            frame change tab
            use `temp'
            drop if time > 12
            bys drug (time) : keep if _n == _N
            decode drug, gen(row)
            mkmat survivor lb ub, matrix(res) rownames(row)
            matlist res, format(%9.2g)
            frame change default
            frame drop tab
            ---------------------------------
            Maarten L. Buis
            University of Konstanz
            Department of history and sociology
            box 40
            78457 Konstanz
            Germany
            http://www.maartenbuis.nl
            ---------------------------------

            Comment


            • #7
              Hello Maarteen,

              I tried using the code above for 2 groups of variables : Prognostic Factor first (low, intermediate, high) and Race (3 values);
              tempfile temp
              sts list, by(prog race) saving(`temp')
              frame create tab
              frame change tab
              use `temp'
              drop if time > 24
              bys prog race (time) : keep if _n == _N
              decode prog race, gen(row)
              mkmat survivor lb ub, matrix(res) rownames(row)
              matlist res, format(%9.4g)
              frame change default
              frame drop tab

              Stata is telling me:
              decode prog race, gen(row)
              too many variables specified

              Am I doing anything wrong or is this truly a limitation?
              Is there a way around this?

              Comment

              Working...
              X