diagnosis: A function to plot model diagnostics

Description Usage Arguments Details Examples

View source: R/diagnosis.R

Description

This function generates a series of plots that can be used to check some model assumptions in linear models.

Usage

1
diagnosis(mod)

Arguments

mod

A model object

diagnosis

A function for plotting model diagnostics

Details

The left panel shows residuals as a function of fitted values and is useful for checking homoskedasticity.

The middle panel plots a histogram of the residuals with a vertical discontinuous line that represents the mean.

The right panel provides a qq-plot of the residuals.

Examples

1
2
mod1 <- lm(mpg ~ drat, data = mtcars)
diagnosis(mod1)

jvcasillas/ds4ling documentation built on April 8, 2021, 10:15 p.m.