Saves information from a proportional hazards model fitted by
RPHFIT (R.W. Payne).
||Saves the standardized residuals|
||Saves the fitted values|
||Saves estimates of the parameters|
||Saves standard errors of the estimates|
||Saves the response variate defined for the generalized linear model|
||Saves the offset variate defined for the generalized linear model|
||Index variate used to produce the expanded covariates and factors|
||Saves the expanded time factor|
||Saves -2 × log-likelihood for the fitted model|
||Saves the number of d.f. in the model specified by
This procedure allows you to copy information into Genstat data structures from a proportional hazard model that has been fitted by procedure
RPHFIT. You do not need to declare the structures in advance; Genstat will declare them automatically to be of the correct type and length.
FITTEDVALUES options save the standardized residuals and the fitted values. The
SE options save the parameter estimates and their standard errors. The
OFFSET options save the response variate and the offset variate that have been defined for the generalized linear model. The
INDEX variate saves the variate of indexes used to construct the expanded x-variates and factors from original variates and factors of the model. The
RISKSET option saves a variate indicating the time interval corresponding to each of their units. Finally, the
_2LOGLIKELIHOOD option saves -2 times the log-likelihood, and the
DFTERMS option saves the number of degrees of freedom in the model specified by
The log-likelihood is calculated as described by Aitkin et al. (1989). The response variate and offset are recovered from a workspace structure that is defined by
RPHFIT to hold details of the model. The other information is saved using
RKEEP (which can also be used to save additional relevant output).
Aitkin, M., Anderson, A., Francis, B. & Hinde, J. (1989). Statistical Modelling in GLIM. Oxford University Press.
Commands for: Survival analysis.
CAPTION 'RPHKEEP 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 FACTOR [LEVELS=42; VALUES=1...42] Subject RPHFIT [TIMES=Time; SUBJECTS=Subject; CENSORED=Censor]\ Treat RPHKEEP [ESTIMATES=Param; SE=se; RESPONSE=Yvar; OFFSET=Offset;\ INDEX=Index; RISKSET=Interval] PRINT Param,se FACTOR [LABELS=!t(control,'6-mercaptopurine')] ExtTreat CALCULATE ExtTreat = ELEMENTS(Treat; Index) PRINT Yvar,Offset,Interval,ExtTreat