powered by
A dplyr compatible convenience function to add residuals to a data set
add_model_residuals(model = NULL, old_data = NULL)
A model object from `fit_model`
The data set to which predicted values will be added.
A data.frame object with residuals added.
# NOT RUN { iris1 <- iris[1:50,] iris2 <- iris[51:100,] lm_model <- fit_model(iris1,"Sepal.Length","Sepal.Width","lm") head(add_model_residuals(lm_model,iris1)) # }
Run the code above in your browser using DataLab