predict.flashlight: Predictions for flashlight

View source: R/predict_flashlight.R

predict.flashlightR Documentation

Predictions for flashlight

Description

Predict method for an object of class "flashlight". Pass additional elements to update the flashlight, typically data.

Usage

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

Arguments

object

An object of class "flashlight".

...

Arguments used to update the flashlight.

Value

A vector with predictions.

Examples

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

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