Robust Line Fitting

Share:

Description

Fit a line robustly as recommended in Exploratory Data Analysis.

Usage

1
line(x, y)

Arguments

x, y

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

Details

Cases with missing values are omitted.

Long vectors are not supported.

Value

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

1
2
3
4
5
6
7
require(graphics)

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

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.