Fits the Cox proportional hazards model to survival data (A.I. Glaser & R.W. Payne).
|Controls printed output (
||Sets a limit on the number of factors in the terms formed from the
||Time of each observation|
||Contains the value 1 for censored observations, otherwise 0; if unset it is assumed that there is no censoring|
||Offset to include in the model|
||Blocking factor defining groups of observations with different baseline hazard functions|
||Initial values for the parameters in the model|
||Saves the Cox-Snell residuals|
||Saves the parameter estimates|
||Saves standard errors of the estimates|
||Saves the variance-covariance matrix of the estimates|
||Saves -2 × log-likelihood for the fitted model|
||Saves the number of d.f. in the model specified by
||Saves estimates of the survivor function, in a variate if
||Exit code, set to zero if the fit was successful|
||Maximum number of iterations to use; default 50|
||Defines the convergence criterion; default 0.000001|
||Defines the model to fit|
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
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
||estimates of parameters;|
||variance-covariance matrix of the estimates;|
||Cox-Snell residuals (see e.g. Collett 2003, Section 4.1.1);|
||estimated survival function;|
||-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
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:
1 convergence has not been achieved within
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.
SURVIVOR options can be used to save output from the analysis.
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.
None of the vectors must be restricted.
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.
Commands for: Survival analysis.
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