**[ST] sts list** -- List the survivor or cumulative hazard function

__Syntax__

**sts** __l__**ist** [*if*] [*in*] [**,** *options*]

*options* Description
-------------------------------------------------------------------------
Main
__sur__**vival** report Kaplan-Meier survivor function; the
default
__f__**ailure** report Kaplan-Meier failure function
__cumh__**az** report Nelson-Aalen cumulative hazard
function
**by(***varlist***)** estimate separate functions for each group
formed by *varlist*
__ad__**justfor(***varlist***)** adjust the estimates to zero values of
*varlist*
__st__**rata(***varlist***)** stratify on different groups of *varlist*

Options
__l__**evel(***#***)** set confidence level; default is **level(95)**
**at(***#*|*numlist***)** report estimated survivor/cumulative
hazard function at specified times;
default is to report at all unique time
values
__e__**nter** report number lost as pure censored
instead of censored minus lost
__nosh__**ow** do not show st setting information
__c__**ompare** report groups of survivor/cumulative
hazard functions side by side
__sav__**ing(***filename*[**,** **replace**]**)** save results to *filename*; use **replace** to
overwrite existing *filename*
-------------------------------------------------------------------------
You must **stset** your data before using **sts list**; see **[ST] stset**.
**fweight**s, **iweight**s, and **pweight**s may be specified using **stset**; see **[ST]**
**stset**.

__Menu__

**Statistics > Survival analysis > Summary statistics, tests, and tables >**
**List survivor and cumulative hazard functions**

__Description__

**sts list** lists the estimated survivor (failure) or the Nelson-Aalen
estimated cumulative (integrated) hazard function. See **[ST] sts** for an
introduction to this command.

**sts list** can be used with single- or multiple-record or single- or
multiple-failure st data.

__Options__

+------+
----+ Main +-------------------------------------------------------------

**survival**, **failure**, and **cumhaz** specify the function to report.

**survival** specifies that the Kaplan-Meier survivor function be listed.
This option is the default if a function is not specified.

**failure** specifies that the Kaplan-Meier failure function 1 - S(t+0)
be listed.

**cumhaz** specifies that the Nelson-Aalen estimate of the cumulative
hazard function be listed.

**by(***varlist***)** estimates a separate function for each by-group. By-groups
are identified by equal values of the variables in *varlist*. **by()** may
not be combined with **strata()**.

**adjustfor(***varlist***)** adjusts the estimate of the survivor (failure)
function to that for 0 values of *varlist*. This option is not
available with the Nelson-Aalen function. See **[ST] sts graph** for an
example of how to adjust for values different from 0.

If you specify **adjustfor()** with **by()**, **sts** fits separate Cox
regression models for each group, using the **adjustfor()** variables as
covariates. The separately calculated baseline survivor functions
are then retrieved.

If you specify **adjustfor()** with **strata()**, **sts** fits a
stratified-on-group Cox regression model, using the **adjustfor()**
variables as covariates. The stratified, baseline survivor function
is then retrieved.

**strata(***varlist***)** requests estimates of the survivor (failure) function
stratified on variables in *varlist*. It requires specifying
**adjustfor()** and may not be combined with **by()**.

+---------+
----+ Options +----------------------------------------------------------

**level(***#***)** specifies the confidence level, as a percentage, for the
Greenwood pointwise confidence interval of the survivor (failure) or
for the pointwise confidence interval of the Nelson-Aalen cumulative
hazard function; see **[R] level**.

**at(***#*|*numlist***)** specifies the time values at which the estimated survivor
(failure) or cumulative hazard function is to be listed.

The default is to list the function at all the unique time values in
the data, or if functions are being compared, at about 10 times
chosen over the observed interval. In any case, you can control the
points chosen.

**at(5 10 20 30 50 90)** would display the function at the designated
times.

**at(10 20 to 100)** would display the function at times 10, 20, 30, 40,
..., 100.

**at(0 5 10 to 100 200)** would display the function at times 0, 5, 10,
15, ..., 100, and 200.

**at(20)** would display the curve at (roughly) 20 equally spaced times
over the interval observed in the data. We say roughly because Stata
may choose to increase or decrease your number slightly if that would
result in rounder values of the chosen times.

**enter** specifies that the table contain the number who enter and,
correspondingly, that the number lost be displayed as the pure number
censored rather than censored minus entered. The logic underlying
this is explained in **[ST] sts**.

**noshow** prevents **sts list** from showing the key st variables. This option
is seldom used because most people type **stset, show** or **stset, noshow**
to set whether they want to see these variables mentioned at the top
of the output of every st command; see **[ST] stset**.

**compare** is specified only with **by()** or **strata()**. It compares the
survivor (failure) or cumulative hazard functions and lists them side
by side rather than first one and then the next.

**saving(***filename*[**,** **replace**]**)** saves the results in a Stata data file (**.dta**
file).

**replace** specifies that *filename* be overwritten if it exists.

__Examples__

Setup
**. webuse stan3**

Suppress showing st settings
**. stset, noshow**

List the survivor function
**. sts list**

List the survivor functions for the two categories of **posttran**
**. sts list, by(posttran)**

Same as above, but list at the specified times
**. sts list, at(10 40 to 160) by(posttran)**

List the cumulative hazard functions at the specified times for the two
categories of **posttran**
**. sts list, cumhaz at(10 40 to 160) by(posttran)**

List the survivor function for the two categories of **posttran** side by
side, using the specified comparison times
**. sts list, at(10 40 to 160) by(posttran) compare**

List the cumulative hazard functions for the two categories of **posttran**
side by side, using the specified comparison times
**. sts list, cumhaz at(10 40 to 160) by(posttran) compare**

__Video example__

How to calculate the Kaplan-Meier survivor and Nelson-Aalen cumulative
hazard functions