gg_reshist: Generate histogram of residuals in ggplot.

View source: R/gg_reshist.R

gg_reshistR Documentation

Generate histogram of residuals in ggplot.

Description

Generate histogram of residuals in ggplot.

Usage

gg_reshist(fitted.lm, bins = NULL)

Arguments

fitted.lm

a fitted linear model (i.e. lm, glm) that contains fitted regression

bins

bin size for histogram

Value

A ggplot object

Examples

library(MASS)
data(Cars93)
cars_lm <- lm(Price~ Passengers + Length + RPM, data = Cars93)
gg_reshist(cars_lm)
# specify number of bins
gg_reshist(cars_lm, bins = 20)

lindia documentation built on Aug. 11, 2023, 1:09 a.m.

Related to gg_reshist in lindia...