📄 stcox_postestimation.hlp
字号:
{smcl}
{* 18mar2005}{...}
{cmd:help stcox postestimation}{...}
{right:dialogs: {bf:{dialog stcox_p:predict}} {bf:{dialog stcox_estat:estat}} {bf:{dialog stcurve:stcurve}}}
{right:also see: {helpb stcox}{space 18}}
{hline}
{title:Title}
{p2colset 5 34 36 2}{...}
{p2col :{hi:[ST] stcox postestimation} {hline 2}}Postestimation tools for
stcox{p_end}
{p2colreset}{...}
{title:Description}
{pstd}
The following postestimation commands are of special interest after {cmd:stcox}:
{synoptset 19}{...}
{p2coldent :command}description{p_end}
{synoptline}
{synopt :{helpb stcox postestimation##estatcon:estat concordance}}Harrell's C{p_end}
{synopt :{helpb stcox postestimation##estatphtest:estat phtest}}tests the proportional-hazards assumption based on Schoenfeld residuals{p_end}
{synopt :{helpb stcurve}}plots the survival, hazard, and cumulative hazard functions{p_end}
{synoptline}
{p2colreset}{...}
{pstd}
In addition, The following standard postestimation commands are available:
{synoptset 19}{...}
{p2coldent :command}description{p_end}
{synoptline}
INCLUDE help post_adjust2
INCLUDE help post_estat
INCLUDE help post_estimates
INCLUDE help post_lincom
INCLUDE help post_linktest
INCLUDE help post_lrtest
INCLUDE help post_mfx
INCLUDE help post_nlcom
{p2col :{helpb stcox postestimation##predict:predict}}predictions, residuals, influence statistics, and other diagnostic measures{p_end}
INCLUDE help post_predictnl
INCLUDE help post_test
INCLUDE help post_testnl
{synoptline}
{p2colreset}{...}
{title:Special-interest postestimation commands}
{pstd}
{cmd:estat concordance} calculates Harrell's C, which is defined as the
proportion of all usable subject pairs in which the predictions and outcomes
are concordant. {cmd:estat concordance} also reports the Somers' D rank
correlation, which is obtained by calculating 2(C-0.5).
{pstd}
{cmd:estat phtest} tests the proportional-hazards assumption based on
Schoenfeld residuals. Using this command requires that
you previously specify {cmd:stcox}'s {opt schoenfeld()} option for the
global test or {cmd:stcox}'s {opt scaledsch()} option for the
detailed test.
{marker predict}{...}
{title:Syntax for predict}
{p 8 16 2}
{cmd:predict} {dtype} {newvar} {ifin}
[{cmd:,} {it:statistic} {opt nooff:set}]
{synoptset 12 tabbed}{...}
{synopthdr :statistic}
{synoptline}
{syntab:Main}
{synopt :{opt hr}}predicted hazard ratio, also known as the relative hazard; the default{p_end}
{synopt :{opt xb}}linear prediction xb{p_end}
{synopt :{opt stdp}}standard error of the linear prediction; SE(xb){p_end}
{p2coldent :* {opt csn:ell}}(partial) Cox-Snell residuals{p_end}
{p2coldent :* {opt dev:iance}}deviance residuals{p_end}
{p2coldent :* {opt ccs:nell}}cumulative Cox-Snell residuals{p_end}
{p2coldent :* {opt cmg:ale}}cumulative martingale residuals{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2}
Unstarred statistics are available both in and out of sample; type
{cmd:predict} ... {cmd:if e(sample)} ... if wanted only for the estimation
sample. Starred statistics are calculated only for the estimation sample,
even when {cmd:e(sample)} is not spec ified. Note that the (partial)
martingale residuals, the efficient score residuals, Schoenfeld residuals, and
the scaled Schoenfeld residuals are available through options specified to the
{cmd:stcox} command itself.
{title:Options for predict}
{dlgtab:Main}
{phang}
{opt hr}, the default, calculates the relative hazard (hazard ratio),
that is, the exponentiated linear prediction.
{phang}
{opt xb} calculates the linear prediction from the fitted model.
{phang}
{opt stdp} calculates the standard error of the prediction.
{phang}
{opt csnell} calculates the (partial) Cox-Snell generalized residuals. If you
have a single observation per subject, {opt csnell} calculates the usual
Cox-Snell residual; otherwise, {opt csnell} calculates the additive
contribution of this observation to the subject's overall Cox-Snell residual.
In such cases, see option {opt ccsnell} below.
{pmore}
To specify option {opt csnell}, you must have specified
"{cmd:stcox} {it:...}{cmd:,} {opth mgale(newvar)}{it:...}" when you
fitted the model. The name specified for the new variable does not matter,
but you must have specified the {opt mgale()} option, or {opt predict} will
return an error.
{phang}
{opt deviance} calculates the deviance residual. In the case of
multiple-record data, only one value per subject is calculated, and it is
placed on the last record for the subject.
{pmore}
To specify option {opt deviance}, you must have specified
"{cmd:stcox} {it:...}{cmd:,} {opth mgale(newvar)}{it:...}" when you
fitted the model. See the comment for option {opt csnell} above.
{phang}
{opt ccsnell} calculates the (cumulative) Cox-Snell residual in
multiple-record data by calculating the partial Cox-Snell
residuals (see option {opt csnell} above) and then summing them. Only one
value per subject is recorded{hline 2}the overall sum{hline 2}and it is placed
on the last record for the subject. {opt ccsnell} is the same as {opt csnell}
in a single-record survival data.
{pmore}
In order to specify option {opt ccsnell}, you must have specified
"{cmd:stcox} {it:...}{cmd:,} {opth mgale(newvar)}{it:...}" when you
fitted the model. See the comment for option {opt csnell} above.
{phang}
{opt cmgale} calculates the cumulative martingale residual in multiple-record
data by summing the partial martingale residuals available from {cmd:stcox}.
Only one value per subject is recorded{hline 2}the overall sum{hline 2}and it
is placed on the last record for the subject. {opt cmgale} is the same as
{opt mgale} in single-record survival data.
{pmore}
In order to specify option {opt cmgale}, you must have specified
"{cmd:stcox} {it:...}{cmd:,} {opth mgale(newvar)}{it:...}" when you
fitted the model. See the comment for option {opt csnell} above.
{phang}
{opt nooffset} is relevant only if you specified {opth offset(varname)} for
{cmd:stcox}. It modifies the calculations made by {cmd:predict} so that they
ignore the offset variable; the linear prediction is treated as xb rather
than xb + offset.
{marker estatcon}{...}
{title:Syntax for estat concordance}
{p 8 17 2}
{cmd:estat} {opt con:cordance} {ifin} [{cmd:,} {it:concordance_options}]
{synoptset 20 tabbed}{...}
{synopthdr :concordance_options}
{synoptline}
{syntab:Main}
{synopt :{opt all}}compute statistic for all observations in the data{p_end}
{synopt :{opt nosh:ow}}do not show st setting information{p_end}
{synoptline}
{p2colreset}{...}
{title:Options for estat concordance}
{dlgtab: Main}
{phang}
{opt all} requests that the statistic be computed for all observations in the
data. By default, {cmd:estat concordance} computes over the estimation
subsample.
{phang}
{opt noshow} prevents {cmd:estat concordance} from displaying the identities of
the key st variables above its output.
{marker estatphtest}{...}
{title:Syntax for estat phtest}
{p 8 14 2}
{cmd:estat} {opt phtest} [{cmd:,} {it:phtest_options}]
{synoptset 22 tabbed}{...}
{synopthdr :phtest_options}
{synoptline}
{syntab:Main}
{synopt :{opt log}}use natural logarithm time-scaling function{p_end}
{synopt :{opt km}}use 1-KM product-limit estimate as time-scaling function{p_end}
{synopt :{opt rank}}use rank of analysis time as the time-scaling function{p_end}
{synopt :{opth time(varname)}}use {it:varname} containing a monotone
transformation of analysis time as the time-scaling function{p_end}
{synopt :{opth plot(varname)}}plot smoothed, scaled Schoenfeld residuals versus
time{p_end}
{synopt :{opt bw:idth(#)}}use bandwidth of {it:#}; default is {cmd:bwidth(0.8)}{p_end}
{synopt : {opt d:etail}}test proportional-hazards assumption separately for each
covariate{p_end}
{syntab:Scatterplot}
{synopt :{it:{help marker_options}}}change look of markers (color, size, etc.){p_end}
{synopt :{it:{help marker_label_options}}}add marker labels; change look or position{p_end}
{syntab:Smoothed line}
{synopt :{opth lineop:ts(cline_options)}}affect rendition of the smoothed line{p_end}
{syntab:Y-Axis, X-Axis, Title, Caption, Legend, Overall}
{synopt :{it: {help twoway_options}}}any options other than {opt by()} documented in
{bind:{bf:[G] {it:twoway_options}}}{p_end}
{synoptline}
{p2colreset}{...}
{title:Options for estat phtest}
{dlgtab: Main}
{phang}
{opt log}, {opt km}, {opt rank} and {opt time()} are used to specify the time
scaling function.{p_end}
{pmore}
By default {cmd:estat phtest} performs the tests using the identity
function, i.e., analysis time itself.{p_end}
{pmore}
{opt log} specifies that the natural log of analysis time be used.{p_end}
{pmore}
{opt km} specifies that 1 minus the Kaplan-Meier product-limit estimate
be used.{p_end}
{pmore}
{opt rank} specifies that the rank of analysis time be used.{p_end}
{pmore}
{opth time(varname)} specifies a variable containing an arbitrary monotonic
transformation of analysis time. You must ensure that {it:varname} is a
monotonic transform.
{phang}
{opth plot(varname)} specifies that a scatterplot and smoothed plot of scaled
Schoenfeld residuals versus time be produced for the covariate specified by
{it:varname}. By default, the smoothing is performed using the running-mean
method implemented in {cmd:lowess, mean noweight}. See {helpb lowess}.
{phang}
{opt bwidth(#)} specifies the bandwidth. Centered subsets of {opt bwidth()}*N
observations are used for calculating smoothed values for each point in the
data except for end points, where smaller, uncentered subsets are used. The
greater the {opt bwidth()}, the greater the smoothing. The default is
{cmd:bwidth(0.8)}.
{phang}
{opt detail} specifies that a separate test of the proportional-hazards
assumption be produced for each covariate in the Cox model. By default,
{cmd:estat phtest} produces only the global test.
{dlgtab: Scatterplot}
{phang}
{it:marker_options} affect the rendition of markers drawn at the plotted
points, including their shape, size, color, and outline; see
{it:{help marker_options}}.
{phang}
{it:marker_label_options} specify if and how the markers are to be labeled;
see {it:{help marker_label_options}}.
{dlgtab:Smoothed line}
{phang}
{opt lineopts(cline_options)} affect the rendition of the smoothed line; see
{it:{help cline_options}}.
{dlgtab: Y-Axis, X-Axis, Title, Caption, Legend, Overall}
{phang}
{it:twoway_options} are any of the options documented in
{it:{help twoway_options}}, excluding {opt by()}. These include options for
titling the graph (see {it:{help title_options}}) and options for saving the
graph to disk (see {it:{help saving_option}}).
{title:Examples}
{phang}{cmd:. stcox age drug, mgale(mg)}{p_end}
{phang}{cmd:. predict double cd, csnell}{p_end}
{phang}{cmd:. estat concordance}{p_end}
{phang}{cmd:. stcox treatment1 wbc2 wbc3, scaledsch(sca*) schoenfeld(sch*)}{p_end}
{phang}{cmd:. estat phtest, rank detail}{p_end}
{phang}{cmd:. stcox age female, basehc(z1)}{p_end}
{phang}{cmd:. stcurve, hazard at(female=1)}{p_end}
{title:Also see}
{psee}
Manual: {bf:[ST] stcox postestimation}
{psee}
Online: {helpb stcox};{break}
{helpb adjust}, {helpb estimates}, {helpb lincom},
{helpb linktest}, {helpb lrtest}, {helpb mfx}, {helpb nlcom},
{helpb predictnl}, {help stcox diagnostics},
{helpb stcurve}, {helpb stepwise},
{helpb test}, {helpb testnl}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -