****************
****************
** stset ** define a survial data outcome
****************
****************
Overview: To use survival analysis methods such as the Kaplan-Meier or
Cox regression we need to identify the follow-up time, T, and
the censoring indicator, delta.
Usage: "stset ftime, failure(dvar)"
Where - ftime is the follow-up time
dvar is the censoring/death indicator (dvar=1 if
the event time was observed and 0 if censored)
Summaries: STATA will return a brief summary of the number of records,
the number of observed events, and the total person-time
under study.
Options: (1) "stset ftime, failure(status) enter(stime)" -- where
the variable stime records the time when the subject
entered the study.
****************
****************
** sts graph ** Plotting estimated survival curves
****************
****************
Overview: The "sts graph" command calculates and plots Kaplan-Meier
survival curves.
Usage: "sts graph"
"sts graph, by(Svar)"
Summaries: The "sts graph" function generates a Kaplan-Meier curve -- with
a curve for each group given with the "by" option if
selected.
Options: (1) "sts graph, by(Svar)"
The "by" option creates a separate line for each level of the
argument Svar.
(2) "sts graph, lost"
The "lost" option requests that the number lost (or censored)
be shown on the plot.
(3) "sts graph, gwood"
The "gwood" option requests that point-wise confidence bands
be displayed.
(4) "sts graph, adjustfor(xvar1 xvar2)"
This option displays the fitted survival function for
xvar1=0, xvar2=0 after using Cox regression. If you
also specify "by(Svar)" then separate Cox regressions are
used to model each level of Svar separately, while if
you use "strata(Svar)" then a single stratified Cox
model is estimated and the baseline survival is returned.
****************
****************
** sts list ** Listing the estimated survival curves
****************
****************
Overview: The "sts list" command will print a tablular version of the
survival estimates and standard errors.
Usage: "sts list"
"sts list, by(Svar)"
Summaries: The "sts list" command returns the summaries that are used
to estimate the Kaplan-Meier curves. See the course notes on
page 258-2 for illustration.
Options: (1) "sts list, by(Svar)" -- separate summaries for each level
of Svar.
****************
****************
** sts test ** Testing survival curves
****************
****************
Overview: The "sts test" command
Usage: "sts test Svar, logrank"
"sts test Svar, wilcoxon"
Summaries: The "sts test" function is used to test the null hypothesis that
survival curves are equivalent. It will return a small table
that shows the number of observed events for each level of Svar
and the corresponding expected number of events under the
null hypothesis. Finally, the test statistic and p-value
are given.
Options: (1) "sts test, logrank" -- calculates the log-rank test as
described in the course notes pp 270-276.
(2) "sts test, wilcoxon" -- calculates the wilcoxon-gehan-breslow
test as described in the course notes pp 277-281.