stat_resid_leverage: stat_resid_leverage

Description Usage Arguments Value Examples

View source: R/stat_resid_leverage.R

Description

Residual vs. leverage plot.

Usage

1
2
3
4
5
6
7
stat_resid_leverage(
  alpha = 0.5,
  method = "loess",
  se = FALSE,
  color = "steelblue",
  ...
)

Arguments

alpha

Adjust transparency of points.

method

Method for fitting the line to the points.

se

Keep standard error bands around line?

color

Color of the line.

...

Currently ignored. For extendability.

Value

A 'ggplot2' layer for plotting a fitted vs. residual scatter plot.

Examples

1
2
3
data(mtcars)
model <- lm(mpg ~ cyl + disp + hp, data = mtcars)
ggplot2::ggplot(data = model) + stat_resid_leverage()

gglm documentation built on Oct. 23, 2020, 7:57 p.m.