rcoplot

Residual case order plot

Syntax

rcoplot(r,rint)

Description

rcoplot(r,rint) displays an errorbar plot of the confidence intervals on the residuals from a regression. The residuals appear in the plot in case order. Inputs r and rint are outputs from the regress function.

Examples

The following plots residuals and prediction intervals from a regression of a linearly additive model to the data in moore.mat:

load moore
X = [ones(size(moore,1),1) moore(:,1:5)];
y = moore(:,6);
alpha = 0.05;
[betahat,Ibeta,res,Ires,stats] = regress(y,X,alpha);
rcoplot(res,Ires)

The interval around the first residual, shown in red, does not contain zero. This indicates that the residual is larger than expected in 95% of new observations, and suggests the data point is an outlier.

See Also

Was this topic helpful?