line                   package:eda                   R Documentation

_R_o_b_u_s_t _L_i_n_e _F_i_t_t_i_n_g

_D_e_s_c_r_i_p_t_i_o_n:

     Fit a line robustly as recommended in Exploratory Data Analysis.

_U_s_a_g_e:

     line(x, y)

     coef(object, ...)
     residuals(object, type, ...)
     fitted(object, ...)
     print(x, digits = max(3, getOption("digits") - 3), ...)

_A_r_g_u_m_e_n_t_s:

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

  object: a `tukeyline' object, typically the result of `line(*)'.

  digits: number of significant digits to use, see `print'.

type, ...: potentially further arguments, required by generic.

_V_a_l_u_e:

     An object of class `"tukeyline"'.

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

_R_e_f_e_r_e_n_c_e_s:

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

_S_e_e _A_l_s_o:

     `lm'.

_E_x_a_m_p_l_e_s:

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

