WOLFRAM|DEMONSTRATIONS PROJECT

Spread-Location Regression Diagnostic Check

​
random seed
4511
sample size n
100
λ
1
The spread-location plot from a linear regression shown on the left is a plot of
(λ)

e
i

versus

y
i
, where
i=1,…,n
,
(λ)

e
i

is the power transformation of the absolute residual, and

y
i
is the fitted value.
The red line is a nonparametric smoother used to enhance the visualization. The purpose of this plot is to check for possible model mis-specification caused by monotonic change in variance related to the level as estimated by the fitted values. On the right, the box-whisker chart of the
(λ)

e
i

is shown. By adjusting the power transformation parameter
λ
to make the distribution of the
(λ)

e
i

more symmetric, the visualization of the spread-location relationship is improved. Some popular software programs fix
λ=0.5
, but this Demonstration illustrates that this might not always be the best choice. Vary the sample size,
n
, and the random seed to see the impact of sample size and randomness. See Details for further discussion.