line {eda} | R Documentation

## Robust Line Fitting

### Description

This function fits a line robustly as recommended in 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))

[Package Contents]