This function provides an analysis of the effect of each model term by comparing the residuals of the Full model and the model without each term. The model is fitted using the train data set, but analysis of residual improvement is done on the train and test data sets. Residuals are compared by a paired t-test, a paired Wilcoxon rank-sum test, a binomial sign test and the F-test on residual variance. Additionally, the net residual improvement (NeRI) of each model term is reported.
getVar.Res(object,
data,
Outcome = "Class",
type = c("LM", "LOGIT", "COX"),
testData = NULL,
callCpp=TRUE)
An object of class lm
, glm
, or coxph
containing the model to be analyzed
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 residual improvement.
A vector in which each element represents the single sided p-value of the paired t-test comparing the absolute values of the residuals obtained with the Full model and the model without one term
A vector in which each element represents the p-value associated with a significant improvement in residuals according to the binomial sign test
A vector in which each element represents the single sided p-value of the Wilcoxon rank-sum test comparing the absolute values of the residuals obtained with the Full model and the model without one term
A vector in which each element represents the single sided p-value of the F-test comparing the residual variances of the residuals obtained with the Full model and the model without one term
A vector in which each element represents the net residual improvement between the Full model and the model without one term
A vector similar to tP.value
, where values were estimated in testdata
A vector similar to BinP.value
, where values were estimated in testdata
A vector similar to WilcoxP.value
, where values were estimated in testdata
A vector similar to FP.value
, where values were estimated in testdata
A vector similar to NeRIs
, where values were estimated in testdata
A vector with the univariate residual mean sum of squares of each model variable on the test data
A vector with the univariate residual mean sum of squares of each model variable on the train data