# 6 Best SAS Survival Analysis Procedures – Must Learn for 2019

Today, we will discuss SAS Survival Analysis in this SAS/STAT Tutorial. Here, we will learn what are the procedures used in SAS survival analysis: PROC ICLIFETEST, PROC ICPHREG, PROC LIFETEST, PROC SURVEYPHREG, PROC LIFEREG, and PROC PHREG with syntax and example. Moreover, we will discuss SAS/STAT survival analysis example for better understanding.

Keeping you updated with latest technology trends, Join DataFlair on Telegram

## 2. What is SAS Survival Analysis?

Survival analysis is a set of methods for analyzing data in which the outcome variable is the time until an event of interest occurs. The event can be anything like birth, death, an occurrence of a disease, divorce, marriage etc. The time for the event to occur or survival time can be measured in days, weeks, months, years, etc.

For example, if the event of interest is cancer, then the survival time can be the time in years until a person develops cancer.

Read about SAS Post Processing Procedure – PROC SCORE & PROC PLM

In SAS survival analysis, subjects are closely observed over a specified time period and the focus and basic motive are to found out the time at which the event of interest occurs. Here, we cannot use linear regression methods because survival times are typically positive numbers and also ordinary linear regression may not be the best choice unless these times are first transformed in some way so that this restriction is removed.

## 3. Procedures for Survival Analysis in SAS/STAT

Following procedures to compute SAS survival analysis of a sample data. Let us explore it.

### a. PROC ICLIFETEST

This procedure in SAS/STAT is specially designed to perform nonparametric or statistical analysis of interval-censored data. In this procedure, the basic step is to first convert interval censored data to right censored data by making use of mid-point imputation.

A big disadvantage of this procedure is that it can lead to many biased estimates. The ICLIFETEST procedure implements a set of statistical methods such as ICM, EMICM algorithms, nonparametric survival estimation etc.

A syntax of PROC ICLIFETEST-

```PROC ICLIFETEST DATASET<options>;
TIME (variable, variable);```

The PROC ICLIFETEST and TIME statements are required and you must specify the left and right boundaries of the intervals in the TIME statements.

Let’s know about Multivariate Analysis Procedure – SAS/STAT

PROC ICLIFETEST Example-

```proc iclifetest data=sashelp.class;
time (height, weight);
run;```

We can use the TEST statement to test whether the underlying survival functions are the same between the groups.

Do you know SAS/STAT Exact Inference Procedures

### b. PROC ICPHREG

We can use ICPHREG procedure in SAS/STAT for interval censored data just like the ICLIFETEST procedure. It fits proportional hazards models to this data and also a variety of models that have a variety of configurations.

It makes use of full likelihood instead of a partial likelihood for estimating regression coefficients. Another great feature is that it also tests a linear hypothesis about the regression coefficients.

A syntax of PROC ICPHREG-

```PROC ICPHREG DATASET<options>;
MODEL (t1, t2) = effects </ options>;```

The PROC ICPHREG and MODEL statement is required.

PROC ICPHREG Example-

```proc icphreg data=SASHELP.CLASS;
class name sex / desc;
model (height, weight) = name sex;
run;```

Let’s learn about SAS Missing Data Analysis Procedures in detail

### c. PROC LIFETEST

The LIFETEST procedure in SAS/STAT is a non-parametric procedure for analyzing survival data. It produces Kaplan Meier plot which is a plot that provides a nonparametric maximum likelihood estimate of the survivor function.

The procedure encompasses easy customizations, macros are provided for graph template modification and it also offers style changes controls.

A syntax of PROC LIFETEST-

```PROC LIFETEST DATASET<options>;
TIME variable <*censor(list)> </ option>;```

The PROC LIFETEST and TIME statement requires.

PROC LIFETEST Example-

```proc LIFETEST data=SASHELP.CLASS;
TIME HEIGHT*WEIGHT(4);
run;```

In the above example, the time variable is height and the censoring variable is weight with value 4 indicating censored observations.

Let’s revise SAS Nonlinear Regression Procedures

### d. PROC SURVEYPHREG

In SAS/STAT, SURVEYPHREG procedure is used for performing regression analysis by using Cox proportional hazards model on survey data. We can use the Cox Model when sufficient explanatory variable and analysis on survival data.

Just like LIFETEST procedure, this procedure also tests a linear hypothesis about regression parameters. It performs other tasks such as computing variances of the regression parameters and producing observation level output statistics.

A syntax of PROC SURVEYPHREG-

```PROC surveyphreg DATASET<options>;
MODEL response <*censor(list)> = effects </ options>;```

The PROC SURVEYPHREG and MODEL statements require.

PROC SURVEYPHREG Example-

```proc surveyphreg data=SASHELP.CLASS;
model age=WEIGHT;
run;```

### e. PROC LIFEREG

We have already discussed this procedure in SAS/STAT Bayesian Analysis Tutorial.

### f. PROC PHREG

We have already discussed this procedure in SAS/STAT Bayesian Analysis Tutorial.

## 4. Conclusion

Hence, in this SAS Survival Analysis tutorial, we discussed 6 different types of procedure pf SAS/STAT survival Analysis: PROC ICLIFETEST, PROC ICPHREG, PROC LIFETEST, PROC SURVEYPHREG, PROC LIFEREG, and PROC PHREG with syntax and example.

Still, if you have any doubt, feel free to ask.

Related Article- SAS Market Research Procedure