Fits the Cox proportional hazards model to survival data (A.I. Glaser & R.W. Payne).
Options
PRINT = string tokens |
Controls printed output (estimates , vcovariance , residuals , survivor , _2loglikelihood ); default esti , _2lo |
---|---|
FACTORIAL = scalar |
Sets a limit on the number of factors in the terms formed from the TERMS formula |
TIMES = factor or variate |
Time of each observation |
CENSORED = variate |
Contains the value 1 for censored observations, otherwise 0; if unset it is assumed that there is no censoring |
OFFSET = variate |
Offset to include in the model |
BLOCKS = factor |
Blocking factor defining groups of observations with different baseline hazard functions |
INITIAL = scalar or variate |
Initial values for the parameters in the model |
RESIDUALS = variate |
Saves the Cox-Snell residuals |
ESTIMATES = variate |
Saves the parameter estimates |
SE = variate |
Saves standard errors of the estimates |
VCOVARIANCE = symmetric matrix |
Saves the variance-covariance matrix of the estimates |
_2LOGLIKELIHOOD = scalar |
Saves -2 × log-likelihood for the fitted model |
DFTERMS = scalar |
Saves the number of d.f. in the model specified by TERMS |
SURVIVOR = variate or matrix |
Saves estimates of the survivor function, in a variate if BLOCKS is unset, otherwise in a matrix with a column for each block |
EXIT = scalar |
Exit code, set to zero if the fit was successful |
MAXCYCLE = scalar |
Maximum number of iterations to use; default 50 |
TOLERANCE = scalar |
Defines the convergence criterion; default 0.000001 |
Parameter
TERMS = formula |
Defines the model to fit |
---|
Description
RPROPORTIONAL
fits the Cox proportional hazards model by a direct maximization of the likelihood, using NAG algorithm G12BAF
. This is much more efficient for large data sets than the alternative method, used in procedure RPHFIT
, which fits a generalized linear model to an expanded data set (see RPHFIT
for details).
The data for RPROPORTIONAL
consist of a time observation made on each of a set of subjects. Usually, this will be the time of death (or failure). Alternatively, an observation may be censored; the time will then be the time at which the subject left the trial (prior to failure or death). If you have censored data, you must use the CENSORED
option to supply a variate with the value one in the censored observations, and zero elsewhere. The times are supplied by the TIME
option, in either a factor or a variate.
The proportional hazards model (Cox 1972) makes the assumption that the subjects have a baseline hazard function which is modified proportionally by treatments and covariates. In RPROPORTIONAL
it is assumed that the survival times follow a piecewise exponential distribution. This partitions the time axis using a set of discrete cut-points ai, and assumes a constant baseline hazard λi between each one. This corresponds to an exponential distribution with mean 1/λi (in the absence of treatments) for the survival times within each time interval. A cut-point is defined at every time that a death or a censored observation occurs. You can supply a factor, using the BLOCKS
option, to define groupings of subjects. The baseline hazards are then assumed to differ between (but not within) the groups. These groupings may arise, for example, from trials that take place on different days or in different locations. They are often known as strata, but in the sense used in surveys (see e.g. SVSTRATIFIED
) rather than as in ANOVA
.
The model to be fitted is specified by the TERMS
parameter. The FACTORIAL
option sets a limit on the number of factors and/or variates in the model terms that it defines. An offset can be specified, if required, using the OFFSET
option.
The PRINT
option controls printed output with settings:
estimates |
estimates of parameters; |
---|---|
vcovariance |
variance-covariance matrix of the estimates; |
residuals |
Cox-Snell residuals (see e.g. Collett 2003, Section 4.1.1); |
survivor |
estimated survival function; |
_2loglikelihood |
-2 × log-likelihood for the fitted model, the d.f. in the fitted model, and the change from the previous model (if relevant) fitted by RPROPORTIONAL . |
The MAXCYCLE
option specifies the maximum number of iterations to use when fitting the model (default 50), and the TOLERANCE
option defines the convergence criterion (default 0.000001). The EXIT
parameter can save a scalar containing the following values to indicate the success or failure of the estimation:
0 success,
1 convergence has not been achieved within MAXCYCLE
iterations,
2 convergence is assumed to been achieved, although the value of the deviance has not decreased from the previous iteration.
At other times an error message may occur indicating a Failure from NAG algorithm. If the failure code is equal to 3 or 4, alternative starting values should be set using the INITIAL
option. If this still fails to converge, it may be that there are insufficient data for the suggested model, and a simpler model may be required.
The RESIDUALS
, ESTIMATES
, SE
, VCOVARIANCE
, _2LOGLIKELIHOOD
, DFTERMS
and SURVIVOR
options can be used to save output from the analysis.
Options: PRINT
, FACTORIAL
, TIMES
, CENSORED
, OFFSET
, BLOCKS
, INITIAL
, RESIDUALS
, ESTIMATES
, SE
, VCOVARIANCE
, _2LOGLIKELIHOOD
, DFTERMS
, SURVIVOR,
EXIT
, MAXCYCLE
, TOLERANCE
.
Parameters: TERMS
.
Method
RPROPORTIONAL
uses the NAG
directive to run the G12BAF
algorithm from the NAG Library. This calculates the parameter estimates by maximizing an approximation of the marginal likelihood using a Newton-Raphson iterative technique.
Action with RESTRICT
None of the vectors must be restricted.
References
Cox, D.R. (1972). Regression models and life tables (with discussion). Journal of the Royal Statistical Society, Series B, 34, 187-220.
Collett, D. (2003). Modelling Survival Data in Medical Research. Chapman and Hall, London.
See also
Procedures: KAPLANMEIER
, RLIFETABLE
, RPHFIT
, RSTEST
, RSURVIVAL
.
Commands for: Survival analysis.
Example
CAPTION 'RPROPORTIONAL example',\ 'Data from Gehan (1965, Biometrika, 52, 203-223).';\ STYLE=meta,plain VARIATE [VALUES=1,1,2,2,3,4,4,5,5,8,8,8,8,11,11,12,12,15,17,22,23,\ 6,6,6,6,7,9,10,10,11,13,16,17,19,20,22,23,25,32,32,34,35] Time & [VALUES=24(0),1,0,1,0,1,1,0,0,1,1,1,0,0,1,1,1,1,1] Censor FACTOR [LABELS=!t(control,'6-mercaptopurine'); VALUES=21(1,2)] Treat RPROPORTION [TIMES=Time; CENSORED=Censor; _2LOGLIKELIHOOD=llhd] Treat