stat_scale_location: stat_scale_location

View source: R/stat_scale_location.R

stat_scale_locationR Documentation

stat_scale_location

Description

Scale location diagnostic plot.

Usage

stat_scale_location(
  alpha = 0.5,
  na.rm = TRUE,
  se = FALSE,
  method = "loess",
  color = "steelblue",
  ...
)

Arguments

alpha

Adjust the transparency of points.

na.rm

Remove points with value NA?

se

Keep standard error bands around line?

method

Method for fitting the line to the points.

color

Color of the line.

...

Currently ignored. For extendability.

Value

A 'ggplot2' layer for plotting the scale location diagnostic plot.

Examples

data(mtcars)
model <- lm(mpg ~ cyl + disp + hp, data = mtcars)
ggplot2::ggplot(data = model) + stat_scale_location()

gglm documentation built on March 31, 2023, 5:45 p.m.