Learn R Programming

rigr (version 1.0.4)

residuals.uRegress: Extract Residuals from uRegress objects

Description

Extracts residuals (unstandardized, standardized, studentized, or jackknife) from uRegress objects.

Usage

# S3 method for uRegress
residuals(object, type = "", ...)

Value

Returns the type of residuals requested.

Arguments

object

an object of class uRegress, as returned by regress.

type

denotes the type of residuals to return. Default value is "", which returns unstandardized residuals. "standardized", "studentized", and "jackknife" return the expected type of residuals.

...

other arguments

Details

Relies on functionality from the stats package to return residuals from the uRegress object. "studentized" residuals are computed as internally studentized residuals, while "jackknife" computes the externally studentized residuals.

See Also

Examples

Run this code

# Reading in a dataset
data(mri)

# Create a uRegress object, regressing ldl on age
ldlReg <- regress("mean", age~ldl, data=mri)

# Get the studentized residuals
residuals(ldlReg, "studentized")

# Get the jackknifed residuals
residuals(ldlReg, "jackknife")

Run the code above in your browser using DataLab