Description Usage Arguments Details Value Side Effects References See Also Examples
Produces a set of comparison diagnostic plots. The plot options are
Normal QQ Plot of Modified Residuals,
Kernel Density Estimate of Modified Residuals,
Modified Residuals vs. Leverage,
Modified Residuals vs. Fitted Values,
Scale-Location,
Response vs. Fitted Values,
Modified Residuals vs. Index (Time),
Overlaid Normal QQ Plot of Modified Residuals,
Overlaid Kernel Density Estimate of Modified Residuals,
Scatter Plot with Overlaid Fits (for simple linear regression models).
1 2 |
x |
an |
which.plots |
either |
... |
other parameters to be passed through to plotting functions. |
The modified residuals are defined to be
r_{i} = \frac{e_{i}}{√{1 - h_{i}}}
where h_{i} = H_{ii} is the i^{th} diagonal element of the hat matrix. The modified residuals are identically distributed with variance σ^{2}. The modified residuals are used instead of the standardized residuals (which are identically distributed with variance 1) so that the comparison plots emphasize differences in the variance estimates.
x
is invisibly returned.
The selected plots are drawn on a graphics device.
Atkinson, A. C. 1985. Plots, transformations, and regression: an introduction to graphical methods of diagnostic regression analysis. Oxford: Clarendon Press.
See qqPlot.lmfm
for (2), kernDenPlot.lmfm
for (3), indexPlot.lmfm
for (8), overlaidQQPlot.lmfm
for (9), overlaidKernDenPlot.lmfm
for (10), simpleRegPlot.lmfm
for (11), and scatterPlot.lmfm
for the others. See rmodified
for modified residuals.
1 2 3 4 5 | data(stackloss)
stack.lm <- lm(stack.loss ~ ., data = stackloss)
stack.clean <- lm(stack.loss ~ ., data = stackloss, subset = 5:20)
fm <- fit.models(stack.clean, stack.lm)
plot(fm)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.