Learn R Programming

gglm (version 1.0.4)

stat_resid_leverage: stat_resid_leverage

Description

Residual vs. leverage plot.

Usage

stat_resid_leverage(
  alpha = 0.5,
  method = "loess",
  se = FALSE,
  color = "steelblue",
  ...
)

Value

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

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.

Examples

Run this code
data(mtcars)
model <- lm(mpg ~ cyl + disp + hp, data = mtcars)
ggplot2::ggplot(data = model) + stat_resid_leverage()

Run the code above in your browser using DataLab