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 -----------------------
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
Comment