

_P_r_i_n_c_i_p_a_l _C_o_m_p_o_n_e_n_t_s _A_n_a_l_y_s_i_s

     princomp(x, cor = FALSE, scores = TRUE,
              subset = rep(TRUE, nrow(as.matrix(x))))
     print.princomp(obj)
     summary.princomp(obj)
     plot.princomp(obj)

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

       x: a matrix (or data frame) which provides the data
          for the principal components analysis.

     cor: a logical value indicating whether the calculation
          should use the correlation matrix or the covari-
          ance matrix.

   score: a logical value indicating whether the score on
          each principal component should be calculated.

  subset: a vector used to select rows (observations) of the
          data matrix `x'.

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

     Performs a principal components analysis on the given
     data matrix and returns the results as a `princomp'
     object.

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

     The calculation is done using `eigen' on the correla-
     tion or covariance matrix, as determined by `cor'.
     This is done for compatibility with the Splus result
     (even though alternate forms for `x'-e.g., a covariance
     matrix-are not supported as they are in Splus).  A pre-
     ferred method of calculation is to use svd on `x', as
     is done in `prcomp'.

     Note that the scaling of results is affected by the
     setting of `cor'.  If `cor' is `TRUE' then the divisor
     in the calculation of the sdev is N-1, otherwise it is
     N.  This has the effect that the result is slightly
     different depending on whether scaling is done first on
     the data and cor set to `FALSE', or done automatically
     in `princomp' with `cor = TRUE'.

     The print method for the these objects prints the
     results in a nice format and the plot method produces a
     scree plot.

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

     `princomp' returns a list with class `"princomp"' con-
     taining the following components:

     var: the variances of the principal components (i.e.,
          the eigenvalues)

    load: the matrix of variable loadings (i.e., a matrix
          whose columns contain the eigenvectors).

   scale: the value of the `scale' argument.

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

     Mardia, K. V., J. T. Kent and J. M. Bibby (1979).  Mul-
     tivariate Analysis, London: Academic Press.

     Venables, W. N. and B. D. Ripley (1997).  Modern
     Applied Statistics with S-Plus, Springer-Verlag.

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

     `prcomp', `cor', `cov', `eigen'.

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

     ## the variances of the variables in the
     ## crimes data vary by orders of magnitude
     data(crimes)
     princomp(crimes)
     princomp(crimes, cor = TRUE)
     princomp(scale(crimes, scale = TRUE, center = TRUE), cor = FALSE)
     plot(princomp(crimes))
     biplot(princomp(crimes))
     summary(princomp(crimes))
     loadings(princomp(crimes))

