Learn R Programming

survcompare (version 0.2.0)

survsrfstack_predict: Predicts event probability by a trained stacked ensemble of Survival Random Forest and CoxPH

Description

Predicts event probability by a trained stacked ensemble of Survival Random Forest and CoxPH

Usage

survsrfstack_predict(
  trained_object,
  newdata,
  fixed_time,
  predict.factors,
  extrapsurvival = TRUE
)

Value

vector of predicted event probabilities

Arguments

trained_object

a trained model, output of survsrfstack_train()

newdata

new data for which predictions are made

fixed_time

time of interest, for which event probabilities are computed

predict.factors

list of predictor names

extrapsurvival

if probabilities are extrapolated beyond trained times (constant)