powered by
Graphical visualization of Cook's distances for each observation within input model.
cookDist(object, label.id, n.label.id, xlab, ylab, pos, ...)
object of class 'influence', see Details.
labels of observations, should be a vector with n elements.
number of observations with highest Cook's distance to label in the plot.
title for the x axis.
title for the y axis.
position of observations labels. Values 1, 2, 3, 4 respectively indicate below, left, above, right.
1, 2, 3, 4
further arguments passed to plot.
plot
Doesn't return a value, called for side effects.
This function only works with objects given as output from influenceDiag, it takes Cook's distances and plot them as vertical segments.
influenceDiag
High values are associated to high influence within the model.
# NOT RUN { data("mtcars") mod <- glm(mpg ~ cyl + hp + carb, family = Gamma, data = mtcars) inf <- influenceDiag(mod) cookDist(inf, label.id = rownames(mtcars)) # }
Run the code above in your browser using DataLab