Add residuals from a model to a data frame
add_residuals(data, model, value = ".residual", ...)
A data frame (tibble) formed from data
and residuals from model
.
a data frame containing values for the variables used to fit the
model. Passed to stats::residuals()
as newdata
.
a fitted model for which a stats::residuals()
method is
available. S3 method dispatch is performed on the model
argument.
character; the name of the variable in which model residuals will be stored.
additional arguments passed to methods.