Last active
February 13, 2017 10:29
-
-
Save ggada/a93978898232dd20f29184ffe350d72c to your computer and use it in GitHub Desktop.
Plotting residual densities - ggplot2
This file contains 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
ggplot(mod, aes(x=mod$residuals)) + | |
geom_density(fill="blue", colour=NA, alpha=.2) + | |
geom_line(stat = "density") + | |
expand_limits(y = 0) + | |
ggtitle("Density plot of residuals") + | |
theme(plot.title = element_text(hjust = 0.5)) + | |
xlab("Residual") + | |
ylab("Density") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment