R: ggnostic - Cook's distance

ggally_nostic_cooksd {GGally} | R Documentation

## ggnostic - Cook's distance

### Description

A function to display `stats::cooks.distance`.

### Usage

    ggally_nostic_cooksd(data, mapping, ..., linePosition = 4/nrow(data),
      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 4 / n to display the general cutoff point for Cook's Distance.

Reference: Cook, R. Dennis; Weisberg, Sanford (1982). Residuals and Influence in Regression. New York, NY: Chapman & Hall. ISBN 0-412-24280-X

### Value

ggplot2 plot object

### See Also

`stats::cooks.distance`

### Examples

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

[Package GGally version 1.3.2 Index]