plot_cook {asympDiag} | R Documentation |
Plot Cook's distances
Description
Plot Cook's distances
Usage
plot_cook(
model,
n_highlights = 0,
cut = FALSE,
xlab = "Index",
ylab = "Cook's distance",
...
)
Arguments
model |
Model with |
n_highlights |
The number of observations with the highest Cook's distance to highlight on the plot. Defaults to 0 (no highlights). |
cut |
Logical. If TRUE, adds a cutoff line at the mean plus four times the standard deviation of Cook's distance. Defaults to FALSE. |
xlab |
The label for the x-axis. Defaults to "Index". |
ylab |
The label for the y-axis. Defaults to "Cook's distance". |
... |
Further arguments for |
Value
An invisible object representing Cook's distance values.
See Also
Examples
fit <- lm(mpg ~ cyl, data = mtcars)
plot_cook(fit)
plot_cook(fit, n_highlights = 2)
[Package asympDiag version 0.3.1 Index]