get_auc | R Documentation |
Use the timeROC package to calculate the ROC-AUC based on predictions from the mmm_predictions function.
get_auc( predictions, prediction_landmark, prediction_horizon, id, failure_time, failure )
predictions |
predictions data from the mmm_predictions function. |
prediction_landmark |
a numeric vector with the landmark times to select predictions. |
prediction_horizon |
the prediction horizon at which to calculate the ROC-AUC. |
id |
a character value for the name of the vector of subject identifiers in the predictions data. |
failure_time |
a character value for the name of the vector with failure times in the predictions data. |
failure |
a character value for th name of the vector with failure status. |
Uses the timeROC package to determine the area under the receiver operating characteristics curve.
# Get the ROC-AUC for a single landmark ## Not run: get_auc( predictions=predictions, prediction_landmark=1, prediction_horizon=5, id="id", failure_time="ftime", failure="failure") # Get the ROC-AUC for a series of landmarks from a list of predictions lm <- 1:5 lapply(seq_along(lm), function(l) { get_auc( predictions=predictions_test[[l]], prediction_landmark=lm[l], prediction_horizon=horizon, id="transnr", failure_time="stime", failure="failure" ) }) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.