Add Model Diagnostics
augments the data with model diagnostic columns (residuals, fitted values, etc.).
data (DataFrame): (Optional) The
data to augment.
model (Model): The model
object.
The data with added diagnostic columns.
df = add_diagnostics(mtcars, model)