Learn R Programming

iNZightRegression (version 1.3.5)

histogramArray: Histogram Array

Description

Produces an array of histograms to compare against the histogram of residuals for a fitted linear model.

Usage

histogramArray(x, n = 7, env = parent.frame())

Value

No return value, called to generate plot.

Arguments

x

an lm or svyglm object.

n

the number of additional histograms to plot alongside the original.

env

environment for finding data to bootstrap

Author

David Banks, Tom Elliott

Details

The histogram of the model x appears in the top-left position. For each of the other histograms, the fitted values of x are taken and normal random errors are added to these. The normal residual standard errors have standard error equal to the estimated residual standard error of x. A model is then fitted to this altered data and a histogram is produced.

See Also

iNZightQQplot

Examples

Run this code
histogramArray(lm(Sepal.Length ~ Sepal.Width + Species, data = iris))

Run the code above in your browser using DataLab