May 2019
Beginner to intermediate
266 pages
5h 57m
English
A residual plot is a graph that displays the residuals on the vertical axis specified and the independent variable on the horizontal axis. In the event that the points in a residual plot are dispersed in a random manner around the horizontal axis, it is appropriate to use a linear regression model for the data. If the data is not dispersed, a non-linear model is more appropriate.
We can create and customize the residual plot using the steps mentioned as follows:
> library(ggplot2)Attaching package: 'ggplot2'The following object is masked _by_ '.GlobalEnv':mpgWarning message:package 'ggplot2' was built under R version 3.5.3
Read now
Unlock full access