This help topic is for R version 0.60. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/eda/html/line.html
line {eda}R Documentation

Robust Line Fitting

Description

This function fits a line robustly as recommended in John Tukey's book Exploratory Data Analysis.

Usage

line(x, y)

coefficients(tukeyline.obj)
residuals(tukeyline.obj)
fitted.values(tukeyline.obj)
print(tukeyline.obj)

Arguments

x, y

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

Value

An object of class tukeyline. Methods are available for the generic functions coefficients, residuals, fitted.values and print.

References

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

See Also

lm.

Examples

library(eda)
data(cars)
plot(cars)
z <- line(cars)
abline(coef(z))