This function provides an analysis of the effect of each model term by comparing the binary classification performance between the Full model and the model without each term.
The model is fitted using the train data set, but probabilities are predicted for the train and test data sets.
Reclassification improvement is evaluated using the improveProb
function (Hmisc
package).
Additionally, the integrated discrimination improvement (IDI) and the net reclassification improvement (NRI) of each model term are reported.
getVar.Bin(object,
data,
Outcome = "Class",
type = c("LOGIT", "LM", "COX"),
testData = NULL,
callCpp=TRUE)
An object of class lm
, glm
, or coxph
containing the model to be analysed
A data frame where all variables are stored in different columns
The name of the column in data
that stores the variable to be predicted by the model
Fit type: Logistic ("LOGIT"), linear ("LM"), or Cox proportional hazards ("COX")
A data frame similar to data
, but with a data set to be independently tested. If NULL
, data
will be used.
is set to true it will use the c++ implementation of improvement.
A vector in which each term represents the z-score of the IDI obtained with the Full model and the model without one term
A vector in which each term represents the z-score of the NRI obtained with the Full model and the model without one term
A vector in which each term represents the IDI obtained with the Full model and the model without one term
A vector in which each term represents the NRI obtained with the Full model and the model without one term
A vector similar to z.IDIs
, where values were estimated in testdata
A vector similar to z.NRIs
, where values were estimated in testdata
A vector similar to IDIs
, where values were estimated in testdata
A vector similar to NRIs
, where values were estimated in testdata
A vector with the univariate train accuracy of each model variable
A vector with the univariate test accuracy of each model variable
Pencina, M. J., D'Agostino, R. B., & Vasan, R. S. (2008). Evaluating the added predictive ability of a new marker: from area under the ROC curve to reclassification and beyond. Statistics in medicine 27(2), 157-172.