screeplot               package:stats               R Documentation

_S_c_r_e_e_p_l_o_t _o_f _P_C_A _R_e_s_u_l_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     'screeplot' plots the variances against the number of the
     principal component. This is also the 'plot' method for class
     '"princomp"'.

_U_s_a_g_e:

     screeplot(x, npcs = min(10, length(x$sdev)),
               type = c("barplot", "lines"), main = deparse(substitute(x)), ...)

_A_r_g_u_m_e_n_t_s:

       x: an object of class '"princomp"', as from 'princomp()'.

    npcs: the number of principal components to be plotted.

    type: the type of plot.

main, ...: graphics parameters.

_R_e_f_e_r_e_n_c_e_s:

     Mardia, K. V., J. T. Kent and J. M. Bibby (1979). _Multivariate
     Analysis_, London: Academic Press.

     Venables, W. N. and B. D. Ripley (2002). _Modern Applied
     Statistics with S_, Springer-Verlag.

_S_e_e _A_l_s_o:

     'princomp'.

_E_x_a_m_p_l_e_s:

     ## The variances of the variables in the
     ## USArrests data vary by orders of magnitude, so scaling is appropriate
     data(USArrests)
     (pc.cr <- princomp(USArrests, cor = TRUE))  # inappropriate
     screeplot(pc.cr)

     data(Harman74.cor)
     fit <- princomp(covmat=Harman74.cor)
     screeplot(fit)
     screeplot(fit, npcs=24, type="lines")

