Description Usage Arguments Value References Examples
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.
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
)
|
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 |
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
aucfunest
\insertRefbsfunest
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.