Learn R Programming

gglm (version 1.0.4)

stat_resid_hist: stat_resid_hist

Description

Visualize the distribution of the residuals of a model.

Usage

stat_resid_hist(bins = 30, ...)

Value

A `ggplot2` layer for plotting a histogram of residuals.

Arguments

bins

Adjust the number of bins.

...

Currently ignored. For extendability.

Examples

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

Run the code above in your browser using DataLab