getVar.Res {FRESA.CAD} | R Documentation |
Analysis of the effect of each term of a linear regression model by analysing its residuals
Description
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.
Usage
getVar.Res(object,
data,
Outcome = "Class",
type = c("LM", "LOGIT", "COX"),
testData = NULL,
callCpp=TRUE)
Arguments
object |
An object of class |
data |
A data frame where all variables are stored in different columns |
Outcome |
The name of the column in |
type |
Fit type: Logistic ("LOGIT"), linear ("LM"), or Cox proportional hazards ("COX") |
testData |
A data frame similar to |
callCpp |
is set to true it will use the c++ implementation of residual improvement. |
Value
tP.value |
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 |
BinP.value |
A vector in which each element represents the p-value associated with a significant improvement in residuals according to the binomial sign test |
WilcoxP.value |
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 |
FP.value |
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 |
NeRIs |
A vector in which each element represents the net residual improvement between the Full model and the model without one term |
testData.tP.value |
A vector similar to |
testData.BinP.value |
A vector similar to |
testData.WilcoxP.value |
A vector similar to |
testData.FP.value |
A vector similar to |
testData.NeRIs |
A vector similar to |
unitestMSE |
A vector with the univariate residual mean sum of squares of each model variable on the test data |
unitrainMSE |
A vector with the univariate residual mean sum of squares of each model variable on the train data |
Author(s)
Jose G. Tamez-Pena and Antonio Martinez-Torteya