alias                 package:stats                 R Documentation

_F_i_n_d _A_l_i_a_s_e_s (_D_e_p_e_n_d_e_n_c_i_e_s) _i_n _a _M_o_d_e_l

_D_e_s_c_r_i_p_t_i_o_n:

     Find aliases (linearly dependent terms) in a linear model
     specified by a formula.

_U_s_a_g_e:

     alias(object, ...)

     ## S3 method for class 'formula':
     alias(object, data, ...)

     ## S3 method for class 'lm':
     alias(object, complete = TRUE, partial = FALSE,
           partial.pattern = FALSE, ...)

_A_r_g_u_m_e_n_t_s:

  object: A fitted model object, for example from 'lm' or 'aov', or a
          formula for 'alias.formula'.

    data: Optionally, a data frame to search for the objects in the
          formula.

complete: Should information on complete aliasing be included?

 partial: Should information on partial aliasing be included?

partial.pattern: Should partial aliasing be presented in a schematic
          way? If this is done, the results are presented in a more
          compact way, usually giving the deciles of the coefficients.

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

_D_e_t_a_i_l_s:

     Although the main method is for class '"lm"', 'alias' is most
     useful for experimental designs and so is used with fits from
     'aov'. Complete aliasing refers to effects in linear models that
     cannot be estimated independently of the terms which occur earlier
     in the model and so have their coefficients omitted from the fit.
     Partial aliasing refers to effects that can be estimated less
     precisely because of correlations induced by the design.

_V_a_l_u_e:

     A list (of 'class "listof"') containing components 

   Model: Description of the model; usually the formula.

Complete: A matrix with columns corresponding to effects that are
          linearly dependent on the rows.

 Partial: The correlations of the estimable effects, with a zero
          diagonal. An object of class '"mtable"' which has its own
          'print' method.

_N_o_t_e:

     The aliasing pattern may depend on the contrasts in use: Helmert
     contrasts are probably most useful.

     The defaults are different from those in S.

_A_u_t_h_o_r(_s):

     The design was inspired by the S function of the same name
     described in Chambers _et al._ (1992).

_R_e_f_e_r_e_n_c_e_s:

     Chambers, J. M., Freeny, A and Heiberger, R. M. (1992) _Analysis
     of variance; designed experiments._ Chapter 5 of _Statistical
     Models in S_ eds J. M. Chambers and T. J. Hastie, Wadsworth &
     Brooks/Cole.

_E_x_a_m_p_l_e_s:

     ## From Venables and Ripley (2002) p.165.
     utils::data(npk, package="MASS")

     op <- options(contrasts=c("contr.helmert", "contr.poly"))
     npk.aov <- aov(yield ~ block + N*P*K, npk)
     alias(npk.aov)
     options(op)# reset

