cooks20x: Cook's distance plot

Description Usage Arguments Value Examples

View source: R/cooks20x.R

Description

Draws a Cook's distance plot.

Usage

1
2
cooks20x(lmfit, main = "Cook's Distance plot", xlab = "observation number",
  ylab = "Cook's distance", line = c(0.5, 2, 2), cex.labels = 1, ...)

Arguments

lmfit

output from the function 'lm()'.

main

the plot title

xlab

the x-axis title.

ylab

the y-axis title.

line

a vector of length 3 controlling the distances of the plot title, the x-axis title and the y-axis title from the axis in line units.

cex.labels

a factor controlling the font size of the labels on suspected high influence points.

...

additional arguments are passed to plot and may provide some extra flexibility.

Value

Returns the plot and identifies the three highest Cook's values

Examples

1
2
3
4
# Peruvian Indians data
data(peru.df)
peru.fit = lm(BP ~ age + years + I(years^2) + weight + height, data = peru.df)
cooks20x(peru.fit)

s20x documentation built on Aug. 8, 2017, 9:06 a.m.

Related to cooks20x in s20x...