book_3_14.m

Use slplotr

load ganglion

x = Area;
y = CPratio;
pow = 2;

% Calculate fit and residuals.
fitx= x;
p = polyfit(x,y,pow);
fity = polyval(p,fitx);
residual = y(:)-fity(:);

alpha = 2;
lambda = 1;

% Use spread location plot for residuals.
slplotr(fity,residual,alpha,lambda)
xlabel('Fitted CPratio')
ylabel('Sqrt Abs Residual CP Ratio')
title('Ganglion')