residuals.caretx: Calculate model or prediction residuals.

View source: R/extraction.R

residuals.caretxR Documentation

Calculate model or prediction residuals.

Description

Computes extended working residuals of prediction and potential outliers.

Usage

## S3 method for class 'caretx'
residuals(object, newdata = NULL, ...)

## S3 method for class 'predx'
residuals(object, ...)

Arguments

object

caretx model or predx prediction object.

newdata

test data set.

...

extra arguments, currently none.

Details

Calculates working residuals for regression and binary classification predictions. In addition, squared and standardized residuals are returned along with expected normal distribution values for the standardized residuals and the true outcome. Potential outliers are identified by the two-SD criterion. Returns NULL for multi-class models.

Value

a list of data frames for the test, resample (CV) and training data set prediction with residuals and potential outliers.


PiotrTymoszuk/caretExtra documentation built on Oct. 15, 2023, 10:03 p.m.