plot_model {lvmisc}R Documentation

Plot model diagnostics

Description

Plotting functions for some common model diagnostics.

Usage

plot_model(model)

plot_model_residual_fitted(model)

plot_model_scale_location(model)

plot_model_qq(model)

plot_model_cooks_distance(model)

plot_model_multicollinearity(model)

Arguments

model

An object containing a model.

Details

plot_model_residual_fitted() plots the model residuals versus the fitted values. plot_model_scale_location() plots the square root of absolute value of the model residuals versus the fitted values. plot_model_qq() plots a QQ plot of the model standardized residuals. plot_model_cooks_distance() plots a bat chart of each observation Cook's distance value. plot_model_multicollinearity() plots a bar chart of the variance inflation factor (VIF) for each of the model terms. plot_model() returns a plot grid with all the applicable plot diagnostics to a given model.

Value

A ggplot object.

Examples

m <- lm(disp ~ mpg + hp + cyl + mpg:cyl, mtcars)
plot_model(m)
plot_model_residual_fitted(m)
plot_model_scale_location(m)
plot_model_qq(m)
plot_model_cooks_distance(m)
plot_model_multicollinearity(m)

[Package lvmisc version 0.1.2 Index]