*! version 1.4.4 15May2014

Title

stns -- Graph and list the net survival and net cumulative hazard functions

Syntax

stns graph [if] [in] [, ...]

stns list [if] [in] [, ...]

using, age(), period(), and rate() are required to estimate the
net survival function, net failure function, and net cumulative hazard function. When
the rate table is stratified, strata() is required to match the stratification
variables in the dataset and the rate table.

You must stset your data before using stns; see
[ST] stset.

See stns graph and stns list for details of syntax.

Description

stns reports and creates variables containing the estimated net survival and
related functions, such as the net cumulative hazard function.

stns graph graphs the net survival function.

stns list lists the estimated net survival and related functions.

Example: Listing and graphing variables

Setup

. use rdata

. stset survtime, failure(cens==1) id(id)

Suppress showing st settings

. stset, noshow

Compute and list the net survival function

. stns list using myslopop, age(agediag=age) period(datediag=year) rate(rate) strata(sex)

Graph the net survival function

. stns graph

Example: Comparing net survival or net cumulative hazard functions

Graph the net survival functions for the two categories of sex, showing results on one graph

. stns graph using myslopop, age(agediag=age) period(datediag=year) rate(rate) strata(sex), by(sex)

Same as above command but produce two side-by-side graphs

. stns graph, by(sex) separate

Now graph the net cumulative hazard functions for the two
categories of sex

. stns graph, cumhaz by(sex)

Now list the two categories of sex for the net survival function

. stns list, at(0 100 to 1700) by(sex)