Announcement

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

  • survival analysis to calculate the spells.

    Dear everyone ,
    I'm studying survival analysis,I want to calculate the multiple spells.
    My data is like this.y is the result I want.Does anyone know how to do this? I will thank you very much.


    ----------------------- copy starting from the next line -----------------------
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(time hhid x y)
     1 1 0 0
     2 1 0 0
     3 1 1 1
     4 1 0 2
     5 1 0 2
     6 1 1 3
     7 1 1 3
     8 1 0 4
     9 1 0 4
    10 1 1 5
     1 2 1 1
     2 2 0 2
     3 2 0 2
     4 2 1 3
     5 2 1 3
     6 2 1 3
     7 2 0 4
     8 2 1 5
     9 2 0 6
    10 2 0 6
    end

  • #2
    Hi, Xiaopei.

    Here is everything you need:

    https://stats.oarc.ucla.edu/stata/se...tata-survival/

    Comment


    • #3
      Dear Tiago,

      Thank you for sharing this information. I will study it.

      Comment

      Working...
      X