# 6 Best SAS Survival Analysis Procedures You Must Learn

Job-ready Online Courses: Click, Learn, Succeed, Start Now!

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.

Top 6 SAS Survival Analysis Procedures

### What is SAS Survival Analysis?

A statistical method called SAS Survival Analysis is used to examine time-to-event data, sometimes referred to as survival data. It is frequently used in domains like medical research, social sciences, engineering, and many others when the goal is to comprehend how long an event takes to occur.

The term “event” in survival analysis can refer to a variety of outcomes, including the failure of a mechanical component, the development of a disease or death in studies, the accomplishment of a goal, or any other interesting event. The analysis focuses on determining how long it will take for the event to occur and comprehending the variables that might affect it.

Data preparation, survival curve estimation, and regression model fitting are only a few of the tools and methods for doing survival analysis that are available through the statistical software package SAS. Researchers and analysts may use SAS Survival Analysis to analyse time-to-event data, identify risk variables, and forecast the likelihood of upcoming events.

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

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.

SAS Survival Analysis – Sample

### 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.

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.

SAS Survival Analysis –Â PROC ICLIFETEST

SAS Survival AnalysisÂ –Â PROC ICLIFETEST

#### 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;```

SAS/STAT Survival AnalysisÂ – PROC ICPHREG

SAS/STAT Survival AnalysisÂ – PROC ICPHREG

#### 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.

Survival Analysis in SAS/STAT – PROC LIFETEST

Survival Analysis in SAS/STAT – PROC LIFETEST

Survival Analysis in SAS/STAT – PROC LIFETEST

#### 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;```

SAS Survival Analysis –Â PROC SURVEYPHREG

#### 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.

### 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.