Models survival times of exponential, Weibull, extreme-value, log-logistic or lognormal distributions (R.W. Payne & D.A. Murray).
Options
PRINT = string tokens |
Controls printed output (model , deviance , summary , estimates , correlations , fittedvalues , accumulated , loglikelihood ); default mode , summ , esti |
---|---|
TIMES = variate |
Time of each observation |
DISTRIBUTION = string token |
Distribution of the survival times (exponential , weibull , extremevalue , loglogistic , lognormal ); default expo |
CENSORED = variate |
Indicator for censored observations: 0 if uncensored, 1 if right censored (subject survived the whole trial), -1 if left censored (log-logistic distribution only); default assumes no censored observations |
PLOT = string token |
What to plot (survivorfunction); default * |
GRAPHICS = string token |
Type of graphics (lineprinter , highresolution ) default high |
ALPHA = scalar |
Saves the estimated value of the parameter α of the Weibull and extreme-value distributions, if the scalar is input with a non-missing value this provides the initial estimate for α (which will also be the final estimate if MAXCYCLE =1) |
_2LOGLIKELIHOOD = scalar |
Saves -2 multiplied by the log-likelihood |
SIGMA = scalar |
Saves the estimated value of the shape parameter sigma of the log-logistic and lognormal distributions |
SURVIVOR = variate |
Saves estimates of the survivor function |
PARAMETERIZATION = string token |
Controls the parameterization used when saving the survivor function for the Weibull distribution (ph , aft ); default ph |
MAXCYCLE = scalar |
Maximum number of iterations to use to estimate α; default 20 |
TOLERANCE = scalar |
Convergence limit for α; default 10-5 |
Parameter
TERMS = formula |
Defines the model to fit |
---|
Description
RSURVIVAL
models survival times assuming that they follow either an exponential, Weibull, extreme-value, log-logistic or lognormal distribution, as indicated by the DISTRIBUTION
option. It also caters for right-censored observations, where the subject concerned survived the trial: the CENSORED
option can be used to specify a variate with an entry for each subject containing one where the subject survived, otherwise zero. The log-logistic caters for left-censored observations, which they can be specified by an entry of -1 in the CENSORED
variate. The model to be fitted to the survival times is specified using the TERMS
parameter.
The analysis is performed using the generalized linear models facilities of Genstat. For the exponential, Weibull and extreme-value distributions a y-variate (= 1 – CENSORED
) is specified indicating whether the subject died or survived, and an offset variate is included which depends on the time variate (see Chapter 6 of Aitkin et al. 1989). For the exponential distribution this offset is simply the logarithm of the times. With the Weibull distribution it is the Weibull parameter α multiplied by the logarithm of the times, while for the extreme-value distribution it is the parameter α multiplied by the times. The parameters of the TERMS
model and α itself are estimated alternately (with number of cycles controlled by the MAXCYCLE
option) until successive estimates are within a tolerance specified by the TOLERANCE
option. The ALPHA
option can input an initial value for α and save the estimated value. By setting the MAXCYCLE
option to one, α can be fixed at the initial value; this is useful for comparing one model with another, when the value of α should be fixed at the value estimated from the more complicated model. The log-logistic distribution is fitted using a logistic regression model with number of successes 1-c and binomial denominator 2-c–b (where c is an index for a right-censored observation and b is an index for a left-censored observation) using an offset variate of the logarithm of times divided by σ. The parameters of the TERMS
model and σ (shape parameter) are estimated alternately (with number of cycles controlled by the MAXCYCLE
option) until successive estimates are within a tolerance specified by the TOLERANCE
option. For the lognormal distribution maximization of the log-likelihood is achieved using an EM algorithm details of which are given in Section 6.19 of Aitkin et al. (1989). The SIGMA
option can be used to save the estimated value of the shape parameter for both the log-logistic and lognormal distributions. The importance of variables in the lognormal model should be assessed by omitting the variable and comparing -2 times the log-likelihood; this can be saved using the _2LOGLIKELIHOOD
option. The SURVIVOR
option allows you to save estimates of the survivor function. For the Weibull distribution the PARAMETERIZATION
option can be used to choose whether to produce the estimates for the survivor function using the proportional hazards or accelerated failure time parameterization.
The PRINT
option controls printed output with similar settings to those of the FIT
directive, except that there is an extra setting loglikelihood
to print -2 times the log-likelihood. Further information can be printed subsequently by using RDISPLAY
in the usual way. The PLOT
option can be set to survivorfunction
to produce plots of the empirical survivor function against the value predicted by the model, when the exponential, Weibull and extreme-value distributions are selected (see Aitken et al. 1989, pages 275-276). The GRAPHICS
option determines the type of graph, with settings highresolution
(the default) or lineprinter
.
Options: PRINT
, TIMES
, DISTRIBUTION
, CENSORED
, PLOT
, GRAPHICS
, ALPHA
, _2LOGLIKELIHOOD
, SIGMA
, SURVIVOR
, PARAMETERIZATION
, MAXCYCLE
, TOLERANCE
.
Parameter: TERMS
.
Method
Full details of the method can be found in Chapter 6 of Aitkin et al. (1989). For the exponential distribution (pages 269-270), the survivor function is
S(t) = exp(-λ t)
with
λ = exp( Σ( bi xi) )
where bi are the parameter estimates, xi are the appropriate values of the
explanatory variates, and t is the time. The Weibull distribution (page 280)
is defined with density function
f(t) = α λ t(α-1) exp(-λ (tα))
and has survivor function
S(t) = exp(-λ tα).
The extreme-value distribution (pages 283-284) has survivor function
S(t) = exp(-λ exp(αt)).
The loglogistic distribution (pages 295-297) has the survivor function
S(t) = 1 / { 1 + (t / θ)a }
with
θ = exp(∑(bi × xi))
and a = 1 / σ.
The lognormal distribution (pages 297-300) has survivor function
S(t) = CUNORMAL
( log( (t – ∑(bi × xi)) / σ))
Action with RESTRICT
The vectors involved in the analysis may be restricted as usual for a generalized linear model.
Reference
Aitkin, M., Anderson, A., Francis, B. & Hinde, J. (1989). Statistical Modelling in GLIM. Oxford University Press.
See also
Procedures: KAPLANMEIER
, RLIFETABLE
, RPHFIT
, RPROPORTIONAL
, RSTEST
.
Commands for: Survival analysis.
Example
CAPTION 'RSURVIVAL 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 PRINT 'Exponential distribution' RSURVIVAL [TIMES=Time; CENSORED=Censor] Treat PRINT 'Weibull distribution' RSURVIVAL [DIST=weibull; TIMES=Time; CENSORED=Censor] Treat