bootstrapValidation.Bin: Bootstrap validation of binary classification models

Description Usage Arguments Details Value Author(s) See Also

Description

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.

Usage

1
2
3
4
5
6
7
8
	bootstrapValidation_Bin(fraction = 1,
	                    loops = 200,
	                    model.formula,
	                    Outcome,
	                    data,
	                    type = c("LM", "LOGIT", "COX"),
	                    plots = FALSE,
						best.model.formula=NULL)

Arguments

fraction

The fraction of data (sampled with replacement) to be used as train

loops

The number of bootstrap loops

model.formula

An object of class formula with the formula to be used

Outcome

The name of the column in data that stores the variable to be predicted by the model

data

A data frame where all variables are stored in different columns

type

Fit type: Logistic ("LOGIT"), linear ("LM"), or Cox proportional hazards ("COX")

plots

Logical. If TRUE, density distribution plots are displayed

best.model.formula

An object of class formula with the formula to be used for the best model

Details

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.

Value

data

The data frame used to bootstrap and validate the model

outcome

A vector with the predictions made by the model

blind.accuracy

The accuracy of the model in the blind test set

blind.sensitivity

The sensitivity of the model in the blind test set

blind.specificity

The specificity of the model in the blind test set

train.ROCAUC

A vector with the AUC in the bootstrap train sets

blind.ROCAUC

An object of class roc containing the AUC in the bootstrap blind test set

boot.ROCAUC

An object of class roc containing the AUC using the mean of the bootstrapped coefficients

fraction

The fraction of data that was sampled with replacement

loops

The number of loops it took for the model to stabilize

base.Accuracy

The accuracy of the original model

base.sensitivity

The sensitivity of the original model

base.specificity

The specificity of the original model

accuracy

A vector with the accuracies in the bootstrap test sets

sensitivities

A vector with the sensitivities in the bootstrap test sets

specificities

A vector with the specificities in the bootstrap test sets

train.accuracy

A vector with the accuracies in the bootstrap train sets

train.sensitivity

A vector with the sensitivities in the bootstrap train sets

train.specificity

A vector with the specificities in the bootstrap train sets

s.coef

A matrix with the coefficients in the bootstrap train sets

boot.model

An object of class lm, glm, or coxph containing a model whose coefficients are the median of the coefficients of the bootstrapped models

boot.accuracy

The accuracy of the mboot.model model

boot.sensitivity

The sensitivity of the mboot.model model

boot.specificity

The specificity of the mboot.model model

z.NRIs

A matrix with the z-score of the NRI for each model term, estimated using the bootstrap train sets

z.IDIs

A matrix with the z-score of the IDI for each model term, estimated using the bootstrap train sets

test.z.NRIs

A matrix with the z-score of the NRI for each model term, estimated using the bootstrap test sets

test.z.IDIs

A matrix with the z-score of the IDI for each model term, estimated using the bootstrap test sets

NRIs

A matrix with the NRI for each model term, estimated using the bootstrap test sets

IDIs

A matrix with the IDI for each model term, estimated using the bootstrap test sets

testOutcome

A vector that contains all the individual outcomes used to validate the model in the bootstrap test sets

testPrediction

A vector that contains all the individual predictions used to validate the model in the bootstrap test sets

Author(s)

Jose G. Tamez-Pena and Antonio Martinez-Torteya

See Also

bootstrapValidation_Res, plot.bootstrapValidation_Bin, summary.bootstrapValidation_Bin


FRESA.CAD documentation built on Jan. 13, 2021, 3:39 p.m.