plot_residuals: Make a plot of residuals vs fitted values

Description Usage Arguments Value Examples

View source: R/plot_residuals.R

Description

Plot residuals against fitted values to check for homoscedasticity.

Usage

1

Arguments

model

an lm object. The function will extract residuals and fitted values from the model object.

Value

a ggplot object. A plot showing residual on the y-axis and fitted value on the x-axis.

Examples

1
2
3
model <- lm(mpg~wt, data = mtcars)
plot <- plot_residuals(model)
plot

PatrickEslick/BrasiliaWorkshop documentation built on Dec. 18, 2021, 6:41 a.m.