residualForFRESA {FRESA.CAD}R Documentation

Return residuals from prediction

Description

Given a model and a new data set, this function will return the residuals of the predicted values. When dealing with a Cox proportional hazards regression model, the function will return the Martingale residuals.

Usage

	residualForFRESA(object,
	                 testData,
	                 Outcome,
	                 eta = 0.05)

Arguments

object

An object of class lm, glm, or coxph containing the model to be analyzed

testData

A data frame where all variables are stored in different columns, with the data set to be predicted

Outcome

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

eta

The weight of the contribution of the Martingale residuals, or 1 - the weight of the contribution of the classification residuals (only needed if object is of class coxph)

Value

A vector with the residuals (i.e. the differences between the predicted and the real outcome)

Author(s)

Jose G. Tamez-Pena and Antonio Martinez-Torteya


[Package FRESA.CAD version 3.4.7 Index]