Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The LIFETEST Procedure

PROC LIFETEST Statement

PROC LIFETEST < options > ;
The PROC LIFETEST statement invokes the procedure. The following options can appear in the PROC LIFETEST statement and are described in alphabetic order. If no options are requested, PROC LIFETEST computes and displays product-limit estimates of the survival distribution within each stratum and tests the equality of the survival functions across strata.

Task Options Description
Specify Data SetDATA=specifies the input SAS data set
 OUTSURV=names an output data set to contain survival estimates and confidence limits
 OUTTEST=names an output data set to contain rank test statistics for association of survival time with covariates limits
Specify ModelALPHA=sets confidence level for survival estimates
 ALPHAQT=sets confidence level for survival time quartiles
 INTERVALS=specifies interval endpoints for life table calculations
 MAXTIME=sets maximum value of time variable for plot
 METHOD=specifies method to compute survivor function
 MISSINGallows missing values to be a stratum level
 NINTERVAL=specifies number of intervals for life table estimates
 SINGULAR=sets tolerance for testing singularity of covariance matrix of rank statistics
 TIMELIM=specifies the time limit used to estimate the mean survival time and its standard error
 WIDTH=specifies width of intervals for life table estimates
Control OutputCENSOREDSYMBOL=defines symbol used for censored observations in plots
 EVENTSYMBOL=specifies symbol used for event observations in plots
 FORMCHAR(1,2,7,9)=defines characters used for line printer plot axes
 LINEPRINTERspecifies that plots are produced by line printer
 NOCENSPLOTsuppresses the plot of censored observations
 NOPRINTsuppresses display of output
 NOTABLEsuppresses display of survival function estimates
 PLOTS=plots survival estimates
 REDUCEOUTspecifies that only INTERVAL= or TIMELIST= observations are listed in the OUTSURV= data set
 TIMELIST=specifies a list of time points at which the Kaplan-Meier estimates are displayed
Enhance Graphical OutputANNOTATE=specifies an annotate data set that adds features to plots
 DESCRIPTION=specifies string that appears in the description field of the PROC GREPLAY master menu for the plots
 GOUT=specifies graphics catalog name for saving graphics output
 LANNOTATE=specifies an input data set that contains variables for local annotation


ALPHA=value
specifies a number between 0.0001 and 0.9999 that sets the confidence level for the confidence intervals for the survivor function. The confidence level for the interval is 1 - ALPHA. For example, the option ALPHA=0.05 requests a 95% confidence interval for the SDF at each time point. The default value is 0.05.

ALPHAQT=value
specifies a number between 0.0001 and 0.9999 that sets the level for the confidence intervals for the quartiles of the survival time. The confidence level for the interval is 1 - ALPHAQT. For example, the option ALPHAQT=0.05 requests a 95% confidence interval for the quantiles of the survival time. The default value is 0.05.

ANNOTATE=SAS-data-set
ANNO=SAS-data-set
specifies an input data set that contains appropriate variables for annotation. The ANNOTATE= option enables you to add features (for example, labels explaining extreme observations) to plots produced on graphics devices. The ANNOTATE= option cannot be used if the LINEPRINTER option is specified. The data set specified must be an ANNOTATE= type data set, as described in SAS/GRAPH Software: Reference.

The data set specified with the ANNOTATE= option in the PROC LIFETEST statement is "global" in the sense that the information in this data set is displayed on every plot produced by a single invocation of PROC LIFETEST.

CENSOREDSYMBOL=name | 'string'
CS=name | 'string'
specifies the symbol value for the censored observations. The value, name or 'string', is the symbol value specification allowed in SAS/GRAPH software. The default is CS=CIRCLE. If you want to omit plotting the censored observations, specify CS=NONE. The CENSOREDSYMBOL= option cannot be used if the LINEPRINTER option is specified.

DATA=SAS-data-set
names the SAS data set used by PROC LIFETEST. By default, the most recently created SAS data set is used.

