funest_pred: Predicting survival probability with time-varing covariates

Description Usage Arguments Value References Examples

View source: R/nest_pred.R

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

1
2
3
4
5
6
7
8
9
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.

References

\insertRef

aucfunest

\insertRef

bsfunest

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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

funest documentation built on March 13, 2020, 5:07 p.m.

Related to funest_pred in funest...