Announcement

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

  • 5 year survival for each site

    Hello everyone,
    I have a dataset with hospital ID and survival data (vital status and duration of followup). I would like to create a new variable with median survival at 5 years for each hospital.
    How should I go about it?
    Appreciate all the help
    Regards
    Shitanshu

  • #2
    Shitanshu,

    It all depends on how your variables are set in your data.
    Have you panel data? (with repeated observations of several individual within each hospital ID over at least 5 years?) If yes, is it balanced? unbalanced? (do all your individual are reported for the whole time span or people leave and enter in the dataset? Dead people are still in the data with a ``dead" status or leave the file?)

    Although I'm not in medecine field, the idea of a median survival seems strange to me, because at the individual level, it is probably an indicator variable (1 if alive, 0 otherwise). And a median of a dummy variable is often not very usefull... Otherwise this survival data is not at the individual scale, but already a mean (already a survival rate) but by year? hospital? this isn't clear in your post.

    Anyway, combining bysort command with egen median(), you could create some hospital-ID median such as survival rate, but for the precise command, you'll need to tell us more about your data.

    Hope this helps,
    Charlie


    Comment


    • #3
      Shitanshu:
      welcome to the list.
      You may also want to take a look at Stata in-built [ST] (survival-time) commands.
      Echoing Charlie's wise recommendations, which tool fits your needs best depends on the way your variables were collected as well as on your research goals.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Charlie & Carlo. Shitanshu describes his data as ID, vital status, and duration of follow-up. With that data, he probably wants to estimate median survival time. In medicine and epidemiology, we often shorten that phrase to just "median survival."

        Comment


        • #5
          I share Clyde's remark. That's why Shitanshu's query made me think of Kaplan-Meier curves first.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Unfortunately, I didn't understand the mention in #1 to the creation of a new variable representing 5 years as the median for each hospital. Would this be a cut off?

            However, if Shitanshu just needs the median survival time by hospital, the command

            Code:
            . stci, by(hospital)
            may do the trick.

            Also, in the stored results after - stci -, there is the possibility to get the median, which would be found as - r(p50) -, and then create a new variable according to each hospital.

            Best,

            Marcos
            Best regards,

            Marcos

            Comment


            • #7
              Thanks all. I found a work around. The problem was the survival data went beyond 60 months (5years).
              So I restricted the data to 60 months. Everything after 60 months was censored at 60 months.
              I fed the new variable into stset'

              Comment


              • #8
                I can't think of a reason why data beyond five years would be a "problem". Exactly why do you think so?

                Admittedly, You can estimate t median survival time, with data restricted to five years if survival rates fall below 50% before five years. However restricting yourself to a single parameter (median time) is a mistake with survival data (or any data). What about quartiles, for example? And, if there is substantial experience beyond five years, then you can say nothing about it. For example, you would miss crossing curves beyond five years. The best summary of survival, in my opinion, is a graph of the entire survival curve.
                Last edited by Steve Samuels; 11 Jan 2016, 22:10.
                Steve Samuels
                Statistical Consulting
                [email protected]

                Stata 14.2

                Comment

                Working...
                X