What Residual plot is
A residual plot is a graph that shows the residuals of a regression model on the vertical axis and the independent variable on the horizontal axis. Residuals are the differences between the actual values of the dependent variable (y) and the predicted values of the dependent variable (ŷ). The residual plot is used to detect nonlinearity, unequal error variances, and outliers in the data.
Steps for Residual Plot:
-
Calculate the residuals for each data point in the regression model.
-
Plot the residuals against the independent variable on a scatter plot.
-
Look for patterns in the residual plot.
-
If there are any patterns or outliers in the residual plot, investigate further to determine the cause.
-
Adjust the model if necessary to account for any patterns or outliers.
Examples
-
Residual plots can be used to assess the goodness of fit of a linear regression model by plotting the residuals versus the predicted values of the model.
-
Residual plots can be used to check for non-linearity in a linear regression model by plotting the residuals versus the predictor variables.
-
Residual plots can be used to detect outliers in a linear regression model by plotting the residuals versus the observations.
-
Residual plots can be used to check for heteroscedasticity in a linear regression model by plotting the residuals versus the predictor variables.