📄 sts_generate.hlp
字号:
{smcl}
{* 18mar2005}{...}
{cmd:sts generate} {right:dialog: {bf:{dialog stsgenerate:sts generate}}}
{hline}
{title:Title}
{p2colset 5 26 28 2}{...}
{p2col :{hi:[ST] sts generate} {hline 2}}Create survivor, hazard, and other variables{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 21 2}{cmd:sts} {opt gen:erate} {newvar} {cmd:=}
{c -(} {opt s} | {cmd:se(s)} | {opt h} | {cmd:se(lls)} | {cmd:lb(s)} |
{cmd:ub(s)} | {opt na} | {cmd:se(na)} | {cmd:lb(na)} | {cmd:ub(na)} |
{opt n} | {opt d} {c )-} [{newvar} {cmd:=} {{it:...}} {it:...}] {ifin}
[{cmd:,} {it:options}]
{synoptset 21 tabbed}{...}
{synopthdr}
{synoptline}
{syntab:Options}
{synopt :{opth by(varlist)}}separate on different groups of {it:varlist}{p_end}
{synopt :{opth a:djustfor(varlist)}}adjust the estimates to zero values of {it:varlist}{p_end}
{synopt :{opth st:rata(varlist)}}separate on different groups of strata {it:varlist}{p_end}
{synopt :{opt l:evel(#)}}set confidence level; default is {cmd:level(95)}{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2}
You must {cmd:stset} your data before using {cmd:sts generate}; see {helpb stset}.
{title:Description}
{pstd}
{cmd:sts generate} creates new variables containing the estimated survivor
(failure) function, the Nelson-Aalen cumulative hazard (integrated hazard)
function, and related functions. See {help sts} for an introduction to this
command.
{pstd}
{cmd:sts generate} can be used with single- or multiple-record or single- or
multiple-failure st data.
{title:Functions}
{dlgtab:Main}
{phang}
{cmd:s} produces the Kaplan-Meier product-limit estimate of the
survivor function or, if {opt adjustfor()} is specified, the baseline survivor
function from a Cox regression model on the {opt adjustfor()} variables.
{phang}
{cmd:se(s)} produces the Greenwood, pointwise standard error. This option may
not be used with {opt adjustfor()}.
{phang}
{cmd:h} produces the estimated hazard component deltaH_j = H(t_j) -
H(t_(j-1)), where t_j is the current failure time and t_(j-1) is the previous
one. This is mainly a utility function used to calculate the estimated
cumulative hazard H(t_j), yet you can estimate the hazard via a kernel smooth
of the deltaH_j; see {helpb sts graph}. It is recorded at all the points at
which a failure occurs and computed as d_j/n_j, where d_j is the number of
failures occurring at time t_j and n_j is the number at risk at t_j before the
occurrence of the failures.
{phang}
{cmd:se(lls)} produces the standard error of ln[-ln S(t)]. This option may
not be used with {opt adjustfor()}.
{phang}
{cmd:lb(s)} produces the lower bound of the confidence interval for S(t) based
on ln[-ln S(t)]. This option may not be used with {opt adjustfor()}.
{phang}
{cmd:ub(s)} produces the corresponding upper bound. This option may not be
used with {opt adjustfor()}.
{phang}
{cmd:na} produces the Nelson-Aalen estimate of the cumulative hazard
function. This option may noy not be used with {cmd:adjustfor()}.
{phang}
{cmd:se(na)} produces pointwise standard error for the Nelson-Aalen
estimate of the cumulative hazard function, H(t). This option may not be used
with {opt adjustfor()}.
{phang}
{cmd:lb(na)} produces the lower bound of the confidence interval for
H(t) based on the log-transformed cumulative hazard function. This option may
not be used with {opt adjustfor()}.
{phang}
{cmd:ub(na)} produces the corresponding upper bound. This option may not be
used with {opt adjustfor()}.
{phang}
{cmd:n} produces n_j, the number at risk just before time t_j. This option
may not be used with {opt adjustfor()}.
{phang}
{cmd:d} produces d_j, the the number failing at time t_j. This option may not
be used with {opt adjustfor()}.
{title:Options}
{dlgtab:Options}
{phang}
{opth by(varlist)} produces separate survivor or cumulative hazard functions by
making separate calculations for each group identified by equal values of the
variables in {it:varlist}.
{phang}
{opth adjustfor(varlist)} adjusts the estimate of the survivor function to
that for 0 values of the {it:varlist} specified. This option is not available
with the Nelson-Aalen function.
{pmore}
If you specify {opt strata()}, {cmd:sts} performs the adjustment by estimating
a stratified-on-group Cox regression model using {opt adjustfor()} as the
covariates. The stratified, baseline survivor function is then retrieved.
{pmore}
If you specify {opt by()}, {cmd:sts} fits separate Cox regression models for
each group and retrieves the separately calculated baseline survivor
functions.
{pmore}
Be aware that, regardless of the method employed, the survivor function is
adjust to 0 values of the covariates.
{phang}
{opt strata(varlist)} is a subtle alternative to {opt by()}. First, you may
not specify {opt strata()} unless you also specify {opt adjustfor()}, whereas
you may specify {opt by()} in either case. Thus {opt strata()} amounts to a
modifier of {opt adjustfor()}. This option is not available for the
Nelson-Aalen function.
{phang}
{opt level(#)} specifies the confidence level, as a percentage, for the
{cmd:lb(s)}, {cmd:ub(s)}, {cmd:lb(na)}, and {cmd:ub(na)} functions. The default is {cmd:level(95)} or as set by {opt set level}; see {help level}.
{title:Also see}
{psee}
Manual: {bf:[ST] sts generate}
{psee}
Online: {help st}, {help sts}, {helpb sts graph}, {helpb sts list},
{helpb sts test}, {helpb stset}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -