Announcement

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

  • Median Follow-up time

    Hello,
    could somebody give me an advice on how to calculate median follow-up time?
    Thank you very much for your help.
    Diagdat = Date of diagnosis
    lBeo = last observation


    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input int(Diagdat lBeo) byte Status long id
    20313 22022 1   18230
    18396 19362 0   14134
    20481 22022 1   18551
    19423 22022 1   16346
    18976 22022 1   15389
    18365 21655 0 8350302
    18044 20103 0   13457
    19424 22116 1   16342
    20178 20943 0 8384912
    19309 20181 1 8366678
    end
    format %td Diagdat
    format %tdnn/dd/CCYY lBeo
    label values Status Status
    label def Status 0 "alive", modify
    label def Status 1 "died", modify
    
    stset lBeo, id(id) origin (Diagdat) failure(Status=1) scale (30.25)

  • #2
    Code:
    isid id
    quietly summarize _t, detail
    display in smcl as text "Median follow-up (months): " as result %3.0f r(p50)

    Comment


    • #3
      Thank you very much for your quick help. This helped a lot, but I'am not sure wether this is the optimal approach to calculate it.
      Is there also a Method to calculate reverse Kaplan-Meier estimate as suggested by Schemper and Smith (Control Clin Trials, 1996,17:343–346) and explained for R on this website:
      https://publicifsv.sund.ku.dk/~tag/T...lAnalysis.html ( Chapter: Estimation of the median follow-up time)

      Comment


      • #4
        Originally posted by frederik baumgermany View Post
        . . . I'am not sure wether this is the optimal approach to calculate it.
        Is there also a Method to calculate reverse Kaplan-Meier estimate . . .
        Are you looking to estimate median survival time? I'm not sure anymore what it is that you're seeking.

        You asked for median follow-up interval, and that's what I showed you.

        Follow-up and survival are supposed to be independent; one of the assumptions.

        Comment


        • #5
          OK. They're looking for potential follow-up time, and estimate it by reversing the sense of the censoring (failure) variable.

          I'm not able to download in a readable format the GBSG2 R dataset that they reference in order to verify my crack at the Stata equivalent code, and I'm not going to circumvent the paywall for the Schemper and Smith paper, but you can get an idea of what to do from this PharmaSUG proceedings paper from last year by industrial scientists Nikita Sathish and Chia-Ling Ally Wu.

          Comment


          • #6
            Originally posted by frederik baumgermany View Post
            Is there also a Method to calculate reverse Kaplan-Meier estimate as . . . explained for R on this website
            Yes.

            As mentioned, flip the sense of the censoring (failure) variable.

            So, instead of
            Code:
            stset lBeo, id(id) origin (Diagdat) failure(Status=1) scale (30.25)
            you'd
            Code:
            isid id
            quietly stset lBeo, /* id(id) */ origin(Diagdat) failure(Status==0) scale(30.25)
            stci
            Attached Files

            Comment


            • #7
              Thank you so much for your help!!

              Comment

              Working...
              X