predict.survSuperLearner: Prediction function for survival Super Learner

predict.survSuperLearnerR Documentation

Prediction function for survival Super Learner

Description

This function predicts the fitted survival Super Learner on new data.

Usage

## S3 method for class 'survSuperLearner'
predict(
  object,
  newdata,
  new.times,
  X = NULL,
  time = NULL,
  event = NULL,
  onlySL = FALSE,
  threshold = 1e-04,
  ...
)

Arguments

object

Fitted survSuperLearner object.

newdata

r x p data.frame of new covariates for which to obtain predicted survivals. Must have same names and structure as original covariates X used to train the SuperLearner.

new.times

q x 1 vector of times for which to obtain predicted survivals.

X

Original training covariates, which may be needed for obtaining predictions for some learners. Defaults to NULL.

time

Original training follow-up times, which may be needed for obtaining predictions for some learners. Defaults to NULL.

event

Original training event indicators, which may be needed for obtaining predictions for some learners. Defaults to NULL.

onlySL

Logical indicating whether to only fit the learners with non-zero SuperLearner coefficient. Defaults to FALSE.

threshold

Minimum coefficient weight for a learner to be inclued in the super learner prediction. Helps reduce computation time if there are many learners with small weights. Defaults to 10e-4.

Details

This is the prediction function for survSuperLearner.

Value

survSuperLearner returns a named list with the following elements:

call

The matched call.

event.libraryNames, cens.libraryNames

Parsed learner names.

event.SL.library, cens.SL.library

Libraries used for fitting.

event.SL.predict, cens.SL.predict

m x k matrices of SuperLearner predicted survival values. Rows index observations in newX; columns index times in new.times.

event.coef, cens.coef

Fitted SuperLearner coefficients for the model for the conditional survival functions for the event and censoring times, respectively.


tedwestling/survSuperLearner documentation built on Dec. 12, 2024, 4:16 p.m.