WOLFRAM|DEMONSTRATIONS PROJECT

Residual-Fit Spread Plot

​
graph
data with LS line
RFS plot
n
20
ρ
0.9
random seed
212
The residual-fit spread (RFS) plot is illustrated using simple linear regression. In general, the purpose of the RFS plot is to provide a visualization of how well a statistical model fits the data. It provides a graphical alternative to the coefficient of determination.
In this Demonstration, a random sample of size
n
is generated from a bivariate normal distribution with mean zero, unit variances, and correlation parameter
ρ
. In the first graph, "data with LS line", the data and least-squares regression line are shown, as well as the estimated
2
R
, the coefficient of determination.
2
R
is the fraction of variability accounted for by the fitted model. Next, the RFS plot is shown. This plot is a trellis-style graphic with a quantile plot of the fitted values minus the mean in the left panel and a quantile plot of the residuals on the right. Grid lines that divide the plotting area into equally sized rectangles are shown to enhance the visual comparison of the panels.
The impact of randomness can be explored by changing the random seed.