*! version 1.0.0 20jan2011
help stsurvdiff
also see: sts generate

Title

stsurvdiff -- Difference between two Kaplan-Meier survival curves

Syntax

stsurvdiff varname [if] [in] [, options]

generate(stubname) defines the stub-name for variables
containing results created by stsurvdiff

level(#) sets the confidence level of the CI for the
difference in survival curves

smooth smooths the difference and its standard error
as a function of time (_t)

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

Description

stsurvdiff computes the difference in the Kaplan-Meier
survival curves, and a pointwise confidence interval, at the two
levels of a binary "treatment" variable, varname.

Options

generate(stubname) defines the stub-name for variables containing
results created by stsurvdiff. For example, if stubname is
diff, four new variables are created, with names diff,
diff_se, diff_lci and diff_uci, respectively.

level(#) specifies the percent confidence level for the pointwise
confidence interval of the difference in survival functions. The
default # is 95%.

smooth applies a running-line smooth (see running)
to the difference in survival curves and its standard error.

Examples

. stsurvdiff treat

. stsurvdiff treat, generate(diff) level(99) smooth

Author

Patrick Royston, MRC Clinical Trials Unit, London, UK.
(pr@ctu.mrc.ac.uk)

Also see

Manual: [R] sts generate