Learn R Programming

survcompare (version 0.2.0)

survsrf_predict: Predicts event probability by a trained Survival Random Forest

Description

Predicts event probability by a trained Survival Random Forest

Usage

survsrf_predict(trained_model, newdata, fixed_time, extrapsurvival = TRUE)

Value

vector of predicted event probabilities

Arguments

trained_model

a trained SRF model, output of survsrf_train(), or randomForestSRC::rfsrc()

newdata

new data for which predictions are made

fixed_time

time of interest for which event probabilities are computed

extrapsurvival

if probabilities are extrapolated beyond trained times (using probability of the lastest available time). Can be helpful for cross-validation of small data, where random split may cause the time of interest being outside of the training set.