residualForFRESA: Return residuals from prediction

Description Usage Arguments Value Author(s)

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

1
2
3
4
	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


FRESA.CAD documentation built on Jan. 13, 2021, 3:39 p.m.