Announcement

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

  • Is it possible to make test for survival between groups at a defined specific time?

    -sts list- command could compute the confidence intervals for survival function at specific time interval. However, no comparison was made and so no P values.

    by -sts ci-



    by -sts list-

    Last edited by Tom Hsiung; 09 May 2018, 01:57.

  • #2
    Tom:
    you may want to consider -logrank-:
    Code:
    . sts test drug if age==67, logrank
    
             failure _d:  died
       analysis time _t:  studytime
    
    
    Log-rank test for equality of survivor functions
    
          |   Events         Events
    drug  |  observed       expected
    ------+-------------------------
    0     |         1           0.33
    1     |         2           2.67
    ------+-------------------------
    Total |         3           3.00
    
                chi2(1) =       2.00
                Pr>chi2 =     0.1573
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hi, Carlo

      Thank you for your help. SO the key point is the "age==" parameter which defines the timer interval (from time zero to time t). For instance, if the age== is 5 (days), the survival comparison is the 5 day-survival, and if 7 (days) is the 7 day-survival. Did the way I understand correct?

      Tom

      Comment


      • #4
        Oh, it seems that it was the log-rank test of that particular time interval, like the 5th day, the 10th day. I am trying to know the overall log-rank test results for a duration (from day 0 to a particular day later). I got errors from my command.

        Click image for larger version

Name:	Screen Shot 2018-05-09 at 5.17.11 PM.png
Views:	1
Size:	1.63 MB
ID:	1443472


        Tom

        Comment


        • #5
          Figured it out! Thank you!

          Click image for larger version

Name:	Screen Shot 2018-05-09 at 5.25.13 PM.png
Views:	1
Size:	1.60 MB
ID:	1443476

          Comment


          • #6
            Your screen shots are unreadable (blurred & small on my monitor), which is why FAQ 12 asks that you not post them. Upload graphs as .png documents and show results, code, and data listings posted from your results window or log file between CODE delimiters, described in FAQ 12.
            Last edited by Steve Samuels; 09 May 2018, 14:29.
            Steve Samuels
            Statistical Consulting
            [email protected]

            Stata 14.2

            Comment


            • #7
              While I can't read any of your screen shots, I will correct Carlo's typo: If you wanted to do the log rank test on survival through age 67, the correct syntax would be:
              Code:
              sts test drug if age<=67, logrank
              Steve Samuels
              Statistical Consulting
              [email protected]

              Stata 14.2

              Comment


              • #8
                Steve is correct.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment

                Working...
                X