add_fitted: Add fitted values from a model to a data frame

add_fittedR Documentation

Add fitted values from a model to a data frame

Description

Add fitted values from a model to a data frame

Usage

add_fitted(data, model, value = ".value", ...)

Arguments

data

a data frame containing values for the variables used to fit the model. Passed to stats::predict() as newdata.

model

a fitted model for which a stats::predict() method is available. S3 method dispatch is performed on the model argument.

value

character; the name of the variable in which model predictions will be stored.

...

additional arguments passed to methods.

Value

A data frame (tibble) formed from data and fitted values from model.


gratia documentation built on Feb. 16, 2023, 10:40 p.m.