DESCRIPTION='string '
DES='string '
specifies a descriptive string of up to 40 characters that appears in the "Description" field of the graphics catalog. The description does not appear on the plots. By default, PROC LIFETEST assigns a description of the form PLOT OF vname vs hname, where vname and hname are the names of the y variable and the x variable, respectively. The DESCRIPTION= option cannot be used if the LINEPRINTER option is specified.

EVENTSYMBOL=name | 'string'
ES=name | 'string'
specifies the symbol value for the event observations. The value, name or 'string', is the symbol value specification allowed in SAS/GRAPH software. The default is ES=NONE. The EVENTSYMBOL= option cannot be used if the LINEPRINTER option is specified.

FORMCHAR(1,2,7,9)='string'
defines the characters used for constructing the vertical and horizontal axes of the line printer plots. The string should be four characters. The first and second characters define the vertical and horizontal bars, respectively, which are also used in drawing the steps of the product-limit survival function. The third character defines the tick mark for the axes, and the fourth character defines the lower left corner of the plot. If the FORMCHAR option in PROC LIFETEST is not specified, the value supplied, if any, with the system option FORMCHAR= is used. The default is FORMCHAR(1,2,7,9)='|-+-'. Any character or hexadecimal string can be used to customize the plot appearance. To send the plot output to a printer with the IBM graphics character set (1 or 2) or display it directly on your PC screen, you can use the following hexadecimal representation

   formchar(1,2,7,9)='B3C4C5C0'x


or system option

   formchar='B3C4DAC2BFC3C5B4C0C1D9'x


Refer to the chapter titled "The PLOT Procedure," in the SAS Procedures Guide or the section "System Options" in SAS Language Reference: Dictionary for further information.

GOUT=graphics-catalog
specifies the graphics catalog for saving graphics output from PROC LIFETEST. The default is WORK.GSEG. The GOUT= option cannot be used if the LINEPRINTER option is specified. For more information, refer to the chapter titled "The GREPLAY Procedure" in SAS/GRAPH Software: Reference.
INTERVALS=values
specifies a list of interval endpoints for the life table calculations. These endpoints must all be nonnegative numbers. The initial interval is assumed to start at zero whether or not zero is specified in the list. Each interval contains its lower endpoint but does not contain its upper endpoint. When this option is used with the product-limit method, it reduces the number of survival estimates displayed by displaying only the estimates for the smallest time within each specified interval. The INTERVALS= option can be specified in any of the following ways:

list separated by blanks intervals=1 3 5 7
list separated by commas intervals=1,3,5,7
x to y intervals=1 to 7
x to y by z intervals=1 to 7 by 1
combination of the above intervals=1,3 to 5,7


For example, the specification
   intervals=5,10 to 30 by 10


produces the set of intervals
\{ [0,5), [5,10), [10,20), [20,30), [30,\infty) \}

LANNOTATE=SAS-data-set
LANN=SAS-data-set
specifies an input data set that contains variables for local annotation. You can use the LANNOTATE= option to specify a different annotation for each BY group, in which case the BY variables must be included in the LANNOTATE= data set. The LANNOTATE= option cannot be used if the LINEPRINTER option is specified. The data set specified must be an ANNOTATE= type data set, as described in SAS/GRAPH Software: Reference.

If there is no BY-group processing, the ANNOTATE= and LANNOTATE= options have the same effects.

LINEPRINTER
LS
specifies that plots are produced by a line printer instead of by a graphical device.

MAXTIME=value
specifies the maximum value of the time variable allowed on the plots so that outlying points do not determine the scale of the time axis of the plots. This parameter only affects the displayed plots and has no effect on the calculations.

METHOD=type
specifies the method used to compute the survival function estimates. Valid values for type are as follows.

PL | KM
specifies that product-limit (PL) or Kaplan-Meier (KM) estimates are computed.

ACT | LIFE | LT
specifies that life table (or actuarial) estimates are computed.

By default, METHOD=PL.

MISSING
allows missing values for numeric variables and blank values for character variables as valid stratum levels. See the section "Missing Values" for details.

By default, PROC LIFETEST does not use observations with missing values for any stratum variables.

