Tuesday, May 17, 2011

Survival Analysis Example Using LIFETEST

Survival data consist of a response (event time, failure time, or survival time) variable that measures the duration of time until a specified event occurs and possibly a set of independent variables thought to be associated with the failure time variable. These independent variables (concomitant variables, covariates, or prognostic factors) can be either discrete, such as sex or race, or continuous, such as age or temperature. The system that gives rise to the event of interest can be biological, as for most medical data, or physical, as for engineering data. The purpose of survival analysis is to model the underlying distribution of the failure time variable and to assess the dependence of the failure time variable on the independent variables.

The following data is from Prentice, R.L. "Exponential survivals with censoring and explanatory variables.", Biometrika 60, 1973, 279-288.   

The LIFETEST procedure computes nonparametric estimates of the survival distribution function. You can request either the product-limit (Kaplan and Meier) or the life-table (actuarial) estimate of the distribution. PROC LIFETEST computes nonparametric tests to compare the survival(Kaplan-Meier) curves of two or more groups. No covariates involved. If covariates are involved, use Cox proportional hazards model.

H0: S1(t) = S2(t)
HA: S1(t) ^= S2(t)

PROC LIEFTEST PLOTS=(S) LINEPRINTER DATA=DSV;
TIME WKS*CENS(1);
STRATA VAC;
run;

proc phreg data=hsv
model wks*cens(1) = trt /ties=exact;
run;