Augment Data with Model Calculations
Appends model predictions, residuals, and potentially diagnostic metrics to a dataset.
data (DataFrame): The dataset to
augment.
model (Model): The model
object.
The original DataFrame with appended fitted,
resid, etc.
aug = augment(mtcars, model)