Usage
"predict"(object, X, type=c("link", "response", "survival", "median", "norm", "coefficients", "vars", "nvars", "groups", "ngroups"), latent = FALSE, lambda, which=1:length(object$lambda), ...)
Arguments
object
Fitted "grpsurvOverlap"
model object.
X
Matrix of values at which predictions are to be made. Not
used for type="coefficients"
or for some of the type
settings in predict
.
latent
Should plot the paths of latent coefficients? Default is TRUE. Note $\hat{\gamma}$ is used as the label of y axis to represent latent coefficient vector.
lambda
Values of the regularization parameter lambda
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. By default, all indices are returned. If
lambda
is specified, this will override which
.
type
Type of prediction: "link"
returns the
linear predictors; "response"
gives the risk (i.e., exp(link));
"survival"
returns the estimated survival function; "median"
estimates median survival times. The other options are all identical to
their grpreg
counterparts: "coefficients"
returns the
coefficients; "vars"
returns the indices for the nonzero coefficients;
"groups"
returns the indices for the groups with at least one
nonzero coefficient; "nvars"
returns the number of nonzero
coefficients; "ngroups"
returns the number of groups with at
least one nonzero coefficient; "norm"
returns the L2 norm of
the coefficients in each group.