This function bootstraps the model n times to estimate for each variable the empirical distribution of model coefficients, area under ROC curve (AUC), integrated discrimination improvement (IDI) and net reclassification improvement (NRI). At each bootstrap the non-observed data is predicted by the trained model, and statistics of the test prediction are stored and reported. The method keeps track of predictions and plots the bootstrap-validated ROC. It may plots the blind test accuracy, sensitivity, and specificity, contrasted with the bootstrapped trained distributions.
bootstrapValidation_Bin(fraction = 1,
loops = 200,
model.formula,
Outcome,
data,
type = c("LM", "LOGIT", "COX"),
plots = FALSE,
best.model.formula=NULL)
The fraction of data (sampled with replacement) to be used as train
The number of bootstrap loops
An object of class formula
with the formula to be used
The name of the column in data
that stores the variable to be predicted by the model
A data frame where all variables are stored in different columns
Fit type: Logistic ("LOGIT"), linear ("LM"), or Cox proportional hazards ("COX")
Logical. If TRUE
, density distribution plots are displayed
An object of class formula
with the formula to be used for the best model
The data frame used to bootstrap and validate the model
A vector with the predictions made by the model
The accuracy of the model in the blind test set
The sensitivity of the model in the blind test set
The specificity of the model in the blind test set
A vector with the AUC in the bootstrap train sets
An object of class roc
containing the AUC in the bootstrap blind test set
An object of class roc
containing the AUC using the mean of the bootstrapped coefficients
The fraction of data that was sampled with replacement
The number of loops it took for the model to stabilize
The accuracy of the original model
The sensitivity of the original model
The specificity of the original model
A vector with the accuracies in the bootstrap test sets
A vector with the sensitivities in the bootstrap test sets
A vector with the specificities in the bootstrap test sets
A vector with the accuracies in the bootstrap train sets
A vector with the sensitivities in the bootstrap train sets
A vector with the specificities in the bootstrap train sets
A matrix with the coefficients in the bootstrap train sets
An object of class lm
, glm
, or coxph
containing a model whose coefficients are the median of the coefficients of the bootstrapped models
The accuracy of the mboot.model
model
The sensitivity of the mboot.model
model
The specificity of the mboot.model
model
A matrix with the z-score of the NRI for each model term, estimated using the bootstrap train sets
A matrix with the z-score of the IDI for each model term, estimated using the bootstrap train sets
A matrix with the z-score of the NRI for each model term, estimated using the bootstrap test sets
A matrix with the z-score of the IDI for each model term, estimated using the bootstrap test sets
A matrix with the NRI for each model term, estimated using the bootstrap test sets
A matrix with the IDI for each model term, estimated using the bootstrap test sets
A vector that contains all the individual outcomes used to validate the model in the bootstrap test sets
A vector that contains all the individual predictions used to validate the model in the bootstrap test sets
The bootstrap validation will estimate the confidence interval of the model coefficients and the NRI and IDI.
The non-sampled values will be used to estimate the blind accuracy, sensitivity, and specificity.
A plot to monitor the evolution of the bootstrap procedure will be displayed if plots
is set to TRUE.
The plot shows the train and blind test ROC.
The density distribution of the train accuracy, sensitivity, and specificity are also shown, with the blind test results drawn along the y-axis.
bootstrapValidation_Res,
plot.bootstrapValidation_Bin,
summary.bootstrapValidation_Bin