This function provides prediction methods for the rich objects returned by
coxplsDR(..., allres = TRUE), coxsplsDR(..., allres = TRUE)
and coxDKsplsDR(..., allres = TRUE).
# S3 method for coxplsDRmodel
predict(
object,
newdata,
comps = ncol(object$tt_plsDR),
type = c("lp", "risk", "expected", "terms", "scores"),
se.fit = FALSE,
reference = c("strata", "sample", "zero"),
y = NULL,
weights = NULL,
verbose = TRUE,
...
)# S3 method for coxsplsDRmodel
predict(
object,
newdata,
comps = ncol(object$tt_splsDR),
type = c("lp", "risk", "expected", "terms", "scores"),
se.fit = FALSE,
reference = c("strata", "sample", "zero"),
y = NULL,
weights = NULL,
verbose = TRUE,
...
)
# S3 method for coxDKsplsDRmodel
predict(
object,
newdata,
comps = ncol(object$tt_DKsplsDR),
type = c("lp", "risk", "expected", "terms", "scores"),
se.fit = FALSE,
reference = c("strata", "sample", "zero"),
y = NULL,
weights = NULL,
verbose = TRUE,
...
)
A vector, matrix or list of predictions depending on type and
se.fit.
An object returned by one of the DR-based fitting functions
with allres = TRUE.
An optional data frame or matrix containing original covariates. If omitted, predictions are computed on the training data.
Number of latent components to use for prediction.
Type of predicted value. Choices are the linear predictor
("lp"), the risk score exp(lp) ("risk"), the expected number
of events ("expected"), the terms of the linear predictor
("terms") or the latent component scores ("scores").
If TRUE, pointwise standard errors are produced by the
underlying Cox model.
Reference level used to center relative predictions. This
is passed to predict.coxph and affects
type = "lp", "risk" and "terms".
Optional Surv response to use with
type = "expected" when predicting on genuinely new observations.
Optional case weights used when rebuilding a model matrix for formula-based fits.
Should some details be displayed?
Additional arguments passed to predict.coxph.
predict.coxph, coxplsDR,
coxsplsDR, coxDKsplsDR