ggally_nostic_cooksd: ggnostic - Cook's distance

Description Usage Arguments Details Value See Also Examples

View source: R/ggnostic.R

Description

A function to display stats::cooks.distance.

Usage

1
2
3
ggally_nostic_cooksd(data, mapping, ..., linePosition = pf(0.5,
  length(attr(data, "var_x")), nrow(data) - length(attr(data, "var_x"))),
  lineColor = brew_colors("grey"), lineType = 2)

Arguments

data, mapping, ..., lineColor, lineType

parameters supplied to ggally_nostic_line

linePosition

4 / n is the general cutoff point for Cook's Distance

Details

A line is added at F_p, n - p(0.5) to display the general cutoff point for Cook's Distance.

Reference: Michael H. Kutner, Christopher J. Nachtsheim, John Neter, and William Li. Applied linear statistical models. The McGraw-Hill / Irwin series operations and decision sciences. McGraw-Hill Irwin, 2005, p. 403

Value

ggplot2 plot object

See Also

stats::cooks.distance

Examples

1
2
dt <- broomify(stats::lm(mpg ~ wt + qsec + am, data = mtcars))
ggally_nostic_cooksd(dt, ggplot2::aes(wt, .cooksd))

GGally documentation built on May 18, 2018, 1:08 a.m.