getVar.Res: Analysis of the effect of each term of a linear regression...

getVar.ResR 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 lm, glm, or coxph containing the model to be analyzed

data

A data frame where all variables are stored in different columns

Outcome

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

type

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

testData

A data frame similar to data, but with a data set to be independently tested. If NULL, data will be used.

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 tP.value, where values were estimated in testdata

testData.BinP.value

A vector similar to BinP.value, where values were estimated in testdata

testData.WilcoxP.value

A vector similar to WilcoxP.value, where values were estimated in testdata

testData.FP.value

A vector similar to FP.value, where values were estimated in testdata

testData.NeRIs

A vector similar to NeRIs, where values were estimated in testdata

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

See Also

getVar.Bin


FRESA.CAD documentation built on Nov. 25, 2023, 1:07 a.m.