Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: survival analysis help

From   Steve Samuels <>
Subject   Re: st: survival analysis help
Date   Fri, 17 Feb 2012 22:35:28 -0500

Your problem is to define the survival time variable and the event indicator appropriately.  The manual entry for -stset- has many examples.


time = 1) time to death on waiting list (if died of  on waiting list): event =1
     = 2) time to transplant (if transplanted ): event = 2
     = 3) time to end of observation still alive on waiting list when observations): event =3
     = 4) time to death of unrelated cause while on waiting list: event =4
     = 5) time to leaving the waiting list for other reasons: event =5 etc.

While you could  define event =0 for cases 2/5, I have found it useful to have a single variable that captures status at the end of followup for the outcome event.


stset time, fail(event=1)


On Feb 17, 2012, at 8:14 PM, Eugene DePasquale wrote:


I am having difficulty with survival analysis with Stata and survival
on the transplant waiting list. There are 2 major possibilities (for
simplicity) - either death on the waiting list or transplantation.
Death is the event, while transplantation would be a censoring event
as I am interested in survival for those who are not transplanted.

event = 1 (death on waiting list) & event = 0 (alive on waiting list)

transplant = 1 (transplanted) & transplant = 0 (not transplanted)

txdate = date of transplant

I am not sure how to set this up appropriately - I have this below,
but I'm not sure how to incorporate the censoring.

stset time, fail(event) id(id)

Any help would be greatly appreciated.

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index