Learn R Programming

survcompare (version 0.1.2)

srf_survival_prob_for_time: Internal function to compute survival probability by time from a fitted survival random forest

Description

Internal function to compute survival probability by time from a fitted survival random forest

Usage

srf_survival_prob_for_time(rfmodel, df_to_predict, fixed_time, oob = FALSE)

Value

output list: output$train, test, testaverage, traintaverage, time

Arguments

rfmodel

pre-trained survsrf_train model

df_to_predict

test data

fixed_time

at which event probabilities are computed

oob

TRUE/FALSE use out-of-bag prediction

Examples

Run this code
df <- simulate_nonlinear()
#params<- c("age", "hyp", "bmi")
#s <- survsrf_train(df, params)
#p <- survsrf_predict(s, df, 5)

Run the code above in your browser using DataLab