residuals.flashlight: Residuals for flashlight

View source: R/residuals_flashlight.R

residuals.flashlightR Documentation

Residuals for flashlight

Description

Residuals method for an object of class "flashlight". Pass additional elements to update the flashlight before calculation of residuals.

Usage

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

Arguments

object

An object of class "flashlight".

...

Arguments used to update the flashlight before calculating the residuals.

Value

A numeric vector with residuals.

Examples

fit <- lm(Sepal.Length ~ ., data = iris)
x <- flashlight(model = fit, data = iris, y = "Sepal.Length", label = "ols")
residuals(x)[1:5]

flashlight documentation built on May 31, 2023, 6:19 p.m.