cookDist {glmxdiag}R Documentation

Visualize Cook's distances

Description

Graphical visualization of Cook's distances for each observation within input model.

Usage

cookDist(object, label.id, n.label.id, xlab, ylab, pos, ...)

Arguments

object

object of class 'influence', see Details.

label.id

labels of observations, should be a vector with n elements.

n.label.id

number of observations with highest Cook's distance to label in the plot.

xlab

title for the x axis.

ylab

title for the y axis.

pos

position of observations labels. Values 1, 2, 3, 4 respectively indicate below, left, above, right.

...

further arguments passed to plot.

Details

This function only works with objects given as output from influenceDiag, it takes Cook's distances and plot them as vertical segments.

High values are associated to high influence within the model.

Value

Doesn't return a value, called for side effects.

Author(s)

Giuseppe Reale

Examples

data("mtcars")
mod <- glm(mpg ~ cyl + hp + carb, family = Gamma, data = mtcars)
inf <- influenceDiag(mod)
cookDist(inf, label.id = rownames(mtcars))


[Package glmxdiag version 1.0.0 Index]