![]() |
![]() |
The PHREG Procedure |
This section describes the computation of residuals (RESMART=, RESDEV=, RESSCH=, and RESSCO=) in the OUTPUT statement.
First, consider TIES=BRESLOW. Let
![]() |
![]() |
![]() |
|||
![]() |
![]() |
![]() |
|||
![]() |
![]() |
![]() |
|||
![]() |
![]() |
![]() |
|||
![]() |
![]() |
![]() |
The martingale residual at is defined as
![]() |
Here estimates the difference over
between the observed number of events for the
th subject and a conditional expected number of events. The quantity
is referred to as the martingale residual for the
th subject. When the counting process MODEL specification is used, the RESMART= variable contains the component (
) instead of the martingale residual at
. The martingale residual for a subject can be obtained by summing up these component residuals within the subject. For the Cox model with no time-dependent explanatory variables, the martingale residual for the
th subject with observation time
and event status
is
![]() |
The deviance residuals are a transform of the martingale residuals:
![]() |
The square root shrinks large negative martingale residuals, while the logarithmic transformation expands martingale residuals that are close to unity. As such, the deviance residuals are more symmetrically distributed around zero than the martingale residuals. For the Cox model, the deviance residual reduces to the form
![]() |
When the counting process MODEL specification is used, values of the RESDEV= variable are set to missing because the deviance residuals can be calculated only on a per-subject basis.
The Schoenfeld (1982) residual vector is calculated on a per-event-time basis. At the th event time
of the
th subject, the Schoenfeld residual
![]() |
is the difference between the th subject covariate vector at
and the average of the covariate vectors over the risk set at
. Under the proportional hazards assumption, the Schoenfeld residuals have the sample path of a random walk; therefore, they are useful in assessing time trend or lack of proportionality. Harrell (1886) proposed a
-transform of the Pearson correlation between these residuals and the rank order of the failure time as a test statistic for nonproportional hazards. Therneau, Grambsch, and Fleming (1990) considered a Kolmogorov-type test based on the cumulative sum of the residuals.
The score process for the th subject at time
is
![]() |
The vector is the score residual for the
th subject. When the counting process MODEL specification is used, the RESSCO= variables contain the components of
instead of the score process at
. The score residual for a subject can be obtained by summing up these component residuals within the subject.
The score residuals are a decomposition of the first partial derivative of the log likelihood. They are useful in assessing the influence of each subject on individual parameter estimates. They also play an important role in the computation of the robust sandwich variance estimators of Lin and Wei (1989) and Wei, Lin, and Weissfeld (1989).
For TIES=EFRON, the preceding computation is modified to comply with the Efron partial likelihood. Consider an uncensored time t. For a given time , let
=1 if the
is an event time of the
th subject and 0 otherwise. Let
, which is the number of subjects that have an event at
. For
, let
![]() |
![]() |
![]() |
|||
![]() |
![]() |
![]() |
|||
![]() |
![]() |
![]() |
|||
![]() |
![]() |
![]() |
|||
![]() |
![]() |
![]() |
The martingale residual at for the
th subject is defined as
![]() |
Deviance residuals are computed by using the same transform on the corresponding martingle residuals as in TIES=BRESLOW.
The Schoenfeld residual vector for the th subject at event time
is
![]() |
The score process for the th subject at time
is given by
![]() |
For TIES=DISCRETE or TIES=EXACT, it is difficult to come up with modifications that are consistent with the correponding partial likelihood. Residuals for these TIES= methods are computed by using the same formulae as in TIES=BRESLOW.
![]() |
![]() |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.