line                  package:stats                  R Documentation

Robust Line Fitting

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.

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:

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

