The LIFETEST Procedure |
PROC LIFETEST Statement |
The PROC LIFETEST statement invokes the procedure. Optionally, this statement identifies an input and an OUTSURV= data set, and specifies the computation details of the survivor function estimation. The options listed in Table 49.1 are available in the PROC LIFETEST statement and are described in alphabetic order. If no options are requested, PROC LIFETEST computes and displays the product-limit estimate of the survivor function; and if an ODS GRAPHICS ON statement is specified, a plot of the estimated survivor function is also displayed.
Option |
Description |
---|---|
Input and Output Data Sets |
|
Specifies the input SAS data set |
|
Names an output data set to contain survival estimates and confidence limits |
|
Names an output data set to contain rank test statistics for association of survival time with covariates |
|
Nonparametric Estimation |
|
Specifies interval endpoints for life-table estimates |
|
Adds the Nelson-Aalen estimates |
|
Specifies the method to compute survivor function |
|
Specifies the number of intervals for life-table estimates |
|
Specifies the width of intervals for life-table estimates |
|
Confidence Limits for Survivorship |
|
Sets the confidence level for interval estimation estimates |
|
Specifies the maximum time for confidence band |
|
Specifies the minimum time for confidence band |
|
Specifies the type of confidence band in the OUTSURV= data set |
|
Specifies the transformation applied to the survivor function to obtain confidence limits |
|
Line Printer Plots |
|
Defines the characters used for line printer plot axes |
|
Specifies that plots be produced by a line printer |
|
Specifies the maximum time value for plotting |
|
Suppresses the plot of censored observations |
|
Specifies the plots to display |
|
ODS Graphics |
|
Specifies the maximum time value for plotting |
|
specifies plots to display |
|
Traditional Graphics |
|
Specifies an Annotate data set that adds features to plots |
|
Defines the symbol used for censored observations in plots |
|
specifies the string that appears in the description field of the PROC GREPLAY master menu for the plots |
|
Specifies the symbol used for event observations in plots |
|
Specifies the graphics catalog name for saving graphics output |
|
Specifies an input data set that contains variables for local annotation |
|
Specifies the maximum time value for plotting |
|
Specifies the plots to display |
|
Control Output |
|
Adds the number of subjects at risk to the survival estimate table |
|
Suppresses the display of printed output |
|
Suppresses the display of survival function estimates |
|
Displays only the estimate for the smallest time in each interval |
|
Suppresses the Number Left column in the survival estimate table |
|
Specifies a list of time points to display the survival estimate |
|
Specifies that only INTERVAL= or TIMELIST= observations be listed in the OUTSURV= data set |
|
Miscellaneous |
|
Sets the confidence level for survival time quartiles |
|
Allows missing values to be a stratum level |
|
Sets the tolerance for testing singularity of covariance matrix of rank statistics |
|
Outputs the standard error for the survival estimators to the OUTSURV= data set |
|
Specifies the time limit used to estimate the mean survival time and its standard error |
The PLOTS= option in the PROC LIFETEST statement specifies the plots to display. You can select one of the following three types of graphics in PROC LIFETEST: line printer, traditional, and ODS. If you specify the LINEPRINTER option, you get line printer plots; otherwise you get the traditional graphics if ODS Graphics is not enabled, and you get the ODS Graphics plots if the ODS GRAPHICS ON statement is specified. The following table depicts the behavior regarding the type of graphics produced:
ODS Graphics |
PROC LIFETEST Options |
Behavior |
|
OFF |
No graphics |
||
OFF |
LINEPRINTER |
No graphics |
|
OFF |
PLOTS=SURVIVAL |
Traditional graphics |
|
OFF |
PLOTS=SURVIVAL |
LINEPRINTER |
Line printer plot |
ON |
ODS Graphics survival plot |
||
ON |
LINEPRINTER |
No graphics |
|
ON |
PLOTS=SURVIVAL |
ODS Graphics |
|
ON |
PLOTS=SURVIVAL |
LINEPRINTER |
Line printer plot |
ODS Graphics is now the preferred method of requesting graphics. Many new features have been added to the ODS Graphics plots in PROC LIFETEST. For example, you can display the number of subjects at risk in a survival plot through ODS Graphics, but such a feature is not available in traditional graphics or line printer plots. The PLOTS= option syntax is documented separately for each type of graphics and is preceded by a heading that indicates the graphics type.
specifies the level of significance for the % confidence intervals for the survivor, hazard, and density functions. For example, the option ALPHA=0.05 requests the 95% confidence limits for the survivor function. The default value is 0.05.
specifies the significance level for the % confidence intervals for the quartiles of the survival time. For example, the option ALPHAQT=0.05 requests a 95% confidence interval for the quartiles of the survival time. The default value is 0.05.
specifies an input data set that contains appropriate variables for annotation of the traditional graphics. 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 or the ODS GRAPHICS ON statement 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 in every plot produced by a single invocation of PROC LIFETEST.
adds a column that represents the number of subjects at risk to the survival estimate table. Also added is a column that represents the number of events at each observed time. This option has no effect for the life-table method.
specifies the maximum time for the confidence bands. The default is the largest observed event time. If the specified BANDMAX= time exceeds the largest observed event time, it is truncated to the largest observed event time.
specifies the minimum time for the confidence bands. The default is the smallest observed event time. For the equal-precision band, if the BANDMIN= value is less than the smallest observed event time, it is defaulted to the smallest observed event time.
specifies the symbol value for the censored observations in traditional graphics. 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 or the ODS GRAPHICS ON statement is specified.
specifies the confidence bands to be output to the OUTSURV= data set. Confidence bands are available for METHOD=KM, METHOD=BRESLOW, or METHOD=FH. You can use the following keywords:
specifies the transformation applied to to obtain the pointwise confidence intervals and the confidence bands for the survivor function as well as the confidence intervals for the quartiles of the survival times. The following keywords can be used and the default is CONFTYPE=LOGLOG.
the arcsine-square root transformation
This is also referred to as the log cumulative hazard transformation since it is applying the logarithmic function to the cumulative hazard function. Collett (1994) and Lachin (2000) refer it as the complementary log-log transformation.
the identity transformation
the logarithmic transformation
the logit transformation
names the SAS data set used by PROC LIFETEST. By default, the most recently created SAS data set is used.
specifies a descriptive string of up to 256 characters that appears in the "Description" field of the traditional graphics catalog. The description does not appear in 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 or the ODS GRAPHICS ON statement is specified.
specifies the symbol value for the event observations in traditional graphics. 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 or the ODS GRAPHICS ON statement is specified.
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 Kaplan-Meier, Breslow, or Fleming-Harrington survival curve. The third character defines the tick mark for the axes, and the fourth character defines the lower left corner of the plot. The default is FORMCHAR(1,2,7,9)='|-+-'. Any character or hexadecimal string can be used to customize the plot appearance. If you use hexadecimals, you must put an x after the closing quote. For example, to send the plot output to a printer with the IBM graphics character set (1 or 2), specify
formchar(1,2,7,9)='B3C4C5C0'x
Refer to the chapter titled "The PLOT Procedure" in the Base SAS Procedures Guide for further information.
specifies the graphics catalog for saving traditional graphics output from PROC LIFETEST. The default is WORK.GSEG. The GOUT= option cannot be used if the LINEPRINTER option or the ODS GRAPHICS ON statement is specified. For more information, refer to the chapter titled "The GREPLAY Procedure" in SAS/GRAPH Software: Reference.
specifies a list of interval endpoints for the life-table method. 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 METHOD=KM, METHOD=BRESLOW, or METHOD=FH, it reduces the number of survival estimates displayed by showing 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
specifies an input data set that contains variables for local annotation of traditional graphics. 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 or the ODS GRAPHICS ON statement 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.
specifies that plots are produced by a line printer instead of by a graphical device.
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 option affects only the displayed plots and has no effect on any calculations.
specifies the method to be used to compute the survival function estimates. Valid values for type are as follows:
specifies that the Breslow estimates be computed. The Breslow estimator is the exponentiation of the negative Nelson-Aalen estimator of the cumulative hazard function.
specifies that the Fleming-Harrington (FH) estimates be computed. The FH estimator is a tie-breaking modification of the Breslow estimator. If there are no tied event times, this estimator is the same as the Breslow estimator.
specifies that Kaplan-Meier estimates (also known as the product-limit estimates) be computed.
specifies that life-table estimates (also known as actuarial estimates) be computed.
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.
produces the Nelson-Aalen estimates of the cumulative hazards and the corresponding standard errors. This option is ignored if METHOD=LT is specified.
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 can be different from the number requested. Use the INTERVALS= option to control the interval endpoints. The default is NINTERVAL=10.
requests that the plot of censored observations be suppressed when the LINEPRINTER and PLOTS= options are 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.
suppress the Number Left column in the survival estimate table. Also suppressed is the Number Event column. This option has no effect for life-table estimate.
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); see Chapter 20, Using the Output Delivery System for more information.
suppresses the display of survival function estimates. Only the number of censored and event times, plots, and test results is displayed.
creates an output SAS data set to contain the estimates of the survival function and corresponding confidence limits for all strata. See the section OUTSURV= Data Set for more information about the contents of the OUTSURV= 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 OUTTEST= Data Set for more information about the contents of the OUTTEST= data set.
controls the line printer plots produced. You must also specify the LINEPRINTER option to obtain line printer plots. When you specify only one plot-request, you can omit the parentheses around the plot-request. Here are some examples:
plots=s plots=(s ls lls)
The plot-requests include the following:
specifies a plot of censored observations. This option is available for METHOD=KM, METHOD=BRESLOW, or METHOD=FH only.
specifies a plot of the estimated SDF versus time.
specifies a plot of the versus time.
specifies a plot of the versus .
specifies a plot of the estimated hazard function versus time (life-table method only).
specifies a plot of the estimated probability density function versus time (life-table method only).
ODS Graphics PLOTS= Option
controls the plots produced using ODS Graphics. When you specify only one plot-request, you can omit the parentheses around the plot-request. Here are some examples:
plots=none plots=(survival(atrisk=100 to 350 by 50) logsurv) plots(only)=hazard
You must enable ODS Graphics before requesting plots—for example, like this:
ods graphics on; proc lifetest plots=survival(atrisk); time T*Status(0); run; ods graphics off;
specifies that only the specified plots in the list be produced; otherwise, the default survivor function plot is also displayed.
The plot-requests and plot-request options include the following.
produces all appropriate plots. For METHOD=KM, METHOD=BRESLOW, or METHOD=FH, specifying PLOTS=ALL is equivalent to specifying PLOTS=(SURVIVAL LOGSURV LOGLOGLS HAZARD); for the life-table method, PLOTS=ALL is equivalent to specifying PLOTS=(SURVIVAL LOGSURV LOGLOGS DENSITY HAZARD).
plots the estimated hazard functions. Kernel-smoothed estimates are produced for METHOD=KM, METHOD=BRESLOW, or METHOD=FH. You can specify the following hazard-options, but only the CL option can be used for the life-table method:
sets the bandwidth to the given value.
selects the bandwidth from the given numeric-list that minimizes the mean integrated squared error.
selects the bandwidth from the interval (lower, upper) that minimizes the mean integrated squared error. PROC LIFETEST uses the golden section search algorithm to find the minimum. If there is more than one local minimum in the interval, there is no guarantee that the local minimum found is also the global minimum.
specifies the lower grid limit for the kernel-smoothed estimate. The default value is the time origin.
specifies the upper grid limit for the kernel-smoothed estimate. The default value equals the maximum event time
specifies the number of grid points in determining the mean integrated square error (MISE). The default value is 51.
specifies the number of grid points. The default is 101.
displays the pointwise confidence limits for the smoothed hazard.
plots the log of negative log of estimated survivor functions versus the log of time.
plots the negative log of estimated survivor functions versus time.
suppresses all plots.
plots the estimated probability density functions (life-table method only). Pointwise confidence limits are displayed optionally by specifying the CL option.
plots the estimated survivor functions. Censored times are plotted as a plus sign on the Kaplan-Meier, Breslow, or Fleming-Harrington survival curves unless the NOCENSOR option is specified. You can customize the display by using the following survival-options:
displays the numbers of subjects at risk at the given times. The number-list identifies the times at which the numbers at risk are displayed. If the number-list is not specified, PROC LIFETEST uses the default list , where and are computed by the following algorithm. Let be the MAXTIME= value or the largest observed time if the MAXTIME= option is not specified; let , where ceil() is the ceiling function.
displays both the equal-precision and the Hall-Wellner bands.
displays the equal-precision band.
displays the Hall-Wellner confidence band.
displays the pointwise confidence limits for the survivor functions.
changes all the displays for survivor functions to those for the failure functions. For example, if both the FAILURE and CL options are specified, the plot displays the failure curves as well as the pointwise confidence limits for the failure functions.
suppresses the plotting of the censored times on a Kaplan-Meier, Breslow, or Fleming-Harrington survival curve.
specifies how to display the survival/failure curves for multiple strata. This option has no effect if there is only one stratum. You can choose one of the following strata options:
specifies that a separate plot be displayed for each stratum.
specifies that the survival/failure curves for the strata be overlaid in one plot.
specifies that separate plots for the strata be organized into panels of two or four plots, depending on the number of strata.
displays the p-value of a homogeneity test specified in the STRATA statement. If more than one test is produced, the test is chosen in the following order: LOGRANK, WILCOXON, TARONE, PETO, MODPETO, FLEMING, and LR.
controls plots produced in traditional graphics. To obtain traditional graphics, you must neither enable ODS Graphics nor specify the LINEPRINTER option. For each plot-request, you can use the NAME= option to specify a name to identify the plot. The name can be specified as a SAS name or as a quoted string of up to 256 characters. Only the first eight characters are used as the entry name in the GOUT= catalog. The plot-requests include the following:
plots the estimated survivor functions versus time.
plots the negative log of estimated survivor functions versus time.
plots the log of negative log of estimated survivor functions versus the log of time.
plots estimated hazard function versus time (life-table method only).
plots the estimated probability density function versus time (life-table method only).
When you specify only one plot-request, you can omit the parentheses around the plot-request. Here are some examples:
plots=s plots=(s(name=Surv2), h(name=Haz2))
The latter 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 names in the GOUT= catalog, respectively.
specifies that the OUTSURV= data set contain 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.
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.
specifies that the standard error of the survivor function (SDF_STDERR) be output to the OUTSURV= data set. If the life-table method is used, the standard error of the density function (PDF_STDERR) and the standard error of the hazard function (HAZ_STDERR) are also output.
specifies that the time limit be the largest event time in the data. TIMELIM=EVENT is the default.
specifies that the time limit be the largest observed time in the data.
specifies that the time limit be the given number. The number must be positive and at least as large as the largest event time in the data.
specifies a list of time points at which the Kaplan-Meier estimates are displayed. The time points are listed in the column labeled Timelist. 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.
sets the width of the intervals used in the life-table calculation of the survival function. This parameter is overridden by the INTERVALS= option.
Copyright © SAS Institute, Inc. All Rights Reserved.