Created
December 22, 2020 09:26
-
-
Save darioappsilon/3e81eb29b36a970081ee0a28658ec1f6 to your computer and use it in GitHub Desktop.
005_linear_regression
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Get residuals | |
| lm_residuals <- as.data.frame(residuals(model)) | |
| # Visualize residuals | |
| ggplot(lm_residuals, aes(residuals(model))) + | |
| geom_histogram(fill = "#0099f9", color = "black") + | |
| theme_classic() + | |
| labs(title = "Residuals plot") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment