help stsurvdiffalso see: sts generate -------------------------------------------------------------------------------

Title

stsurvdiff-- Difference between two Kaplan-Meier survival curves

Syntax

stsurvdiffvarname[if] [in] [,options]

optionsDescription -------------------------------------------------------------------------generate(stubname)defines the stub-name for variables containing results created bystsurvdifflevel(#)sets the confidence level of the CI for the difference in survival curvessmoothsmooths the difference and its standard error as a function of time (_t) -------------------------------------------------------------------------You must

stsetyour data before usingstsurvdiff; see[ST] stset.

Description

stsurvdiffcomputes 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 bystsurvdiff. For example, ifstubnameisdiff, four new variables are created, with namesdiff,diff_se,diff_lcianddiff_uci, respectively.

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

smoothapplies 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

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

Also see