Skip to Content

line {stats}

Robust Line Fitting
Package: 
stats
Version: 
R 2.15.3

Description

Fit a line robustly as recommended in Exploratory Data Analysis.

Usage

line(x, y)

Arguments

x, y
the arguments can be any way of specifying x-y pairs. See xy.coords.

Values

An object of class "tukeyline".

Methods are available for the generic functions coef, residuals, fitted, and print.

References

Tukey, J. W. (1977). Exploratory Data Analysis, Reading Massachusetts: Addison-Wesley.

See Also

lm.

Examples

require(graphics)
 
plot(cars)
(z <- line(cars))
abline(coef(z))
## Tukey-Anscombe Plot :
plot(residuals(z) ~ fitted(z), main = deparse(z$call))

Documentation reproduced from R 2.15.3. License: GPL-2.