corresp                 package:MASS                 R Documentation

_S_i_m_p_l_e _C_o_r_r_e_s_p_o_n_d_e_n_c_e _A_n_a_l_y_s_i_s

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

     Find the principal canonical correlation and corresponding row-
     and column-scores from a correspondence analysis of a two-way
     contingency table.

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

     corresp(x, ...)

     ## S3 method for class 'matrix':
     corresp(x, nf = 1, ...)

     ## S3 method for class 'factor':
     corresp(x, y, ...)

     ## S3 method for class 'data.frame':
     corresp(x, ...)

     ## S3 method for class 'xtabs':
     corresp(x, ...)

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

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

x, formula: The function is generic, accepting various forms of the
          principal argument for specifying a two-way frequency table. 
          Currently accepted forms are matrices, data frames (coerced
          to frequency tables), objects of class '"xtabs"' and formulae
          of the form '~ F1 + F2', where 'F1' and 'F2' are factors. 

      nf: The number of factors to be computed. Note that although 1 is
          the most usual, one school of thought takes the first two
          singular vectors for a sort of biplot. 

       y: a second factor for a cross-classification

    data: a data frame against which to preferentially resolve
          variables in the formula.

     ...: If the principal argument is a formula, a data frame may be
          specified as well from which variables in the formula are
          preferentially satisfied. 

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

     See Venables & Ripley (2002).  The 'plot' method produces a
     graphical representation of the table if 'nf=1', with the _areas_
     of circles representing the numbers of points.  If 'nf' is two or
     more the 'biplot' method is called, which plots the second and
     third columns of the matrices 'A = Dr^(-1/2) U L' and 'B =
     Dc^(-1/2) U V' where the singular value decomposition is 'U L V'. 
     Thus the x-axis is the canonical correlation times the row and
     column scores. Although this is called a biplot, it does _not_
     have any useful inner product relationship between the row and
     column scores.  Think of this as an equally-scaled plot with two
     unrelated sets of labels.  The origin is marked on the plot with a
     cross.

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

     An list object of class '"correspondence"' for which 'print',
     'plot' and 'biplot' methods are supplied.  The main components are
     the canonical correlation(s) and the row and column scores.

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

     Venables, W. N. and Ripley, B. D. (2002) _Modern Applied
     Statistics with S._ Fourth edition.  Springer.

     Gower, J. C. and Hand, D. J. (1996) _Biplots._  Chapman & Hall.

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

     'svd', 'princomp'

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

     (ct <- corresp(~ Age + Eth, data = quine))
     ## Not run: plot(ct)

     corresp(caith)
     biplot(corresp(caith, nf = 2))

