Please enable JavaScript to view this site.

This guide is for an old version of Prism. Browse the latest version or update Prism

When to plot residuals

A residual is the distance of a point from the curve. A residual is positive when the point is above the curve, and is negative when the point is below the curve. The residual table has the same X values as the original data, but the Y values are the vertical distances of the point from the curve.

Create a residual plot if you aren't sure that your data really follow the model you selected. Mild deviations of data from a model are often easier to spot on a residual plot.

How to graph residuals

Choose to create a residual plot by checking an option on the Diagnostics tab of the nonlinear regression dialog. Prism will automatically make a new graph. The residuals are tabulated in a separate page of results, and you can use these like any other table (make additional graphs, plot on other graphs, transform...).

Interpreting a residual plot

The X axis of the residual plot is the same as the graph of the data, while the Y axis is the distance of each point from the curve. Points with positive residuals are above the curve; points with negative residuals are below the curve.

An example is shown below, with a graph of the data and curve combined with a residual plot in a layout. If you look carefully at the curve on the left, you will see that the data points are not randomly distributed above and below the curve. There are clusters of points at early and late times that are below the curve, and a cluster of points at middle time points that are above the curve. This is much easier to see on the graph of the residuals in the inset. The data are not randomly scattered above and below the X-axis.

Residuals with weighted fits

If you choose (or accept the default) standard weighting, then the residuals are the difference between the actual Y value you entered and the Y value predicted by the model. If the data point is above the curve, the residual is positive. If the data point is below the curve, the residual is negative.  Least-squares regression works to minimize the sum of the squares of these residuals.

If you choose another weighting scheme, Prism adjusts the definition of the residuals accordingly. The residual that Prism tabulates and plots equals the residual defined in the prior paragraph, divided by the weighting factor.  The most common common alternative weighting is "Weight by 1/Y2 (minimize relative distances squared)". In this case, the residual is defined to be the distance of the point from the curve divided by the Y value of the curve. Weighted nonlinear regression minimizes the sum of the square of these residuals.

Note the ambiguity in defining weighting. The Prism dialog gives the choice to weight by 1/Y2. This means that the squared residual is divided by Y2. The weighted residual is defined as the residual divided by Y. Prism minimizes the sum of the squares of these weighted residuals.

Earlier versions of Prism (up to Prism 4) always plotted basic unweighted residuals, even if you chose to weight the points unequally.

 

© 1995-2019 GraphPad Software, LLC. All rights reserved.