residual_histogram: Plots the histogram of regression residuals to check for...

Description Usage Arguments Value Examples

View source: R/residual_plots.R

Description

Plots the histogram of regression residuals to check for normality. Includes results of Shapiro-Wilk test in visualization.

Usage

1

Arguments

df

A dataframe R will pull the variables from to run the regression

model

A model object or valid formula.

Value

A density histogram of the residuals

Examples

1
2
3
4
5
6
7
mtcars %>%
    residual_histogram(hp ~ cyl)

my_lm <- lm(hp ~ cyl, data = mtcars)

mtcars %>%
    residual_histogram(my_lm)

jameshasbany/fastlm documentation built on July 26, 2020, 9:40 a.m.