coef                  package:stats                  R Documentation

_E_x_t_r_a_c_t _M_o_d_e_l _C_o_e_f_f_i_c_i_e_n_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     'coef' is a generic function which extracts model coefficients
     from objects returned by modeling functions.  'coefficients' is an
     _alias_ for it.

_U_s_a_g_e:

     coef(object, ...)
     coefficients(object, ...)

_A_r_g_u_m_e_n_t_s:

  object: an object for which the extraction of model coefficients is
          meaningful.

     ...: other arguments.

_D_e_t_a_i_l_s:

     All object classes which are returned by model fitting functions
     should provide a 'coef' method or use the default one. (Note that
     the method is 'coef' and not 'coefficients'.)

     Class '"aov"' has a 'coef' method that does not report aliased
     coefficients (see 'alias').

_V_a_l_u_e:

     Coefficients extracted from the model object 'object'.

_R_e_f_e_r_e_n_c_e_s:

     Chambers, J. M. and Hastie, T. J. (1992) _Statistical Models in
     S_. Wadsworth & Brooks/Cole.

_S_e_e _A_l_s_o:

     'fitted.values' and 'residuals' for related methods; 'glm', 'lm'
     for model fitting.

_E_x_a_m_p_l_e_s:

     x <- 1:5; coef(lm(c(1:3,7,6) ~ x))

