residualplot: Plots a standardaized residual

View source: R/residualplot.R

residualplotR Documentation

Plots a standardaized residual

Description

Plots a standardized residual plot from an lm object and provides additional graphics to help evaluate the variance homogeneity and mean.

Usage

residualplot(object, bandwidth = 0.3, ...)

Arguments

object

an lm object

bandwidth

The width of the window used to calculate the local smoothed version of the mean and the variance. Value should be between 0 and 1 and determines the percentage of the windowwidth used

...

Arguments passed to plot.

Details

Plots a standardized residual plot from an lm object and provides additional graphics to help evaluate the variance homogeneity and mean.

The brown area is a smoothed estimate of 1.96*SD of the standardized residuals in a window around the predicted value. The brown area should largely be rectangular if the standardized residuals have more or less the same variance.

The dashed line shows the smoothed mean of the standardized residuals and should generally follow the horizontal line through (0,0).

Value

Produces a standardized residual plot

Author(s)

Claus Ekstrøm <ekstrom@sund.ku.dk>

Examples

# Linear regression example
x <- rnorm(100)
y <- rnorm(100, mean=.5*x)
model <- lm(y ~ x)
residualplot(model)


isdals documentation built on Aug. 20, 2023, 1:07 a.m.

Related to residualplot in isdals...