Learn R Programming

olsrr (version 0.4.0)

ols_rfs_plot: Residual Fit Spread Plot

Description

Plot to detect non-linearity, influential observations and outliers.

Usage

ols_rfs_plot(model)

ols_fm_plot(model)

ols_rsd_plot(model)

Arguments

model

an object of class lm

Details

Consists of side-by-side quantile plots of the centered fit and the residuals. It shows how much variation in the data is explained by the fit and how much remains in the residuals. For inappropriate models, the spread of the residuals in such a plot is often greater than the spread of the centered fit.

References

Cleveland, W. S. (1993). Visualizing Data. Summit, NJ: Hobart Press.

Examples

Run this code
# NOT RUN {
# model
model <- lm(mpg ~ disp + hp + wt, data = mtcars)

# residual fit spread plot
ols_rfs_plot(model)

# fit mean plot
ols_fm_plot(model)

# residual spread plot
ols_rsd_plot(model)

# }

Run the code above in your browser using DataLab