This function bootstraps the model n times to estimate for each variable the empirical bootstrapped distribution of model coefficients, and net residual improvement (NeRI). At each bootstrap the non-observed data is predicted by the trained model, and statistics of the test prediction are stores and reported.
bootstrapValidation_Res(fraction = 1,
loops = 200,
model.formula,
Outcome,
data,
type = c("LM", "LOGIT", "COX"),
plots = FALSE,
bestmodel.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 best formula to be compared
The data frame used to bootstrap and validate the model
A vector with the predictions made by the model
An object of class lm
, glm
, or coxph
containing a model whose coefficients are the median of the coefficients of the bootstrapped models
A matrix with the NeRI for each model term, estimated using the bootstrap test sets
A matrix with the t-test p-value of the NeRI for each model term, estimated using the bootstrap train sets
A matrix with the Wilcoxon rank-sum test p-value of the NeRI for each model term, estimated using the bootstrap train sets
A matrix with the binomial test p-value of the NeRI for each model term, estimated using the bootstrap train sets
A matrix with the F-test p-value of the NeRI for each model term, estimated using the bootstrap train sets
A matrix with the t-test p-value of the NeRI for each model term, estimated using the bootstrap test sets
A matrix with the Wilcoxon rank-sum test p-value of the NeRI for each model term, estimated using the bootstrap test sets
A matrix with the binomial test p-value of the NeRI for each model term, estimated using the bootstrap test sets
A matrix with the F-test p-value of the NeRI for each model term, estimated using the bootstrap test sets
A vector that contains all the individual predictions used to validate the model in 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 residuals 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 train sets
A vector that contains all the individual outcomes used to validate the model in the bootstrap train sets
A vector that contains all the residuals used to validate the model in the bootstrap train sets
The global RMSE, estimated using the bootstrap test sets
The global RMSE, estimated using the bootstrap train sets
A vector with the RMSEs in the bootstrap train sets
A vector with the RMSEs in the bootstrap test sets
The bootstrap validation will estimate the confidence interval of the model coefficients and the NeRI. It will also compute the train and blind test root-mean-square error (RMSE), as well as the distribution of the NeRI p-values.