Learn R Programming

funest (version 0.0.1.3)

funest_pred: Predicting survival probability with time-varing covariates

Description

The function funest_pred takes the functional ensemble survival tree object from funest_fit() to produce predicted survival probability at user specified t_star and t_pred along with prediction accuracy measures. Must run "predictSurvProb.ranger = predictor_loader()" before calling this function.

Usage

funest_pred(
  funest.fit,
  long_test,
  surv_test,
  tv_names,
  fv_names,
  t_star,
  t_pred
)

Arguments

funest.fit

returned object from funest_fit() function

long_test

long form of survival data from the testing set

surv_test

short form of survival data from the testing set

tv_names

a list of names of time-varying covariates

fv_names

a list of names of fixed covariates

t_star

time for the last observed biomarker measurement

t_pred

time at prediction

Value

A list of three items. The first is a matrix of individual ID and their corresponding predicted survival probability. The second is the estimated Brier score. The third is the estimated area under the ROC curve.

  • pred_pb - predicted survival probability at t_pred for each individual conditional on being alive at t_star

  • bs - Brier score

  • AUC - area under the receiver operating characteristic (ROC) curve

References

aucfunest

bsfunest

Examples

Run this code
# NOT RUN {
library(funest)
data("long_train")
data("surv_train")
data("long_test")
data("surv_test")
# must run the following line before calling funest_pred()
predictSurvProb.ranger = predictor_loader()
w = funest_fit(long_train, surv_train, tv_names = list("Y1", "Y2", "Y3"),noftree = 10,
 fv_names = list("W"), t_star = 5.5, t_pred = 11)
pred = funest_pred(w, long_test, surv_test, tv_names = list("Y1", "Y2", "Y3"),
 fv_names = list("W"), t_star = 5.5, t_pred = 11)
pred$bs
pred$AUC
# }

Run the code above in your browser using DataLab