1# gdlwdzz In survival analysis, we need at least two variables to be defined in the data set, one is the indicator of event and another is time to event. The event is binary, for example, 1 = event occurred and 0 = censored, including lost to follow-up and end of follow-up. The time to event has been defined as the time when the event has been achieved or censored, whichever comes first. The censored consists of different types and the most common one is right censored.
The code may be similar to the following:More details please refer to SAS Proc phreg, etc. The entry level book I would recommend is Allison's Survival analysis using SAS. Also you may read the one I posted in Pinggu before for advanced and extensive knowledge.