lm.summaries              package:stats              R Documentation

_A_c_c_e_s_s_i_n_g _L_i_n_e_a_r _M_o_d_e_l _F_i_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     All these functions are 'methods' for class '"lm"'  objects.

_U_s_a_g_e:

     ## S3 method for class 'lm':
     family(object, ...)

     ## S3 method for class 'lm':
     formula(x, ...)

     ## S3 method for class 'lm':
     residuals(object,
               type = c("working", "response", "deviance", "pearson",
                        "partial"),
               ...)

     ## S3 method for class 'lm':
     labels(object, ...)

     weights(object, ...)

_A_r_g_u_m_e_n_t_s:

object, x: an object inheriting from class 'lm', usually the result of
          a call to 'lm' or 'aov'.

     ...: further arguments passed to or from other methods.

    type: the type of residuals which should be returned.

_D_e_t_a_i_l_s:

     The generic accessor functions 'coef', 'effects', 'fitted' and
     'residuals' can be used to extract various useful features of the
     value returned by 'lm'.

     The working and response residuals are 'observed - fitted'.  The
     deviance and pearson residuals are weighted residuals, scaled by
     the square root of the weights used in fitting.  The partial
     residuals are a matrix with each column formed by omitting a term
     from the model.  In all these, zero weight cases are never omitted
     (as opposed to the standardized 'rstudent' residuals, and the
     'weighted.residuals').

     How 'residuals' treats cases with missing values in the original
     fit is determined by the 'na.action' argument of that fit. If
     'na.action = na.omit' omitted cases will not appear in the
     residuals, whereas if 'na.action = na.exclude' they will appear,
     with residual value 'NA'.  See also 'naresid'.

     The '"lm"' method for generic 'labels' returns the term labels for
     estimable terms, that is the names of the terms with an least one
     estimable coefficient.

_R_e_f_e_r_e_n_c_e_s:

     Chambers, J. M. (1992) _Linear models._ Chapter 4 of _Statistical
     Models in S_ eds J. M. Chambers and T. J. Hastie, Wadsworth &
     Brooks/Cole.

_S_e_e _A_l_s_o:

     The model fitting function 'lm', 'anova.lm'.

     'coef', 'deviance', 'df.residual', 'effects', 'fitted', 'glm' for
     *generalized* linear models, 'influence' (etc on that page) for
     regression diagnostics, 'weighted.residuals', 'residuals',
     'residuals.glm', 'summary.lm'.

     influence.measures for deletion diagnostics, including
     standardized ('rstandard') and studentized ('rstudent') residuals.

_E_x_a_m_p_l_e_s:

     ##-- Continuing the  lm(.) example:
     coef(lm.D90)# the bare coefficients

     ## The 2 basic regression diagnostic plots [plot.lm(.) is preferred]
     plot(resid(lm.D90), fitted(lm.D90))# Tukey-Anscombe's
     abline(h=0, lty=2, col = 'gray')

     qqnorm(residuals(lm.D90))

