1. Home
  2. RPHKEEP procedure

RPHKEEP procedure

Saves information from a proportional hazards model fitted by RPHFIT (R.W. Payne).

Options

RESIDUALS = variate Saves the standardized residuals
FITTEDVALUES = variate Saves the fitted values
ESTIMATES = variate Saves estimates of the parameters
SE = variate Saves standard errors of the estimates
RESPONSE = variate Saves the response variate defined for the generalized linear model
OFFSET = variate Saves the offset variate defined for the generalized linear model
INDEX = variate Index variate used to produce the expanded covariates and factors
RISKSET = factor Saves the expanded time factor
_2LOGLIKELIHOOD = scalar Saves -2 × log-likelihood for the fitted model
DFTERMS = scalar Saves the number of d.f. in the model specified by TERMS

No parameters

Description

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.

The RESIDUALS and FITTEDVALUES options save the standardized residuals and the fitted values. The ESTIMATES and SE options save the parameter estimates and their standard errors. The RESPONSE and 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 TERMS.

Options: RESIDUALS, FITTEDVALUES, ESTIMATES, SE, RESPONSE, OFFSET, INDEX, RISKSET, _2LOGLIKELIHOOD, DFTERMS.

Parameters: none.

Method

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).

Reference

Aitkin, M., Anderson, A., Francis, B. & Hinde, J. (1989). Statistical Modelling in GLIM. Oxford University Press.

See also

Procedures: KAPLANMEIER, RLIFETABLE, RPHFIT, RPHCHANGE, RPHDISPLAY, RPHVECTORS, RPROPORTIONAL, RSTEST, RSURVIVAL.

Commands for: Survival analysis.

Example

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
Updated on June 18, 2019

Was this article helpful?