Similar to other predict methods, this function returns predictions from a fitted grpsurv object.
## S3 method for class 'grpsurv'predict( object, X, type = c("link","response","survival","hazard","median","norm","coefficients","vars","nvars","groups","ngroups"), lambda, which =1:length(object$lambda),...)
Arguments
object: Fitted grpsurv model object.
X: Matrix of values at which predictions are to be made. Not required for some type values.
type: Type of prediction:
link: linear predictors
response: risk (i.e., exp(link))
survival: the estimated survival function
hazard: the estimated cumulative hazard function
median: median survival time
The other options are all identical to their grpreg() counterparts
lambda: Regularization parameter at which predictions are requested. For values of lambda not in the sequence of fitted models, linear interpolation is used.
which: Indices of the penalty parameter lambda at which predictions are required. Default: all indices. If lambda is specified, this will override which.
...: Not used.
Returns
The object returned depends on type.
Details
Estimation of baseline survival function conditional on the estimated values of beta is carried out according to the method described in Chapter 4.3 of Kalbfleisch and Prentice.