NINTERVAL=value
specifies the number of intervals used to compute the life table estimates of the survivor function. This parameter is overridden by the WIDTH= option or the INTERVALS= option. When you specify the NINTERVAL= option, PROC LIFETEST tries to find an interval that results in round numbers for the endpoints. Consequently, the number of intervals may be different from the number requested. Use the INTERVALS= option to control the interval endpoints. The default is NINTERVAL=10.

NOCENSPLOT
NOCENS
requests that the plot of censored observations be suppressed when the PLOTS= option is specified. This option is not needed when the life table method is used to compute the survival estimates, since the plot of censored observations is not produced.

NOPRINT
suppresses the display of output. This option is useful when only an output data set is needed. Note that this option temporarily disables the Output Delivery System (ODS). For more information, see Chapter 15, "Using the Output Delivery System."
NOTABLE
suppresses the display of survival function estimates. Only the number of censored and event times, plots, and test results are displayed.

OUTSURV=SAS-data-set
OUTS=SAS-data-set
creates an output SAS data set to contain the estimates of the survival function and corresponding confidence limits for all strata. See the section "Output Data Sets" for more information on the contents of the OUTSURV= SAS data set.

OUTTEST=SAS-data-set
OUTT=SAS-data-set
creates an output SAS data set to contain the overall chi-square test statistic for association with failure time for the variables in the TEST statement, the values of the univariate rank test statistics for each variable in the TEST statement, and the estimated covariance matrix of the univariate rank test statistics. See the section "Output Data Sets" for more information on the contents of the OUTTEST= SAS data set.

PLOTS= ( type <(NAME=name)> <, ..., type <(NAME=name)> > )
creates plots of survival estimates or censored observations, where type is the type of plot and name is a catalog entry name of up to eight characters. Valid values of type are as follows:

CENSORED | C
specifies a plot of censored observations by strata.

SURVIVAL | S
specifies a plot of the estimated SDF versus time.

LOGSURV | LS
specifies a plot of the -log( estimated SDF) versus time.

LOGLOGS | LLS
specifies a plot of the log(-log( estimated SDF) versus log( time).

HAZARD | H
specifies a plot of the estimated hazard function versus time.

PDF | P
specifies a plot of the estimated probability density function versus time.

Parentheses are required in specifying the plots. For example,

   plots = (s)


requests a plot of the estimated survivor function versus time, and

   plots = (s(name=Surv2), h(name=Haz2))


requests a plot of the estimated survivor function versus time and a plot of the estimated hazard function versus time, with Surv2 and Haz2 as their catalog names, respectively.

REDUCEOUT
specifies that the OUTSURV= data set contains only those observations that are included in the INTERVALS= or TIMELIST= option. This option has no effect if the OUTSURV= option is not specified. It also has no effect if neither the INTERVALS= option nor the TIMELIST= option is specified.

SINGULAR=value
specifies the tolerance for testing singularity of the covariance matrix for the rank test statistics. The test requires that a pivot for sweeping a covariance matrix be at least this number times a norm of the matrix. The default value is 1E-12.

TIMELIM=time-limit
specifies the time limit used in the estimation of the mean survival time and its standard error. The mean survival time can be shown to be the area under the Kaplan-Meier survival curve. However, if the largest observed time in the data is censored, the area under the survival curve is not a closed area. In such a situation, you can choose a time limit L and estimate the mean survival curve limited to a time L (Lee 1992, pp. 72-76). This option is ignored if the largest observed time is an event time. Valid time-limit values are as follows.

EVENT  |  LET
specifies that the time limit L is the largest event time in the data. TIMELIM=EVENT is the default.
OBSERVED  |  LOT
specifies that the time limit L is the largest observed time in the data.
number
specifies that the time limit L is the given number. The number must be positive and at least as large as the largest event time in the data.

TIMELIST=number-list
specifies a list of time points at which the Kaplan-Meier estimates are displayed. The time points are listed in the column labeled as _TIME_. Since the Kaplan-Meier survival curve is a decreasing step function, each given time point falls in an interval that has a constant survival estimate. The event time that corresponds to the beginning of the time interval is displayed along with its survival estimate.

WIDTH=value
sets the width of the intervals used in the life table calculation of the survival function. This parameter is overridden by the INTERVALS= option.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.